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

rcu: Eliminate unused APIs intended for adaptive ticks

The rcu_user_enter_after_irq() and rcu_user_exit_after_irq()
functions were intended for use by adaptive ticks, but changes
in implementation have rendered them unnecessary. This commit
therefore removes them.

Reported-by: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>

-47
-4
include/linux/rcupdate.h
··· 229 229 #ifdef CONFIG_RCU_USER_QS 230 230 extern void rcu_user_enter(void); 231 231 extern void rcu_user_exit(void); 232 - extern void rcu_user_enter_after_irq(void); 233 - extern void rcu_user_exit_after_irq(void); 234 232 #else 235 233 static inline void rcu_user_enter(void) { } 236 234 static inline void rcu_user_exit(void) { } 237 - static inline void rcu_user_enter_after_irq(void) { } 238 - static inline void rcu_user_exit_after_irq(void) { } 239 235 static inline void rcu_user_hooks_switch(struct task_struct *prev, 240 236 struct task_struct *next) { } 241 237 #endif /* CONFIG_RCU_USER_QS */
-43
kernel/rcutree.c
··· 444 444 { 445 445 rcu_eqs_enter(1); 446 446 } 447 - 448 - /** 449 - * rcu_user_enter_after_irq - inform RCU that we are going to resume userspace 450 - * after the current irq returns. 451 - * 452 - * This is similar to rcu_user_enter() but in the context of a non-nesting 453 - * irq. After this call, RCU enters into idle mode when the interrupt 454 - * returns. 455 - */ 456 - void rcu_user_enter_after_irq(void) 457 - { 458 - unsigned long flags; 459 - struct rcu_dynticks *rdtp; 460 - 461 - local_irq_save(flags); 462 - rdtp = &__get_cpu_var(rcu_dynticks); 463 - /* Ensure this irq is interrupting a non-idle RCU state. */ 464 - WARN_ON_ONCE(!(rdtp->dynticks_nesting & DYNTICK_TASK_MASK)); 465 - rdtp->dynticks_nesting = 1; 466 - local_irq_restore(flags); 467 - } 468 447 #endif /* CONFIG_RCU_USER_QS */ 469 448 470 449 /** ··· 559 580 void rcu_user_exit(void) 560 581 { 561 582 rcu_eqs_exit(1); 562 - } 563 - 564 - /** 565 - * rcu_user_exit_after_irq - inform RCU that we won't resume to userspace 566 - * idle mode after the current non-nesting irq returns. 567 - * 568 - * This is similar to rcu_user_exit() but in the context of an irq. 569 - * This is called when the irq has interrupted a userspace RCU idle mode 570 - * context. When the current non-nesting interrupt returns after this call, 571 - * the CPU won't restore the RCU idle mode. 572 - */ 573 - void rcu_user_exit_after_irq(void) 574 - { 575 - unsigned long flags; 576 - struct rcu_dynticks *rdtp; 577 - 578 - local_irq_save(flags); 579 - rdtp = &__get_cpu_var(rcu_dynticks); 580 - /* Ensure we are interrupting an RCU idle mode. */ 581 - WARN_ON_ONCE(rdtp->dynticks_nesting & DYNTICK_TASK_NEST_MASK); 582 - rdtp->dynticks_nesting += DYNTICK_TASK_EXIT_IDLE; 583 - local_irq_restore(flags); 584 583 } 585 584 #endif /* CONFIG_RCU_USER_QS */ 586 585