Re: [3/10 PATCH] inline wake_up_bit

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Mikulas Patocka
Date: Wednesday, June 25, 2008 - 9:01 am

>>> And you know what? This is likely not the end yet! It's possible

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 
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.

Mikulas

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[10 PATCHES] inline functions to avoid stack overflow, Mikulas Patocka, (Mon Jun 23, 10:54 pm)
[1/10 PATCH] inline __queue_work, Mikulas Patocka, (Mon Jun 23, 10:55 pm)
[2/10 PATCH] inline inline-generic_writepages.patch, Mikulas Patocka, (Mon Jun 23, 10:56 pm)
[3/10 PATCH] inline wake_up_bit, Mikulas Patocka, (Mon Jun 23, 10:57 pm)
[4/10 PATCH] inline __wake_up_bit, Mikulas Patocka, (Mon Jun 23, 10:57 pm)
[5/10 PATCH] inline __wake_up, Mikulas Patocka, (Mon Jun 23, 10:58 pm)
[6/10 PATCH] inline default_wake_function, Mikulas Patocka, (Mon Jun 23, 10:59 pm)
[6/10 PATCH] inline autoremove_wake_function, Mikulas Patocka, (Mon Jun 23, 10:59 pm)
[8/10 PATCH] inline filemap_fdatawrite, Mikulas Patocka, (Mon Jun 23, 11:01 pm)
[9/10 PATCH] inline dm-kcopyd-inline-wake.patch, Mikulas Patocka, (Mon Jun 23, 11:01 pm)
[10/10 PATCH] inline dispatch_job, Mikulas Patocka, (Mon Jun 23, 11:03 pm)
[PATCH] limit irq nesting, Mikulas Patocka, (Mon Jun 23, 11:06 pm)
Re: [3/10 PATCH] inline wake_up_bit, Denys Vlasenko, (Wed Jun 25, 7:17 am)
Re: [3/10 PATCH] inline wake_up_bit, Mikulas Patocka, (Wed Jun 25, 7:36 am)
Re: [3/10 PATCH] inline wake_up_bit, Denys Vlasenko, (Wed Jun 25, 8:24 am)
Re: [3/10 PATCH] inline wake_up_bit, Mikulas Patocka, (Wed Jun 25, 9:01 am)
Re: [3/10 PATCH] inline wake_up_bit, Denys Vlasenko, (Wed Jun 25, 1:37 pm)
Re: [3/10 PATCH] inline wake_up_bit, David Miller, (Wed Jun 25, 3:23 pm)
Re: [3/10 PATCH] inline wake_up_bit, David Miller, (Wed Jun 25, 3:30 pm)
Re: [3/10 PATCH] inline wake_up_bit, David Miller, (Wed Jun 25, 5:28 pm)
Re: [3/10 PATCH] inline wake_up_bit, Denys Vlasenko, (Wed Jun 25, 8:35 pm)
Re: [3/10 PATCH] inline wake_up_bit, David Miller, (Wed Jun 25, 9:18 pm)
Re: [3/10 PATCH] inline wake_up_bit, Pavel Machek, (Thu Jun 26, 11:22 am)