[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z-7mXukKN1eB_AQx@tiehlicka>
Date: Thu, 3 Apr 2025 21:49:50 +0200
From: Michal Hocko <mhocko@...e.com>
To: Kees Cook <kees@...nel.org>
Cc: Shakeel Butt <shakeel.butt@...ux.dev>,
Dave Chinner <david@...morbit.com>,
Yafang Shao <laoar.shao@...il.com>,
Harry Yoo <harry.yoo@...cle.com>, joel.granados@...nel.org,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
Josef Bacik <josef@...icpanda.com>, linux-mm@...ck.org,
Vlastimil Babka <vbabka@...e.cz>
Subject: Re: [PATCH] mm: kvmalloc: make kmalloc fast path real fast path
On Thu 03-04-25 09:21:50, Kees Cook wrote:
> On Thu, Apr 03, 2025 at 09:43:39AM +0200, Michal Hocko wrote:
[...]
> > mm/slub.c | 8 +++++---
> > 1 file changed, 5 insertions(+), 3 deletions(-)
> >
> > diff --git a/mm/slub.c b/mm/slub.c
> > index b46f87662e71..2da40c2f6478 100644
> > --- a/mm/slub.c
> > +++ b/mm/slub.c
> > @@ -4972,14 +4972,16 @@ static gfp_t kmalloc_gfp_adjust(gfp_t flags, size_t size)
> > * We want to attempt a large physically contiguous block first because
> > * it is less likely to fragment multiple larger blocks and therefore
> > * contribute to a long term fragmentation less than vmalloc fallback.
> > - * However make sure that larger requests are not too disruptive - no
> > - * OOM killer and no allocation failure warnings as we have a fallback.
> > + * However make sure that larger requests are not too disruptive - i.e.
> > + * do not direct reclaim unless physically continuous memory is preferred
> > + * (__GFP_RETRY_MAYFAIL mode). We still kick in kswapd/kcompactd to start
> > + * working in the background but the allocation itself.
>
> I think a word is missing here? "...but do the allocation..." or
> "...allocation itself happens" ?
Thinking about this some more I would just cut this short and go with
"We still kick in kswapd/kcompactd to start working in the background"
Does that sound better?
--
Michal Hocko
SUSE Labs
Powered by blists - more mailing lists