Messages in this thread | | | Date | Thu, 22 Dec 2005 10:02:06 -0800 (PST) | From | Zwane Mwaikambo <> | Subject | Re: [PATCH RT 00/02] SLOB optimizations |
| |
On Wed, 21 Dec 2005, Eric Dumazet wrote:
> Ingo Molnar a écrit : > > * Eric Dumazet <dada1@cosmosbay.com> wrote: > > > > in any case, on sane platforms (i386, x86_64) an irq-disable is > > well-optimized in hardware, and is just as fast as a preempt_disable(). > > > > I'm afraid its not the case on current hardware. > > The irq enable/disable pair count for more than 50% the cpu time spent in > kmem_cache_alloc()/kmem_cache_free()/kfree() > > oprofile results on a dual Opteron 246 : > > You can see the high profile numbers right after cli and popf(sti) > instructions, popf being VERY expensive. > > CPU: Hammer, speed 1993.39 MHz (estimated) > Counted CPU_CLK_UNHALTED events (Cycles outside of halt state) with a unit > mask of 0x00 (No unit mask) count 50000 > > 29993 1.9317 kfree > 18654 1.2014 kmem_cache_alloc > 12962 0.8348 kmem_cache_free > > ffffffff8015c370 <kfree>: /* kfree total: 30334 1.9335 */ > 770 0.0491 :ffffffff8015c370: push %rbp > 2477 0.1579 :ffffffff8015c371: mov %rdi,%rbp > :ffffffff8015c374: push %rbx > :ffffffff8015c375: sub $0x8,%rsp > 1792 0.1142 :ffffffff8015c379: test %rdi,%rdi > :ffffffff8015c37c: je ffffffff8015c452 <kfree+0xe2> > 122 0.0078 :ffffffff8015c382: pushfq > 1001 0.0638 :ffffffff8015c383: popq (%rsp) > 1456 0.0928 :ffffffff8015c386: cli > 2489 0.1586 :ffffffff8015c387: mov $0xffffffff7fffffff,%rax << > > ... > 72 0.0046 :ffffffff8015c44e: pushq (%rsp) > 1080 0.0688 :ffffffff8015c451: popfq > 13934 0.8882 :ffffffff8015c452: add $0x8,%rsp << HERE >>
Isn't that due to taking an interrupt? | |