Certain applications cause a lot of IPI noise due to them constantlydoing open/close on /dev/cdrom. hald is a particularly annoying caseof this. However since every distribution insists on shipping it, it'sone of those that are hard to get rid of :(

Anyway, this patch reduces the IPI noise by keeping a cpumask of CPUswhich have items in the bh lru and only flushing on the relevantCPUs. On systems with larger CPU counts it's quite normal that only afew CPUs are actively doing block IO, so spewing IPIs everywhere toflush this is unnecessary.

I also switched the code to use schedule_on_each_cpu() as suggested byAndrew, and I made the API there more flexible by introducingschedule_on_each_cpu_mask().

Cheers,Jes

Introduce more flexible schedule_on_each_cpu_mask() API allowing oneto specify a CPU mask to schedule on and implementschedule_on_each_cpu_mask() on top of it.

Use a cpumask to keep track of which CPUs have items in the per CPUbuffer_head lru. Let invalidate_bh_lrus() use the new cpumask API tolimit the number of cross-CPU calls when a block device isopen/closed.

This significantly reduces IPI noise on large CPU number systems whichare running hald.