Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 7 Jun 2019 17:56:56 +0300
From:      Andriy Gapon <avg@FreeBSD.org>
To:        Slawa Olhovchenkov <slw@zxy.spb.ru>
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:  <1e0ac4cf-d737-fbfd-a9b7-f728ef654d0a@FreeBSD.org>
In-Reply-To: <20190607130429.GH47119@zxy.spb.ru>
References:  <201906070635.x576ZgEE027350@repo.freebsd.org> <20190607130429.GH47119@zxy.spb.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
On 07/06/2019 16:04, Slawa Olhovchenkov wrote:
> 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 <slw@zxy.spb.ru>
>>   MFC after:	2 weeks
>>   Sponsored by:	Integros [integros.com]
>>   Differential Revision: https://reviews.freebsd.org/D19094
> 
> Include in 11.3-RELEASE planed?


I didn't plan it, given the release schedule.
But I can be convinced that this is a really important fix.
So far, I am not :)

-- 
Andriy Gapon



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1e0ac4cf-d737-fbfd-a9b7-f728ef654d0a>