On Fri, Sep 12, 2025 at 02:24:26PM -0700, Alexei Starovoitov wrote: > On Fri, Sep 12, 2025 at 2:03 PM Suren Baghdasaryan <surenb@xxxxxxxxxx> wrote: > > > > On Fri, Sep 12, 2025 at 12:27 PM Shakeel Butt <shakeel.butt@xxxxxxxxx> wrote: > > > > > > +Suren, Roman > > > > > > On Mon, Sep 08, 2025 at 06:00:06PM -0700, Alexei Starovoitov wrote: > > > > From: Alexei Starovoitov <ast@xxxxxxxxxx> > > > > > > > > Since the combination of valid upper bits in slab->obj_exts with > > > > OBJEXTS_ALLOC_FAIL bit can never happen, > > > > use OBJEXTS_ALLOC_FAIL == (1ull << 0) as a magic sentinel > > > > instead of (1ull << 2) to free up bit 2. > > > > > > > > Signed-off-by: Alexei Starovoitov <ast@xxxxxxxxxx> > > > > > > Are we low on bits that we need to do this or is this good to have > > > optimization but not required? > > > > That's a good question. After this change MEMCG_DATA_OBJEXTS and > > OBJEXTS_ALLOC_FAIL will have the same value and they are used with the > > same field (page->memcg_data and slab->obj_exts are aliases). Even if > > page_memcg_data_flags can never be used for slab pages I think > > overlapping these bits is not a good idea and creates additional > > risks. Unless there is a good reason to do this I would advise against > > it. > > Completely disagree. You both missed the long discussion > during v4. The other alternative was to increase alignment > and waste memory. Saving the bit is obviously cleaner. > The next patch is using the saved bit. I will check out that discussion and it would be good to summarize that in the commit message.