From owner-svn-src-head@FreeBSD.ORG Sat Jun 20 13:21:37 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C2D4C2EF; Sat, 20 Jun 2015 13:21:37 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9C7E8AB5; Sat, 20 Jun 2015 13:21:37 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-2.local (d-69-161-105-82.cpe.metrocast.net [69.161.105.82]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id CF778B962; Sat, 20 Jun 2015 09:21:35 -0400 (EDT) Message-ID: <558568DF.3060902@FreeBSD.org> Date: Sat, 20 Jun 2015 09:21:35 -0400 From: John Baldwin User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Gleb Smirnoff , Mateusz Guzik CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r284211 - in head/sys: kern sys References: <201506100934.t5A9YpoN093925@svn.freebsd.org> <20150610154445.GJ73119@FreeBSD.org> <20150616134352.GI73119@FreeBSD.org> In-Reply-To: <20150616134352.GI73119@FreeBSD.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Sat, 20 Jun 2015 09:21:36 -0400 (EDT) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 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: Sat, 20 Jun 2015 13:21:37 -0000 On 6/16/15 9:43 AM, Gleb Smirnoff wrote: > Mateusz, > > have you noticed this email? > > On Wed, Jun 10, 2015 at 06:44:45PM +0300, Gleb Smirnoff wrote: > T> On Wed, Jun 10, 2015 at 09:34:51AM +0000, Mateusz Guzik wrote: > T> M> Author: mjg > T> M> Date: Wed Jun 10 09:34:50 2015 > T> M> New Revision: 284211 > T> M> URL: https://svnweb.freebsd.org/changeset/base/284211 > T> M> > T> M> Log: > T> M> fd: use atomics to manage fd_refcnt and fd_holcnt > T> M> > T> M> This gets rid of fdesc_mtx. > T> .. > T> M> Modified: head/sys/sys/filedesc.h > T> M> ============================================================================== > T> M> --- head/sys/sys/filedesc.h Wed Jun 10 05:39:48 2015 (r284210) > T> M> +++ head/sys/sys/filedesc.h Wed Jun 10 09:34:50 2015 (r284211) > T> M> @@ -83,8 +83,8 @@ struct filedesc { > T> M> int fd_lastfile; /* high-water mark of fd_ofiles */ > T> M> int fd_freefile; /* approx. next free file */ > T> M> u_short fd_cmask; /* mask for file creation */ > T> M> - u_short fd_refcnt; /* thread reference count */ > T> M> - u_short fd_holdcnt; /* hold count on structure + mutex */ > T> M> + int fd_refcnt; /* thread reference count */ > T> M> + int fd_holdcnt; /* hold count on structure + mutex */ > T> M> struct sx fd_sx; /* protects members of this struct */ > T> M> struct kqlist fd_kqlist; /* list of kqueues on this filedesc */ > T> M> int fd_holdleaderscount; /* block fdfree() for shared close() */ > T> > T> Shouldn't they be volatile u_int? Agreed. -- John Baldwin