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.

sched/headers: Inline raw_spin_rq_unlock()

raw_spin_rq_unlock() is short, and is called in some hot code paths
such as finish_lock_switch().

Inline raw_spin_rq_unlock() to micro-optimize performance a bit.

Signed-off-by: Xie Yuanbin <qq570070308@gmail.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://patch.msgid.link/20260216164950.147617-3-qq570070308@gmail.com

authored by

Xie Yuanbin and committed by
Ingo Molnar
54a66e43 4b9ef32c

+6 -8
-5
kernel/sched/core.c
··· 687 687 } 688 688 } 689 689 690 - void raw_spin_rq_unlock(struct rq *rq) 691 - { 692 - raw_spin_unlock(rq_lockp(rq)); 693 - } 694 - 695 690 /* 696 691 * double_rq_lock - safely lock two runqueues 697 692 */
+6 -3
kernel/sched/sched.h
··· 1607 1607 extern bool raw_spin_rq_trylock(struct rq *rq) 1608 1608 __cond_acquires(true, __rq_lockp(rq)); 1609 1609 1610 - extern void raw_spin_rq_unlock(struct rq *rq) 1611 - __releases(__rq_lockp(rq)); 1612 - 1613 1610 static inline void raw_spin_rq_lock(struct rq *rq) 1614 1611 __acquires(__rq_lockp(rq)) 1615 1612 { 1616 1613 raw_spin_rq_lock_nested(rq, 0); 1614 + } 1615 + 1616 + static inline void raw_spin_rq_unlock(struct rq *rq) 1617 + __releases(__rq_lockp(rq)) 1618 + { 1619 + raw_spin_unlock(rq_lockp(rq)); 1617 1620 } 1618 1621 1619 1622 static inline void raw_spin_rq_lock_irq(struct rq *rq)