Re: [PATCH] account_system_vtime() should be a macro, not a function

From: Andi Kleen
Date: Thu Oct 19 2006 - 09:46:38 EST


On Thursday 19 October 2006 15:43, Eric Dumazet wrote:
> [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'

I dropped the asm volatile on x86-64 some time ago. Perhaps it should
be dropped on the other architectures too. Then such hacks wouldn't
be needed anywhere.

-Andi
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/