svn commit: r348772 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Slawa Olhovchenkov
slw at zxy.spb.ru
Fri Jun 7 13:04:38 UTC 2019
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?
More information about the svn-src-all
mailing list