From owner-svn-src-head@FreeBSD.ORG Tue Jun 16 13:44:02 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2F33F6AF; Tue, 16 Jun 2015 13:44:02 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 0F262DEE; Tue, 16 Jun 2015 13:44:00 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id t5GDhql1022609 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 16 Jun 2015 16:43:52 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t5GDhqta022608; Tue, 16 Jun 2015 16:43:52 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Tue, 16 Jun 2015 16:43:52 +0300 From: Gleb Smirnoff To: 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 Message-ID: <20150616134352.GI73119@FreeBSD.org> References: <201506100934.t5A9YpoN093925@svn.freebsd.org> <20150610154445.GJ73119@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150610154445.GJ73119@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) 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: Tue, 16 Jun 2015 13:44:02 -0000 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? T> T> -- T> Totus tuus, Glebius. T> -- Totus tuus, Glebius.