svn commit: r348772 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Andriy Gapon
avg at FreeBSD.org
Fri Jun 7 14:57:03 UTC 2019
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 at 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
More information about the svn-src-all
mailing list