Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp169540ybt; Tue, 30 Jun 2020 17:30:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyccr0WVq6ZHHJEJDE3XvBiVFj0eLznEaBOZ1ORIclJqHzVIHLcxnWCSBbf48VYqhHlSrOt X-Received: by 2002:a17:906:2a5b:: with SMTP id k27mr19916989eje.82.1593563451891; Tue, 30 Jun 2020 17:30:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593563451; cv=none; d=google.com; s=arc-20160816; b=epcv7UaKyiyI5HTCIYMr6+fTNwGcVIoSw0hUw8pXaZeD3Hh5h7H5+fztUXst5+PPwF o8+etquiKDDt86RK1zSPZY2sCiEiSvb9DMcdyG0P/ZL6314YI6VJrybFidgvm4mDae7k 2LC1U9XsfujL2yvlOQxCjuYYQJ0izLRwp5kYOLJ7DKvRzVv5q0K+Ujc8bp2GMbY3xRQv BvgmsAQfWGf3p6AJxi5eXIShm3hIi7Zk4/JhH6AtCykmROmg0a83zmSVQKP21E7v/e9Q S+YkRj1RqZlbNyICLjIls5odkRIK/Gc+m2p2hHHJSZ+dCkRMcbP8HLFGJqE8PaucaTMv yV0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=IobV9+UR+0RkD8aHu54OcU4svI6Wo51yftF7l0rJGnw=; b=n3lQY1gYu76B0EE2E8YCwgWux8UcrmHkSdFA/ybGPsKol1EHyjgxXordgZjUIDUmkd X5rCzNj7KzMbV9j+uKkzmsYIZsEkWELzYyMzQFbitE8wh5tNGWu7+KqLiuepK+Ncm4pC lZ0ulAe5r+9yT9HyFM3+W4TZIaDXji500QcEgREAS2H8mkJYWdjmqeCxoPWPi+VjN8u8 YKbtrzsfCYkGoD6STPBYNo7yTPoUaEpKcX3P9EmVTENVVeyl2ar8/EtIfBKrhUjTPg7F 5c5iGJU11m4nCTR48MSVZxM3+JQ67EMGqTLRFL1kw/7rKTIT7TYYqM3QvUszNDLuHSN5 qLBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=adfbTt1J; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v13si2886481ejc.348.2020.06.30.17.30.29; Tue, 30 Jun 2020 17:30:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=adfbTt1J; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726076AbgGAA1Q (ORCPT + 99 others); Tue, 30 Jun 2020 20:27:16 -0400 Received: from mail.kernel.org ([198.145.29.99]:44292 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725930AbgGAA1P (ORCPT ); Tue, 30 Jun 2020 20:27:15 -0400 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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.