[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200825174257.5b48a5dd24b5e08a915b101e@linux-foundation.org>
Date: Tue, 25 Aug 2020 17:42:57 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Joonsoo Kim <js1304@...il.com>
Cc: Linux Memory Management List <linux-mm@...ck.org>,
LKML <linux-kernel@...r.kernel.org>,
Michal Hocko <mhocko@...nel.org>,
Vlastimil Babka <vbabka@...e.cz>,
"Aneesh Kumar K . V" <aneesh.kumar@...ux.ibm.com>,
kernel-team@....com, Joonsoo Kim <iamjoonsoo.kim@....com>
Subject: Re: [PATCH for v5.9] mm/page_alloc: handle a missing case for
memalloc_nocma_{save/restore} APIs
On Tue, 25 Aug 2020 14:34:32 +0900 Joonsoo Kim <js1304@...il.com> wrote:
> >
> > That's a bunch more code on a very hot path to serve an obscure feature
> > which has a single obscure callsite.
> >
> > Can we instead put the burden on that callsite rather than upon
> > everyone? For (dumb) example, teach __gup_longterm_locked() to put the
> > page back if it's CMA and go get another one?
>
> Hmm... Unfortunately, it cannot ensure that we eventually get the non-CMA page.
> I think that the only way to ensure it is to implement the
> functionality here. We can
> use 'unlikely' or 'static branch' to reduce the overhead for a really
> rare case but
> for now I have no idea how to completely remove the overhead.
Gee, there must be something? Provide the gup code with a special
entry point which takes the page straight from __rmqueue() and bypasses
the pcp lists?
Powered by blists - more mailing lists