From owner-freebsd-stable@freebsd.org Thu Apr 13 11:59:05 2017 Return-Path: Delivered-To: freebsd-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1D3F4D3BE66 for ; Thu, 13 Apr 2017 11:59:05 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 0A82ECCF for ; Thu, 13 Apr 2017 11:59:05 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: by mailman.ysv.freebsd.org (Postfix) id 09D5AD3BE65; Thu, 13 Apr 2017 11:59:05 +0000 (UTC) Delivered-To: stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 097AAD3BE64 for ; Thu, 13 Apr 2017 11:59:05 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C21E2CCD for ; Thu, 13 Apr 2017 11:59:04 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1cydOo-000NW0-D9; Thu, 13 Apr 2017 14:58:54 +0300 Date: Thu, 13 Apr 2017 14:58:54 +0300 From: Slawa Olhovchenkov To: Adrian Chadd Cc: "stable@freebsd.org" Subject: Re: Lock contention in AIO Message-ID: <20170413115854.GZ70430@zxy.spb.ru> References: <20170321164227.GE86500@zxy.spb.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Apr 2017 11:59:05 -0000 On Wed, Apr 12, 2017 at 05:21:02PM -0700, Adrian Chadd wrote: > It's the same pages, right? Perhaps. > Is it just the refcounting locking that's > causing it? Don't know. > I think the biggest thing here is to figure out how to have pages have > a lifecycle where the refcount can be inc/dec (obviously >1, ie not in > a state where you can dec to 0) via atomics, without grabbing a lock. > That'll make this particular use case muuuuch faster. > > (dfbsd does this.) I can try you patch. > -a > > > On 21 March 2017 at 09:42, Slawa Olhovchenkov wrote: > > I am see lock contetntion cuased by aio read (same file segment from > > multiple process simultaneous): > > > > 07.74% [26756] lock_delay @ /boot/kernel/kernel > > 92.21% [24671] __mtx_lock_sleep > > 52.14% [12864] vm_page_enqueue > > 100.0% [12864] vm_fault_hold > > 87.71% [11283] vm_fault_quick_hold_pages > > 100.0% [11283] vn_io_fault1 > > 100.0% [11283] vn_io_fault > > 99.88% [11270] aio_process_rw > > 100.0% [11270] aio_daemon > > 100.0% [11270] fork_exit > > 00.12% [13] dofileread > > 100.0% [13] kern_readv > > > > Is this know problem? > > _______________________________________________ > > freebsd-stable@freebsd.org mailing list > > https://lists.freebsd.org/mailman/listinfo/freebsd-stable > > To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org"