Messages in this thread | | | Date | Wed, 21 Feb 2024 23:19:43 +0100 | Subject | Re: [PATCH 2/3] mm, slab: use an enum to define SLAB_ cache creation flags | From | Vlastimil Babka <> |
| |
On 2/20/24 17:58, Vlastimil Babka wrote: > @@ -156,9 +195,9 @@ > /* The following flags affect the page allocator grouping pages by mobility */ > /* Objects are reclaimable */ > #ifndef CONFIG_SLUB_TINY > -#define SLAB_RECLAIM_ACCOUNT ((slab_flags_t __force)0x00020000U) > +#define SLAB_RECLAIM_ACCOUNT __SF_BIT(_SLAB_RECLAIM_ACCOUNT) > #else > -#define SLAB_RECLAIM_ACCOUNT ((slab_flags_t __force)0) > +#define SLAB_RECLAIM_ACCOUNT 0
lkp/sparse tells me this was the wrong way to unify all noop-due-to-config flags [1,2]
so in v2 I'll unify all those to ((slab_flags_t __force)0U)
also the deprecated SLAB_MEM_SPREAD in patch 1
[1] https://lore.kernel.org/all/202402212310.KPtSDrRy-lkp@intel.com/ [2] https://lore.kernel.org/all/202402211803.Lmf1ANXx-lkp@intel.com/
> #endif > #define SLAB_TEMPORARY SLAB_RECLAIM_ACCOUNT /* Objects are short-lived */
| |