[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <60ffc506-236c-faf7-ba64-5d853d3a67e7@suse.cz>
Date: Tue, 5 Oct 2021 11:16:05 +0200
From: Vlastimil Babka <vbabka@...e.cz>
To: Mel Gorman <mgorman@...e.de>, NeilBrown <neilb@...e.de>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Theodore Ts'o <tytso@....edu>,
Andreas Dilger <adilger.kernel@...ger.ca>,
"Darrick J. Wong" <djwong@...nel.org>,
Matthew Wilcox <willy@...radead.org>,
Michal Hocko <mhocko@...e.com>,
Jesper Dangaard Brouer <jbrouer@...hat.com>,
". Dave Chinner" <david@...morbit.com>,
Jonathan Corbet <corbet@....net>, linux-xfs@...r.kernel.org,
linux-ext4@...r.kernel.org, linux-fsdevel@...r.kernel.org,
linux-nfs@...r.kernel.org, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, linux-doc@...r.kernel.org
Subject: Re: [PATCH 1/6] MM: Support __GFP_NOFAIL in alloc_pages_bulk_*() and
improve doco
On 9/17/21 16:42, Mel Gorman wrote:
> I'm top-posting to cc Jesper with full context of the patch. I don't
> have a problem with this patch other than the Fixes: being a bit
> marginal, I should have acked as Mel Gorman <mgorman@...e.de> and the
> @gfp in the comment should have been @gfp_mask.
>
> However, an assumption the API design made was that it should fail fast
> if memory is not quickly available but have at least one page in the
> array. I don't think the network use case cares about the situation where
> the array is already populated but I'd like Jesper to have the opportunity
> to think about it. It's possible he would prefer it's explicit and the
> check becomes
> (!nr_populated || ((gfp_mask & __GFP_NOFAIL) && !nr_account)) to
Note that AFAICS nr_populated is an incomplete piece of information, as we
initially only count pages in the page_array as nr_populated up to the first
NULL pointer. So even before Neil's patch we could decide to allocate even
if there are pre-existing pages, but placed later in the array. Which could
be rather common if the array consumer starts from index 0? So with Neil's
patch this at least becomes consistent, while the check suggested by Mel
leaves there the weird dependency on where pre-existing pages appear in the
page_array.
Powered by blists - more mailing lists