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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id B1DD2C433EF for ; Tue, 10 May 2022 22:45:23 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 2A0B16B0071; Tue, 10 May 2022 18:45:23 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 24F596B0072; Tue, 10 May 2022 18:45:23 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0FF136B0073; Tue, 10 May 2022 18:45:23 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id F1A696B0071 for ; Tue, 10 May 2022 18:45:22 -0400 (EDT) Received: from smtpin27.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay13.hostedemail.com (Postfix) with ESMTP id BD60261AA3 for ; Tue, 10 May 2022 22:45:22 +0000 (UTC) X-FDA: 79451316084.27.DB6B569 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by imf07.hostedemail.com (Postfix) with ESMTP id 4183F4008C for ; Tue, 10 May 2022 22:45:16 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 07F6FB81C64; Tue, 10 May 2022 22:45:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 842DFC385CE; Tue, 10 May 2022 22:45:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1652222719; bh=l1vmJ0NFpJhLqoL8ubbQwXu5GhzaUzteA5eQtuoCjZc=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=rlDok8GeO8X7D2s4AQahhbSbp5+j7xQn3GIKrXsoo5bV94EUgsSI6+v2KYgijhbWq W88/OFU25lbZxW18Y4NFBXRsgqFEzNJNKJMNxigBjR5nhkwy1yTpawfkfwiIxTKuFP NNZ/3QoprUqTPXCOy/UcBBWGG/IsTkIJy85A2eOw= Date: Tue, 10 May 2022 15:45:18 -0700 From: Andrew Morton To: Matthew Wilcox Cc: Linus Torvalds , linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [GIT PULL] Two folio fixes for 5.18 Message-Id: <20220510154518.0410c1966c37cfa66cfeeab0@linux-foundation.org> In-Reply-To: References: <20220510151809.f06c7580af34221c16003264@linux-foundation.org> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4183F4008C X-Stat-Signature: zidkjk9d5hyphtpisafmqd8cz1ur5zje X-Rspam-User: Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=rlDok8Ge; spf=pass (imf07.hostedemail.com: domain of akpm@linux-foundation.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org; dmarc=none X-Rspamd-Server: rspam09 X-HE-Tag: 1652222716-657508 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 Tue, 10 May 2022 23:30:02 +0100 Matthew Wilcox wrote: > On Tue, May 10, 2022 at 03:18:09PM -0700, Andrew Morton wrote: > > On Fri, 6 May 2022 00:43:18 +0100 Matthew Wilcox wrote: > > > > > - Fix readahead creating single-page folios instead of the intended > > > large folios when doing reads that are not a power of two in size. > > > > I worry about the idea of using hugepages in readahead. We're > > increasing the load on the hugepage allocator, which is already > > groaning under the load. > > Well, hang on. We're not using the hugepage allocator, we're using > the page allocator. We're also using variable order pages, not > necessarily PMD_ORDER. Ah, OK, misapprehended. I guess there remains a fragmentation risk. > I was under the impression that we were > using GFP_TRANSHUGE_LIGHT, but I now don't see that. So that might > be something that needs to be changed. > > > The obvious risk is that handing out hugepages to a low-value consumer > > (copying around pagecache which is only ever accessed via the direct > > map) will deny their availability to high-value consumers (that > > compute-intensive task against a large dataset). > > > > Has testing and instrumentation been used to demonstrate that this is > > not actually going to be a problem, or are we at risk of getting > > unhappy reports? > > It's hard to demonstrate that it's definitely not going to cause a > problem. But I actually believe it will help; by keeping page cache > memory in larger chunks, we make it easier to defrag memory and create > PMD-order pages when they're needed. Obviously it'll be very workload-dependent.