Thread (33 messages) 33 messages, 7 authors, 2011-10-02

Re: [PATCH 5/5] slub: Only IPI CPUs that have per cpu obj to flush

From: Gilad Ben-Yossef <gilad@benyossef.com>
Date: 2011-09-26 08:07:47
Also in: lkml

Hi,

On Mon, Sep 26, 2011 at 10:36 AM, Peter Zijlstra [off-list ref] wrote:
On Mon, 2011-09-26 at 09:54 +0300, Pekka Enberg wrote:
quoted
AFAICT, flush_all() isn't all that performance sensitive. Why do we
want to reduce IPIs here?
Because it can wake up otherwise idle CPUs, wasting power. Or for the
case I care more about, unnecessarily perturb a CPU that didn't actually
have anything to flush but was running something, introducing jitter.

on_each_cpu() things are bad when you have a ton of CPUs (which is
pretty normal these days).

Peter basically already answered better then I could :-)

All I have to add is an example -

flush_all() is called for each kmem_cahce_destroy(). So every cache
being destroyed dynamically ends up sending an IPI to each CPU in the
system, regardless if the cache has ever been used there.

For example, if you close the Infinband ipath driver char device file,
the close file ops calls kmem_cache_destroy().So, if I understand
correctly, running some infiniband config tool on one a single CPU
dedicated to system tasks might interrupt the rest of the 127 CPUs I
dedicated to some CPU intensive task. This is the scenario I'm
tryingto avoid.

I suspect there is a good chance that every line in the output of "git
grep kmem_cache_destroy linux/ | grep '\->'" has a similar scenario
(there are 42 of them).

I hope this sheds some light on the motive of the work.

Thanks!
Gilad
-- 
Gilad Ben-Yossef
Chief Coffee Drinker
gilad@benyossef.com
Israel Cell: +972-52-8260388
US Cell: +1-973-8260388
http://benyossef.com

"I've seen things you people wouldn't believe. Goto statements used to
implement co-routines. I watched C structures being stored in
registers. All those moments will be lost in time... like tears in
rain... Time to die. "

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help