From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932416AbbJUUGN (ORCPT ); Wed, 21 Oct 2015 16:06:13 -0400 Received: from mail-pa0-f49.google.com ([209.85.220.49]:33015 "EHLO mail-pa0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932394AbbJUUGK (ORCPT ); Wed, 21 Oct 2015 16:06:10 -0400 Date: Wed, 21 Oct 2015 13:05:53 -0700 (PDT) From: Hugh Dickins X-X-Sender: hugh@eggly.anvils To: Johannes Weiner cc: Andrew Morton , Vladimir Davydov , linux-mm@kvack.org, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm: vmpressure: fix scan window after SWAP_CLUSTER_MAX increase In-Reply-To: <20151021193852.GA13511@cmpxchg.org> Message-ID: References: <1445278381-21033-1-git-send-email-hannes@cmpxchg.org> <20151021193852.GA13511@cmpxchg.org> User-Agent: Alpine 2.11 (LSU 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 21 Oct 2015, Johannes Weiner wrote: > On Mon, Oct 19, 2015 at 02:13:01PM -0400, Johannes Weiner wrote: > > mm-increase-swap_cluster_max-to-batch-tlb-flushes.patch changed > > SWAP_CLUSTER_MAX from 32 pages to 256 pages, inadvertantly switching > > the scan window for vmpressure detection from 2MB to 16MB. Revert. > > > > Signed-off-by: Johannes Weiner > > --- > > mm/vmpressure.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/mm/vmpressure.c b/mm/vmpressure.c > > index c5afd57..74f206b 100644 > > --- a/mm/vmpressure.c > > +++ b/mm/vmpressure.c > > @@ -38,7 +38,7 @@ > > * TODO: Make the window size depend on machine size, as we do for vmstat > > * thresholds. Currently we set it to 512 pages (2MB for 4KB pages). > > */ > > -static const unsigned long vmpressure_win = SWAP_CLUSTER_MAX * 16; > > +static const unsigned long vmpressure_win = SWAP_CLUSTER_MAX; > > Argh, Mel's patch sets SWAP_CLUSTER_MAX to 256, so this should be > SWAP_CLUSTER_MAX * 2 to retain the 512 pages scan window. > > Andrew could you please update this fix in-place? Otherwise I'll > resend a corrected version. > > Thanks, and sorry about that. I don't understand why "SWAP_CLUSTER_MAX * 2" is thought better than "512". Retaining a level of obscurity, that just bit us twice, is a good thing? Hugh