Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

debugobjects: Allow to refill the pool before SYSTEM_SCHEDULING

The pool of free objects is refilled on several occasions such as object
initialisation. On PREEMPT_RT refilling is limited to preemptible
sections due to sleeping locks used by the memory allocator. The system
boots with disabled interrupts so the pool can not be refilled.

If too many objects are initialized and the pool gets empty then
debugobjects disables itself.

Refiling can also happen early in the boot with disabled interrupts as
long as the scheduler is not operational. If the scheduler can not
preempt a task then a sleeping lock can not be contended.

Allow to additionally refill the pool if the scheduler is not
operational.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://patch.msgid.link/20251127153652.291697-2-bigeasy@linutronix.de

authored by

Sebastian Andrzej Siewior and committed by
Thomas Gleixner
06e0ae98 ac3fd01e

+1 -1
+1 -1
lib/debugobjects.c
··· 714 714 * raw_spinlock_t are basically the same type and this lock-type 715 715 * inversion works just fine. 716 716 */ 717 - if (!IS_ENABLED(CONFIG_PREEMPT_RT) || preemptible()) { 717 + if (!IS_ENABLED(CONFIG_PREEMPT_RT) || preemptible() || system_state < SYSTEM_SCHEDULING) { 718 718 /* 719 719 * Annotate away the spinlock_t inside raw_spinlock_t warning 720 720 * by temporarily raising the wait-type to WAIT_SLEEP, matching