Re: What is meant by fastpath and slowpath function in linux kernel?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 5/3/06, Arjan van de Ven <arjan@xxxxxxxxxxxxx> wrote:

>          tweak every last cycle out of it.
>
> how does the compiler handle this. whether it creates a special
> assembly instruction or what? I am not getting what is meant by fast
> and slow when we are executing the function.
>
> I had checked the fastcall. It is macro having the following
> definition.
>
> #define fastcall __attribute__((regparm(3)))

this is technically not related to fastpath/slowpath...

(but it changes how functions are called, or rather, it used to.
Nowadays this is actually the default for the kernel)



Hi Arjan,

I found following explantation related regparm.

http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html#Function-Attributes

regparm (number)

On the Intel 386, the regparm attribute causes the compiler to pass arguments number one to number if they are of integral type in registers EAX, EDX, and ECX instead of on the stack. Functions that take a variable number of arguments will continue to be passed all of their arguments on the stack.

Does this means whenever function is called wehether the function parameters are pushed into register instead of stack?



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux