[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200610191543.18951.dada1@cosmosbay.com>
Date: Thu, 19 Oct 2006 15:43:18 +0200
From: Eric Dumazet <dada1@...mosbay.com>
To: Andrew Morton <akpm@...l.org>
Cc: Andi Kleen <ak@...e.de>, linux-kernel@...r.kernel.org
Subject: [PATCH] account_system_vtime() should be a macro, not a function
[PATCH] account_system_vtime() should be a macro, not a function
Because the way 'current' is implemented on some archs, it's better to use a
null macro for account_system_vtime(current)
I discovered that gcc was (correctly) issuing one useless instruction (to
load %rax with current from pda) on x86_64 on irq_enter() and __irq_exit()
This saves few bytes in kernel size, on archs where current is 'asm volatile'
Sample of asm code :
<smp_apic_timer_interrupt>:
...
callq <exit_idle>
mov %gs:0x0,%rax // useless load of pda.'pcurrent' into %rax
mov %gs:0x10,%rax
addl $0x10000,0xffffffffffffe044(%rax) //
add_preempt_count(HARDIRQ_OFFSET);
Signed-off-by: Eric Dumazet <dada1@...mosbay.com>
View attachment "account_system_vtime.patch" of type "text/plain" (479 bytes)
Powered by blists - more mailing lists