Re: [PATCH 2/9] mm: workingset: tell cache transitions from workingset thrashing

From: Johannes Weiner
Date: Thu Aug 02 2018 - 12:04:02 EST


Hi Suren,

On Wed, Aug 01, 2018 at 02:56:27PM -0700, Suren Baghdasaryan wrote:
> On Wed, Aug 1, 2018 at 8:19 AM, Johannes Weiner <hannes@xxxxxxxxxxx> wrote:
> > /*
> > - * The unsigned subtraction here gives an accurate distance
> > - * across inactive_age overflows in most cases.
> > + * Calculate the refault distance
> > *
> > - * There is a special case: usually, shadow entries have a
> > - * short lifetime and are either refaulted or reclaimed along
> > - * with the inode before they get too old. But it is not
> > - * impossible for the inactive_age to lap a shadow entry in
> > - * the field, which can then can result in a false small
> > - * refault distance, leading to a false activation should this
> > - * old entry actually refault again. However, earlier kernels
> > - * used to deactivate unconditionally with *every* reclaim
> > - * invocation for the longest time, so the occasional
> > - * inappropriate activation leading to pressure on the active
> > - * list is not a problem.
> > + * The unsigned subtraction here gives an accurate distance
> > + * across inactive_age overflows in most cases. There is a
> > + * special case: usually, shadow entries have a short lifetime
> > + * and are either refaulted or reclaimed along with the inode
> > + * before they get too old. But it is not impossible for the
> > + * inactive_age to lap a shadow entry in the field, which can
> > + * then can result in a false small refault distance, leading
>
> "which can then can" - please remove one of the "can".

Good catch, will fix.