]> asedeno.scripts.mit.edu Git - linux.git/commit
rcu: Make TINY_RCU tinier by putting error checks under #ifdef
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Thu, 31 Jul 2014 23:02:33 +0000 (16:02 -0700)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Sun, 7 Sep 2014 23:18:18 +0000 (16:18 -0700)
commitade9862470dd0595d8e292ecea8445ed90b98df5
tree0870ea411c65d9ff102dbc896ee0c69fa9787b0d
parent9fdd3bc9005824704f9802bec7b3e06f5edae434
rcu: Make TINY_RCU tinier by putting error checks under #ifdef

The rcu_idle_enter_common() and rcu_idle_exit_common() functions contain
error checks that have to the best of my knowledge have never triggered
over the past several years.  These are nevertheless valuable when
creating new architectures or doing other low-level changes, so the
checks should not be deleted.  This commit instead places these checks
under #ifdef CONFIG_RCU_TRACE so that they are executed only when
specifically requested.

The savings are significant:

Before:

   text    data     bss     dec     hex filename
   1749      39       0    1788     6fc /tmp/b/kernel/rcu/tiny.o
    632     152       0     784     310 /tmp/b/kernel/rcu/update.o
   ----
   2572

After:

   text    data     bss     dec     hex filename
   1281      37       0    1318     526 /tmp/b/kernel/rcu/tiny.o
    632     152       0     784     310 /tmp/b/kernel/rcu/update.o
   ----
   2102

This amounts to 470 bytes, or 18% of the original.

Switched from #ifdef to IS_ENABLED() on Josh Triplett's advice.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
kernel/rcu/tiny.c