Skip to contentSkip to conversation

2.5 - Another user stack size patch

PATCH David Mosberger 1 participant 1 message May 23, 2003

lore
Share & tools
lore
#0 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · Martin Hicks

Martin> I hope this user stack size patch is better.

It's better, yes.

Martin> This one places the RBS based on the max size of the stack. Martin> The max size of the user stack is 1TB.

vmareas may not cross region-boundaries. We set:

# define STACK_TOP	(0x6000000000000000UL + (1UL << (4*PAGE_SHIFT - 12)) - PAGE_SIZE)

so the hard limit on the stack size if (1UL << (4*PAGE_SHIFT - 12)) - PAGE_SIZE). I suggest we add:

# define MAX_USER_STACK_SIZE	(1UL << (4*PAGE_SHIFT - 12)) - PAGE_SIZE)
# define STACK_TOP		(0x6000000000000000UL + MAX_USER_STACK_SIZE)

I'm not sure it's a good idea to recalculate the RBS starting address everything IA64_RBS_BOT is used. I suspect we should add an rbs_bot member to the thread-data structure instead (similar to the start_stack member in the task_struct). Otherwise, I worry about getting inconsistencies when RLIMIT_STACK is changed after the bspstore value has been selected (no, there is probably no issue at the moment, but I bet it would come around to haunt us in the future).

The rest of the patch looks OK to me (watch your formatting though:
please follow the style of the file you're modifying and use tabs instead of blanks). Also, I don't think there is any point declaring

	--david