Skip to contentSkip to conversation

i386: always use 4k stacks

PATCH Bodo Eggert 3 participants 4 messages Dec 18, 2005 8 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#8 lore raw
Quoted 11 lines · Adrian Bunk

I'm with you that we need a safety net, but I don't see a problem with this being between 3kB and 4kB. The goal should be to _never_ use more than 3kB stack having a 1kB safety net.

And in my experience, many stack problems don't come from code getting more complex but from people allocating 1kB structs or arrays of

Quoted 1 line

2k chars on the stack. In these cases, the code has to be fixed and

"make checkstack" makes it easy to find such cases.

And as a data point, my count of bug reports for problems with in-kernel code with 4k stacks after Neil's patch went into -mm is still at 0.

Would you run a desktop with an nfs server on xfs on lvm on dm on SCSI? Or a productive server on -mm?

IMO it's OK to push 4K stacks in -mm, but one week of no error reports from a few testers don't make a reliable system.

[...]

Quoted 2 lines

Unfortunately, "is not really something to encourage" doesn'a make "happens in real-life applications" impossible...

The same applies to using kernel stack. Therefore I'll want to choose a bigger stack for my server, which runs less than 100 processes.

Signature · 2 lines
Ich danke GMX dafür, die Verwendung meiner Adressen mittels per SPF
verbreiteten Lügen zu sabotieren.
#9 lore raw
Quoted 14 lines · Bodo Eggert
Quoted 11 lines · Adrian Bunk

I'm with you that we need a safety net, but I don't see a problem with this being between 3kB and 4kB. The goal should be to _never_ use more than 3kB stack having a 1kB safety net.

And in my experience, many stack problems don't come from code getting more complex but from people allocating 1kB structs or arrays of

Quoted 1 line

2k chars on the stack. In these cases, the code has to be fixed and

"make checkstack" makes it easy to find such cases.

And as a data point, my count of bug reports for problems with in-kernel code with 4k stacks after Neil's patch went into -mm is still at 0.

Quoted 6 lines

Would you run a desktop with an nfs server on xfs on lvm on dm on SCSI? Or a productive server on -mm?

IMO it's OK to push 4K stacks in -mm, but one week of no error reports from a few testers don't make a reliable system.
[...]

It isn't that 4k stacks were completely untested.

Fedore enables it for a long time.

Even RHEL4 always uses 4k stacks - and RHEL is a distribution many people use on their production servers.

Quoted 5 lines
Quoted 2 lines

Unfortunately, "is not really something to encourage" doesn'a make "happens in real-life applications" impossible...

The same applies to using kernel stack. Therefore I'll want to choose a bigger stack for my server, which runs less than 100 processes.

You can always manually adjust THREAD_SIZE if you really want to, but there should be no reason to do so.

There are so many possible programming errors in kernel code, and stack usage problems are amongst the ones you can find relatively easy...

cu
Adrian

Signature · 4 lines
       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed
#10 lore raw
Quoted 9 lines · Adrian Bunk
Quoted 7 lines · Bodo Eggert

Would you run a desktop with an nfs server on xfs on lvm on dm on SCSI? Or a productive server on -mm?

IMO it's OK to push 4K stacks in -mm, but one week of no error reports from a few testers don't make a reliable system.
[...]

Quoted 6 lines

It isn't that 4k stacks were completely untested.

Fedore enables it for a long time.

Even RHEL4 always uses 4k stacks - and RHEL is a distribution many people use on their production servers.

As was pointed out previously in this thread, at least one configuration that is known to have problems with 4k stacks is simply not supported by RHEL. How many more are like that?

Michael Poole

#11 lore raw
Quoted 13 lines · Michael Poole
Quoted 11 lines · Adrian Bunk
Quoted 7 lines · Bodo Eggert

Would you run a desktop with an nfs server on xfs on lvm on dm on SCSI? Or a productive server on -mm?

IMO it's OK to push 4K stacks in -mm, but one week of no error reports from a few testers don't make a reliable system.
[...]

It isn't that 4k stacks were completely untested.

Quoted 8 lines
Quoted 4 lines

Fedore enables it for a long time.

Even RHEL4 always uses 4k stacks - and RHEL is a distribution many people use on their production servers.

As was pointed out previously in this thread, at least one configuration that is known to have problems with 4k stacks is simply not supported by RHEL. How many more are like that?

s/is known/was known/

XFS got fixed and Neil's patch should fix the rest of the problem.

My count of bug reports for problems with 4k stacks after Neil's patch went into -mm is still at 0.

4k stacks are always used by Fedora.
4k stacks are always used by RHEL4.

Granted, there might be some small areas that are not covered by such distributions.

You ask "How many more are like that?".
That's exactly the question I want answers for by always enabling it in -mm.

-mm is a pretty experimental kernel and everything using it knows about this. Many -mm kernels contain more than hundred new patches compared to the previous -mm kernel, and some of these patches are of the quality "compiles with some specific options set and might not always crash your kernel". A patch like always enabling 4k stacks that is essentially already used by at least one popular desktop distribution (Fedora) and at least one popular server distriution (RHEL4) already had _far_ more than the average testing coverage for patches in -mm, so WTF is the problem?

Quoted 1 line

Michael Poole

cu
Adrian

Signature · 4 lines
       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed