From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 63ED9C433E0 for ; Wed, 1 Jul 2020 00:27:18 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 2933720781 for ; Wed, 1 Jul 2020 00:27:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="adfbTt1J" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2933720781 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 9E7616B0085; Tue, 30 Jun 2020 20:27:17 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 972736B0088; Tue, 30 Jun 2020 20:27:17 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 83C706B0096; Tue, 30 Jun 2020 20:27:17 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0178.hostedemail.com [216.40.44.178]) by kanga.kvack.org (Postfix) with ESMTP id 6A2486B0085 for ; Tue, 30 Jun 2020 20:27:17 -0400 (EDT) Received: from smtpin19.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id E977A181AC9CB for ; Wed, 1 Jul 2020 00:27:16 +0000 (UTC) X-FDA: 76987617672.19.drug32_4b0b3e726e7c Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin19.hostedemail.com (Postfix) with ESMTP id B6A291AD1B4 for ; Wed, 1 Jul 2020 00:27:16 +0000 (UTC) X-HE-Tag: drug32_4b0b3e726e7c X-Filterd-Recvd-Size: 3022 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf13.hostedemail.com (Postfix) with ESMTP for ; Wed, 1 Jul 2020 00:27:16 +0000 (UTC) Received: from X1 (071-093-078-081.res.spectrum.com [71.93.78.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id AF28D20771; Wed, 1 Jul 2020 00:27:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1593563235; bh=s51hg7DVq4LITz9OJ0nBaJQcRxH37RA3OJVW6egZ62c=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=adfbTt1JnkZmsaJpyxYWFFC5TwNnaUvfrvC/ABvv5qMkUC4i7a3g1wvXmJFM5qlp7 qArBvp0Mu8FyTup6cc60fTTKzi3+HSd9ZNxhMZwg2AQEzIHKh4tHYpXvQ1djrqF/s7 UqtRysuPnKOuUz5MTb8NTphpaFd/iZk0KRtRHYO4= Date: Tue, 30 Jun 2020 17:27:13 -0700 From: Andrew Morton To: Tim Chen Cc: Matthew Wilcox , Vladimir Davydov , Johannes Weiner , Michal Hocko , Dave Hansen , Ying Huang , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [Patch] mm: Increase pagevec size on large system Message-Id: <20200630172713.496590a923744c0e0160d36b@linux-foundation.org> In-Reply-To: <6260c66e-68a3-ab3e-4bd9-4a290d068e1f@linux.intel.com> References: <20200627031304.GC25039@casper.infradead.org> <20200626204704.f023988699421db00e9bdab7@linux-foundation.org> <6260c66e-68a3-ab3e-4bd9-4a290d068e1f@linux.intel.com> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.32; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: B6A291AD1B4 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam04 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Mon, 29 Jun 2020 09:57:42 -0700 Tim Chen wrote: > > > I am okay with Matthew's suggestion of keeping the stack pagevec size unchanged. > Andrew, do you have a preference? > > I was assuming that for people who really care about saving the kernel memory > usage, they would make CONFIG_NR_CPUS small. I also have a hard time coming > up with a better scheme. > > Otherwise, we will have to adjust the pagevec size when we actually > found out how many CPUs we have brought online. It seems like a lot > of added complexity for going that route. Even if we were to do this, the worst-case stack usage on the largest systems might be an issue. If it isn't then we might as well hard-wire it to 31 elements anyway, I dunno. An extra 128 bytes of stack doesn't sound toooo bad, and the performance benefit is significant. Perhaps we just go with the original patch. If there are any on-stack pagevecs in the page reclaim path then perhaps we could create a new mini-pagevec for just those. or look at simply removing the pagevec optimization in there altogether.