lkml.org 
[lkml]   [2005]   [Dec]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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?
\
 
 \ /
  Last update: 2005-12-22 18:59    [W:0.200 / U:0.488 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site