From owner-svn-src-head@freebsd.org Fri Jun 7 13:04:38 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3FD1315ACC0C; Fri, 7 Jun 2019 13:04:38 +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 CB1B5722D6; Fri, 7 Jun 2019 13:04:37 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1hZEXl-0005ZZ-8P; Fri, 07 Jun 2019 16:04:29 +0300 Date: Fri, 7 Jun 2019 16:04:29 +0300 From: Slawa Olhovchenkov To: Andriy Gapon Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r348772 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs Message-ID: <20190607130429.GH47119@zxy.spb.ru> References: <201906070635.x576ZgEE027350@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201906070635.x576ZgEE027350@repo.freebsd.org> 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-Rspamd-Queue-Id: CB1B5722D6 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.92 / 15.00]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.92)[-0.923,0]; NEURAL_HAM_MEDIUM(-0.99)[-0.994,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 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: Fri, 07 Jun 2019 13:04:38 -0000 On Fri, Jun 07, 2019 at 06:35:42AM +0000, Andriy Gapon wrote: > Author: avg > Date: Fri Jun 7 06:35:42 2019 > New Revision: 348772 > URL: https://svnweb.freebsd.org/changeset/base/348772 > > Log: > Restore ARC MFU/MRU pressure > > Before r305323 (MFV r302991: 6950 ARC should cache compressed data) > arc_read() code did this for access to a ghost buffer: > arc_adapt() (from arc_get_data_buf()) > arc_access(hdr, hash_lock) > I.e., we first checked access to the MFU ghost/MRU ghost buffer and > adapt MFU/MRU sizes (in arc_adapt()) and next move buffer from the ghost > state to regular. > > After r305323 the sequence is different: > arc_access(hdr, hash_lock); > arc_hdr_alloc_pabd(hdr); > I.e., we first move the buffer from the ghost state in arc_access() and > then we check access to buffer in ghost state (in arc_hdr_alloc_pabd() > -> arc_get_data_abd() -> arc_get_data_impl() -> arc_adapt()). This is > incorrect: arc_adapt() never see access to the ghost buffer because > arc_access() already migrated the buffer from the ghost state to > regular. > > So, the fix is to restore a call to arc_adapt() before arc_access() and > to suppress the call to arc_adapt() after arc_access(). > > Submitted by: Slawa Olhovchenkov > MFC after: 2 weeks > Sponsored by: Integros [integros.com] > Differential Revision: https://reviews.freebsd.org/D19094 Include in 11.3-RELEASE planed?