]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] HOTPLUG_CPU: avoid hitting too many cachelines in recalc_bh_state()
authorEric Dumazet <dada1@cosmosbay.com>
Fri, 24 Mar 2006 11:18:10 +0000 (03:18 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Fri, 24 Mar 2006 15:33:26 +0000 (07:33 -0800)
commit78054730e5670ea93cb3652cf832922c5c11e385
tree332265cb9fe8b1e107864cdb380bf5f6b4bfb840
parenta6cf2beae0bb1768ac14bf90aa01023f31033d67
[PATCH] HOTPLUG_CPU: avoid hitting too many cachelines in recalc_bh_state()

Instead of using for_each_cpu(i), we can use for_each_online_cpu(i).

When a CPU goes offline (ie removed from online map), it might have a non
null bh_accounting.nr, so this patch adds a transfer of this counter to an
online CPU counter.

We already have a hotcpu_notifier, (function buffer_cpu_notify()), where we
can do this bh_accounting.

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
fs/buffer.c