From: Vlastimil Babka <vbabka@suse.cz>
To: kernel test robot <oliver.sang@intel.com>
Cc: oe-lkp@lists.linux.dev, lkp@intel.com, linux-mm@kvack.org
Subject: Re: [vbabka:b4/sheaves-for-all] [slab] de840681a1: BUG:using_smp_processor_id()in_preemptible
Date: Thu, 16 Oct 2025 19:26:24 +0200 [thread overview]
Message-ID: <1ff90274-bc74-458a-8c73-7ac8d45e6198@suse.cz> (raw)
In-Reply-To: <202510161416.b7adda58-lkp@intel.com>
On 10/16/25 08:08, kernel test robot wrote:
>
>
> Hello,
>
> kernel test robot noticed "BUG:using_smp_processor_id()in_preemptible" on:
>
> commit: de840681a162e0a5a0862e7a0b495fb34deab7ef ("slab: remove cpu (partial) slabs usage from allocation paths")
> https://git.kernel.org/cgit/linux/kernel/git/vbabka/linux.git b4/sheaves-for-all
>
> in testcase: boot
>
> config: i386-randconfig-002-20251015
> compiler: gcc-14
> test machine: qemu-system-x86_64 -enable-kvm -cpu SandyBridge -smp 2 -m 16G
>
> (please refer to attached dmesg/kmsg for entire log/backtrace)
>
>
>
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <oliver.sang@intel.com>
> | Closes: https://lore.kernel.org/oe-lkp/202510161416.b7adda58-lkp@intel.com
>
Thanks, no more disabled preemption so use the raw version as we don't
need it to be stable. Will fold this in:
----8<----
diff --git a/mm/slub.c b/mm/slub.c
index 91e1db412018..cd4b0833fb4a 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -1032,7 +1032,7 @@ static void set_track_update(struct kmem_cache *s, void *object,
p->handle = handle;
#endif
p->addr = addr;
- p->cpu = smp_processor_id();
+ p->cpu = raw_smp_processor_id();
p->pid = current->pid;
p->when = jiffies;
}
@@ -4481,16 +4481,8 @@ static void *___slab_alloc(struct kmem_cache *s, gfp_t gfpflags, int node,
pc.orig_size = orig_size;
freelist = get_partial(s, node, &pc);
if (freelist) {
- /*
- * TODO: check if still applicable
- *
- * Due to disabled preemption we need to disallow
- * blocking. The flags are further adjusted by
- * gfp_nested_mask() in stack_depot itself.
- */
if (kmem_cache_debug_flags(s, SLAB_STORE_USER))
- set_track(s, freelist, TRACK_ALLOC, addr,
- gfpflags & ~(__GFP_DIRECT_RECLAIM));
+ set_track(s, freelist, TRACK_ALLOC, addr, gfpflags);
return freelist;
}
@@ -4515,8 +4507,7 @@ static void *___slab_alloc(struct kmem_cache *s, gfp_t gfpflags, int node,
goto new_objects;
if (kmem_cache_debug_flags(s, SLAB_STORE_USER))
- set_track(s, freelist, TRACK_ALLOC, addr,
- gfpflags & ~(__GFP_DIRECT_RECLAIM));
+ set_track(s, freelist, TRACK_ALLOC, addr, gfpflags);
return freelist;
}
lines 1-41/41 (END)
prev parent reply other threads:[~2025-10-16 17:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-16 6:08 kernel test robot
2025-10-16 17:26 ` Vlastimil Babka [this message]
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=1ff90274-bc74-458a-8c73-7ac8d45e6198@suse.cz \
--to=vbabka@suse.cz \
--cc=linux-mm@kvack.org \
--cc=lkp@intel.com \
--cc=oe-lkp@lists.linux.dev \
--cc=oliver.sang@intel.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