Messages in this thread Patch in this message | | | From | "Joel Fernandes (Google)" <> | Subject | [PATCH RFC 05/12] entry/idle: Enter and exit kernel protection during idle entry and exit | Date | Fri, 14 Aug 2020 23:19:01 -0400 |
| |
Make use of the generic_idle_{enter,exit} helper function added in earlier patches to enter and exit kernel protection.
On exiting idle, protection will be reenabled.
Signed-off-by: Joel Fernandes (Google) <joel@joelfernandes.org> --- include/linux/entry-common.h | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/include/linux/entry-common.h b/include/linux/entry-common.h index 2ea0e09b00d5..c833f2fda542 100644 --- a/include/linux/entry-common.h +++ b/include/linux/entry-common.h @@ -374,6 +374,9 @@ void noinstr irqentry_exit(struct pt_regs *regs, irqentry_state_t state); */ static inline void generic_idle_enter(void) { + /* Entering idle ends the protected kernel region. */ + sched_core_unsafe_exit(); + rcu_idle_enter(); } @@ -383,6 +386,9 @@ static inline void generic_idle_enter(void) static inline void generic_idle_exit(void) { rcu_idle_exit(); + + /* Exiting idle (re)starts the protected kernel region. */ + sched_core_unsafe_enter(); } #endif -- 2.28.0.220.ged08abb693-goog
| |