Re: [3/10 PATCH] inline wake_up_bit

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

 



On Wednesday 25 June 2008 18:01, Mikulas Patocka wrote:
> > Ingo's suggestion to talk to gcc people to remedy
> > insane call convention sounds as a more workable solution.
> >
> > BTW, i386 uses regparm call convention, is similar trick
> > possible for sparc64?
> 
> Sparc64 has register windows: it passes arguments in registers, but it 
> must allocate space for that registers. If the call stack is too deep (8 
> levels), the CPU runs out of registers and starts spilling the registers 
> of the function 8-levels-deep to the stack.
> 
> The stack usage could be reduced to 176 bytes with little work from gcc 
> developers and to 128 bytes with more work (ABI change). If you wanted to 

Wow, it's nearly x2 reduction.

ABI change in not a problem for kernel, since it is a "freestanding
application". Exactly like i386 switched to regparm, which is a different ABI.

> go below 128 bytes, you could use one register to indicate number of used 
> registers and modify the spill/fill handlers to load only that number of 
> registers and reduce the stack usage even more --- that would be a big 
> code change in both gcc and linux.
--
vda
--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Development]     [DCCP]     [Linux ARM Development]     [Linux]     [Photo]     [Yosemite Help]     [Linux ARM Kernel]     [Linux SCSI]     [Linux x86_64]     [Linux Hams]

  Powered by Linux