From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qk0-f197.google.com (mail-qk0-f197.google.com [209.85.220.197]) by kanga.kvack.org (Postfix) with ESMTP id B207C6B0007 for ; Thu, 2 Aug 2018 08:26:00 -0400 (EDT) Received: by mail-qk0-f197.google.com with SMTP id 17-v6so1833200qkz.15 for ; Thu, 02 Aug 2018 05:26:00 -0700 (PDT) Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id 8-v6sor807831qks.32.2018.08.02.05.25.57 for (Google Transport Security); Thu, 02 Aug 2018 05:25:57 -0700 (PDT) Date: Thu, 2 Aug 2018 08:28:52 -0400 From: Johannes Weiner Subject: Re: [PATCH 2/9] mm: workingset: tell cache transitions from workingset thrashing Message-ID: <20180802122852.GA17974@cmpxchg.org> References: <20180801151958.32590-1-hannes@cmpxchg.org> <20180801151958.32590-3-hannes@cmpxchg.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: owner-linux-mm@kvack.org List-ID: To: Suren Baghdasaryan Cc: Ingo Molnar , Peter Zijlstra , Andrew Morton , Linus Torvalds , Tejun Heo , Daniel Drake , Vinayak Menon , Christopher Lameter , Mike Galbraith , Shakeel Butt , Peter Enderborg , linux-mm , cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-team@fb.com 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 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.