linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Vlastimil Babka <vbabka@suse.cz>
To: "Christoph Lameter (Ampere)" <cl@linux.com>
Cc: Pekka Enberg <penberg@kernel.org>,
	David Rientjes <rientjes@google.com>,
	Joonsoo Kim <iamjoonsoo.kim@lge.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Roman Gushchin <roman.gushchin@linux.dev>,
	Hyeonggon Yoo <42.hyeyoo@gmail.com>,
	Andrey Ryabinin <ryabinin.a.a@gmail.com>,
	Alexander Potapenko <glider@google.com>,
	Andrey Konovalov <andreyknvl@gmail.com>,
	Dmitry Vyukov <dvyukov@google.com>,
	Vincenzo Frascino <vincenzo.frascino@arm.com>,
	Zheng Yejian <zhengyejian1@huawei.com>,
	Xiongwei Song <xiongwei.song@windriver.com>,
	Chengming Zhou <chengming.zhou@linux.dev>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	kasan-dev@googlegroups.com
Subject: Re: [PATCH 2/3] mm, slab: use an enum to define SLAB_ cache creation flags
Date: Fri, 23 Feb 2024 17:43:31 +0100	[thread overview]
Message-ID: <7ff66c6a-4127-417b-a71f-a10ab47090b4@suse.cz> (raw)
In-Reply-To: <8bc31ec7-5d6e-b4c0-9d6e-42849673f35f@linux.com>

On 2/23/24 04:12, Christoph Lameter (Ampere) wrote:
> On Tue, 20 Feb 2024, Vlastimil Babka wrote:
> 
>> diff --git a/mm/slub.c b/mm/slub.c
>> index 2ef88bbf56a3..a93c5a17cbbb 100644
>> --- a/mm/slub.c
>> +++ b/mm/slub.c
>> @@ -306,13 +306,13 @@ static inline bool kmem_cache_has_cpu_partial(struct kmem_cache *s)
>>
>> /* Internal SLUB flags */
>> /* Poison object */
>> -#define __OBJECT_POISON		((slab_flags_t __force)0x80000000U)
>> +#define __OBJECT_POISON		__SF_BIT(_SLAB_OBJECT_POISON)
>> /* Use cmpxchg_double */
>>
>> #ifdef system_has_freelist_aba
>> -#define __CMPXCHG_DOUBLE	((slab_flags_t __force)0x40000000U)
>> +#define __CMPXCHG_DOUBLE	__SF_BIT(_SLAB_CMPXCHG_DOUBLE)
>> #else
>> -#define __CMPXCHG_DOUBLE	((slab_flags_t __force)0U)
>> +#define __CMPXCHG_DOUBLE	0
>> #endif
> 
> Maybe its good to put these internal flags together with the other flags. 
> After all there is no other slab allocator available anymore and having 
> them all together avoids confusion.

Good poiint, will do. Then I can also #undef the helper macro after the last
flag.





  reply	other threads:[~2024-02-23 16:43 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-20 16:58 [PATCH 0/3] cleanup of SLAB_ flags Vlastimil Babka
2024-02-20 16:58 ` [PATCH 1/3] mm, slab: deprecate SLAB_MEM_SPREAD flag Vlastimil Babka
2024-02-21  2:17   ` Song, Xiongwei
2024-02-21  7:11   ` Chengming Zhou
2024-02-21 18:30   ` Roman Gushchin
2024-02-22  1:10     ` Song, Xiongwei
2024-02-22  2:32       ` Chengming Zhou
2024-02-22  3:13         ` Song, Xiongwei
2024-02-23 16:41         ` Vlastimil Babka
2024-02-24  9:32           ` Chengming Zhou
2024-02-20 16:58 ` [PATCH 2/3] mm, slab: use an enum to define SLAB_ cache creation flags Vlastimil Babka
2024-02-21  2:23   ` Song, Xiongwei
2024-02-21  7:13   ` Chengming Zhou
2024-02-21 18:33   ` Roman Gushchin
2024-02-23 16:42     ` Vlastimil Babka
2024-02-21 22:19   ` Vlastimil Babka
2024-02-23  3:12   ` Christoph Lameter (Ampere)
2024-02-23 16:43     ` Vlastimil Babka [this message]
2024-02-23 17:06       ` Vlastimil Babka
2024-02-20 16:58 ` [PATCH 3/3] mm, slab, kasan: replace kasan_never_merge() with SLAB_NO_MERGE Vlastimil Babka
2024-02-21  2:25   ` Song, Xiongwei
2024-02-21  7:14   ` Chengming Zhou
2024-02-21 20:48   ` Andrey Konovalov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7ff66c6a-4127-417b-a71f-a10ab47090b4@suse.cz \
    --to=vbabka@suse.cz \
    --cc=42.hyeyoo@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=andreyknvl@gmail.com \
    --cc=chengming.zhou@linux.dev \
    --cc=cl@linux.com \
    --cc=dvyukov@google.com \
    --cc=glider@google.com \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=kasan-dev@googlegroups.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=penberg@kernel.org \
    --cc=rientjes@google.com \
    --cc=roman.gushchin@linux.dev \
    --cc=ryabinin.a.a@gmail.com \
    --cc=vincenzo.frascino@arm.com \
    --cc=xiongwei.song@windriver.com \
    --cc=zhengyejian1@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox