From owner-svn-src-head@FreeBSD.ORG Sun Jul 11 03:18:39 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C09E2106566B; Sun, 11 Jul 2010 03:18:39 +0000 (UTC) (envelope-from pali.gabor@googlemail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 285298FC1D; Sun, 11 Jul 2010 03:18:38 +0000 (UTC) Received: by fxm13 with SMTP id 13so1935549fxm.13 for ; Sat, 10 Jul 2010 20:18:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=8IPtOyNBl/OGR3dedWXxmDFAd+sm06/TkMsU5jQF3dw=; b=G8o42A4OnQ27cmpjCFRRs7FnckuFwwbhAjtiKyraZzugMvJH6MmqtVYQ3qeXX0DYal 9oQ5oiRBsHletr9O2z8/8CVAwUj9hpjT2TjLiGd0am7Nnp6FnohO7lrDz8U7a68CVVwf 1wPHf+RLcPg+80IGqQtDBSfNBeJGrtURKqShk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=A7I612/gu8HwX47eZGpmm38Pkp2ey0NKJI/F4gBx25X5NMd1CHYPtEP1aUmzrzRX6d cJjzdnIpFba+nH9o2gxKIf/Am1iJfT2sbPUe4ldQu4ecyiqzBziYnNoI5OKCyLaIqiEt IIGMUhqybwi2AYcmlpPT0aMjIn6/gM3tGURYM= MIME-Version: 1.0 Received: by 10.223.114.194 with SMTP id f2mr9931031faq.95.1278818317968; Sat, 10 Jul 2010 20:18:37 -0700 (PDT) Sender: pali.gabor@googlemail.com Received: by 10.223.114.77 with HTTP; Sat, 10 Jul 2010 20:18:37 -0700 (PDT) In-Reply-To: <4A28A601-C87F-47C6-8CBE-5F1BF866CA4A@FreeBSD.org> References: <4C376B0E.9050505@FreeBSD.org> <4C37713D.5060202@FreeBSD.org> <4A28A601-C87F-47C6-8CBE-5F1BF866CA4A@FreeBSD.org> Date: Sun, 11 Jul 2010 05:18:37 +0200 X-Google-Sender-Auth: c-FtqU4MwXjA3DuXVKpnNxfWOMI Message-ID: From: Gabor PALI To: "Robert N. M. Watson" Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org Subject: Re: svn commit: r209119 - head/sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jul 2010 03:18:39 -0000 On Sat, Jul 10, 2010 at 5:24 PM, Robert N. M. Watson wrote: > If we can do it in one atomic in the common case, and two atomics in an e= dge case, that sounds fine. I think any use of locking(9) would be sufficie= ntly costly as to not be worth the improvements in consistency, given the f= requency of statistics operations. I have tried to use atomic operations for counting (without locking(9)), but they turned out to be significantly slower than the naive case indeed. If consistency is not so important for statistics, whether would it be safe to simply use 64-bit variables for counters everywhere on all architectures? :g