[<prev] [next>] [day] [month] [year] [list]
Message-ID: <CAJuCfpE_=A3H+FKwHeu-XLX5rDCqrV8dUT40=EVm4w_q8A=EwQ@mail.gmail.com>
Date: Mon, 26 Feb 2024 08:09:40 -0800
From: Suren Baghdasaryan <surenb@...gle.com>
To: Pasha Tatashin <pasha.tatashin@...een.com>
Cc: Vlastimil Babka <vbabka@...e.cz>, Andrew Morton <akpm@...ux-foundation.org>,
Kent Overstreet <kent.overstreet@...ux.dev>, Michal Hocko <mhocko@...e.com>,
Johannes Weiner <hannes@...xchg.org>, Roman Gushchin <roman.gushchin@...ux.dev>,
Mel Gorman <mgorman@...e.de>, dave@...olabs.net, Matthew Wilcox <willy@...radead.org>,
"Liam R. Howlett" <liam.howlett@...cle.com>, Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>,
Jonathan Corbet <corbet@....net>, void@...ifault.com, Peter Zijlstra <peterz@...radead.org>,
Juri Lelli <juri.lelli@...hat.com>, Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will@...nel.org>, Arnd Bergmann <arnd@...db.de>, Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Dave Hansen <dave.hansen@...ux.intel.com>,
"maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" <x86@...nel.org>, Peter Xu <peterx@...hat.com>, David Hildenbrand <david@...hat.com>,
Jens Axboe <axboe@...nel.dk>, mcgrof@...nel.org, Masahiro Yamada <masahiroy@...nel.org>,
Nathan Chancellor <nathan@...nel.org>, dennis@...nel.org, Tejun Heo <tj@...nel.org>,
Muchun Song <muchun.song@...ux.dev>, Mike Rapoport <rppt@...nel.org>, paulmck@...nel.org,
Yosry Ahmed <yosryahmed@...gle.com>, Yu Zhao <yuzhao@...gle.com>, dhowells@...hat.com,
Hugh Dickins <hughd@...gle.com>, andreyknvl@...il.com, Kees Cook <keescook@...omium.org>,
ndesaulniers@...gle.com, vvvvvv@...gle.com,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>, ebiggers@...gle.com, ytcoode@...il.com,
vincent.guittot@...aro.org, dietmar.eggemann@....com,
Steven Rostedt <rostedt@...dmis.org>, bsegall@...gle.com, bristot@...hat.com,
vschneid@...hat.com, Christoph Lameter <cl@...ux.com>, Pekka Enberg <penberg@...nel.org>,
Joonsoo Kim <iamjoonsoo.kim@....com>, Hyeonggon Yoo <42.hyeyoo@...il.com>,
Alexander Potapenko <glider@...gle.com>, elver@...gle.com, dvyukov@...gle.com,
Shakeel Butt <shakeelb@...gle.com>, Muchun Song <songmuchun@...edance.com>, jbaron@...mai.com,
David Rientjes <rientjes@...gle.com>, minchan@...gle.com, kaleshsingh@...gle.com,
kernel-team@...roid.com, Linux Doc Mailing List <linux-doc@...r.kernel.org>,
LKML <linux-kernel@...r.kernel.org>, iommu@...ts.linux.dev,
"open list:GENERIC INCLUDE/ASM HEADER FILES" <linux-arch@...r.kernel.org>, linux-fsdevel <linux-fsdevel@...r.kernel.org>,
linux-mm <linux-mm@...ck.org>, linux-modules@...r.kernel.org,
kasan-dev@...glegroups.com, cgroups@...r.kernel.org
Subject: Re: [PATCH v4 03/36] mm/slub: Mark slab_free_freelist_hook() __always_inline
On Mon, Feb 26, 2024 at 7:21 AM Pasha Tatashin
<pasha.tatashin@...een.com> wrote:
>
>
>
> On Mon, Feb 26, 2024, 9:31 AM Vlastimil Babka <vbabka@...e.cz> wrote:
>>
>> On 2/24/24 03:02, Suren Baghdasaryan wrote:
>> > On Wed, Feb 21, 2024 at 1:16 PM Pasha Tatashin
>> > <pasha.tatashin@...een.com> wrote:
>> >>
>> >> On Wed, Feb 21, 2024 at 2:41 PM Suren Baghdasaryan <surenb@...gle.com> wrote:
>> >> >
>> >> > From: Kent Overstreet <kent.overstreet@...ux.dev>
>> >> >
>> >> > It seems we need to be more forceful with the compiler on this one.
>> >> > This is done for performance reasons only.
>> >> >
>> >> > Signed-off-by: Kent Overstreet <kent.overstreet@...ux.dev>
>> >> > Signed-off-by: Suren Baghdasaryan <surenb@...gle.com>
>> >> > Reviewed-by: Kees Cook <keescook@...omium.org>
>> >> > ---
>> >> > mm/slub.c | 2 +-
>> >> > 1 file changed, 1 insertion(+), 1 deletion(-)
>> >> >
>> >> > diff --git a/mm/slub.c b/mm/slub.c
>> >> > index 2ef88bbf56a3..d31b03a8d9d5 100644
>> >> > --- a/mm/slub.c
>> >> > +++ b/mm/slub.c
>> >> > @@ -2121,7 +2121,7 @@ bool slab_free_hook(struct kmem_cache *s, void *x, bool init)
>> >> > return !kasan_slab_free(s, x, init);
>> >> > }
>> >> >
>> >> > -static inline bool slab_free_freelist_hook(struct kmem_cache *s,
>> >> > +static __always_inline bool slab_free_freelist_hook(struct kmem_cache *s,
>> >>
>> >> __fastpath_inline seems to me more appropriate here. It prioritizes
>> >> memory vs performance.
>> >
>> > Hmm. AFAIKT this function is used only in one place and we do not add
>> > any additional users, so I don't think changing to __fastpath_inline
>> > here would gain us anything.
>
>
> For consistency __fastpath_inline makes more sense, but I am ok with or without this change.
Ok, I'll update in the next revision. Thanks!
>
> Reviewed-by: Pasha Tatashin <pasha.tatashin@...een.com>
>
>>
>> It would have been more future-proof and self-documenting. But I don't insist.
>>
>> Reviewed-by: Vlastimil Babka <vbabka@...e.cz>
>>
>> >>
>> >> > void **head, void **tail,
>> >> > int *cnt)
>> >> > {
>> >> > --
>> >> > 2.44.0.rc0.258.g7320e95886-goog
>> >> >
>>
Powered by blists - more mailing lists