RFC: i386: kill !4KSTACKS
Subsystems (2)
4Kb kernel stacks are the future on i386, and it seems the problems it initially caused are now sorted out.
Does anyone knows about any currently unsolved problems?
I'd like to:
- get a patch into on of the next -mm kernels that unconditionally enables 4KSTACKS
- if there won't be new reports of breakages, send a patch to completely remove !4KSTACKS for 2.6.15
In -mm, Reiser4 still has a dependency on !4KSTACKS.
I've mentioned this at least twice to the Reiser4 people, and they should check why this dependency is still there and if there are still stack issues in Reiser4 fix them.
If not people using Reiser4 on i386 will have to decide whether to switch the filesystem or the architecture...
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 SeedQuoted 2 lines · Adrian Bunk
4Kb kernel stacks are the future on i386, and it seems the problems it initially caused are now sorted out.
Not entirely.
XFS when mixed with raid/lvm/nfs still blows up. It's probably not alone in this respect but worse than ext2/3.
Quoted 9 lines · Chris Wedgwood
Quoted 2 lines · Adrian Bunk
4Kb kernel stacks are the future on i386, and it seems the problems it initially caused are now sorted out.
Not entirely.
XFS when mixed with raid/lvm/nfs still blows up. It's probably not alone in this respect but worse than ext2/3.
To clarify, you mean AND not OR (/) there -- in other words, raid[+raid]+dm[+dm]+xfs+nfs can be fatal, yes.
We have no known failing cases other than several-deep stacked driver cases which are also likely evil for other filesystems, as you say. Which is not to say I'm in support of this patch.. just don't keep dissing XFS for this, we went and made a number of at-times-painful changes to make this option work as best it can.
cheers.
Signature · 1 line
Nathan
Quoted 6 lines · On Friday September 2, [email protected] wrote:
Quoted 5 lines · Chris Wedgwood
Quoted 2 lines · Adrian Bunk
4Kb kernel stacks are the future on i386, and it seems the problems it initially caused are now sorted out.
Quoted 7 lines
Quoted 4 lines
Not entirely.
XFS when mixed with raid/lvm/nfs still blows up. It's probably not alone in this respect but worse than ext2/3.
To clarify, you mean AND not OR (/) there -- in other words, raid[+raid]+dm[+dm]+xfs+nfs can be fatal, yes.
It should be reasonably simple to remove this problem of stacked drivers.
There really isn't any need for md and dm (or md and md or ..) to use the stack and the same time.
The following patch, which I posted in November last year, arranges that if generic_make_request is called recursively, then the instead of doing anything, it just takes a copy of the 'bio', and deals with it when the parent request finishes.
So it effectively converts the 'and' back to an 'or'.
It didn't get much of an enthusiastic response then. Maybe it is time to try again. Anyone interested?
(I don't know if the patch still applies, but it should come close).
NeilBrown
==============================================
### Diffstat output
./drivers/block/ll_rw_blk.c | 38 +++++++++++++++++++++++++++++++++++++- ./include/linux/sched.h | 3 +++ 2 files changed, 40 insertions(+), 1 deletion(-)
drivers/block/ll_rw_blk.c renamed from drivers/block/ll_rw_blk.c~current~ +37 -1
@@ -2609,7 +2609,7 @@ static inline void block_wait_queue_runn* bi_sector for remaps as it sees fit. So the values of these fields * should NOT be depended on after the call to generic_make_request. */ -void generic_make_request (struct bio *bio) +static inline void __generic_make_request (struct bio *bio) {request_queue_t *q;sector_t maxsector;
@@ -2686,6 +2686,42 @@ end_io: }while (ret); } +/* +* We only want one ->make_request_fn to be active at a time, +* else stack usage with stacked devices could be a problem. +* So use current->bio_{list,tail} to keep a list of requests +* submited by a make_request_fn function. +* current->bio_tail is also used as a flag to say if +* generic_make_request is currently activce in this task or not. +* If it is NULL, then no make_request is active. If it is non-NULL, +* then a make_request is active, and new requests should be added +* at the tail +*/ +void generic_make_request (struct bio *bio) +{ +if (current->bio_tail) { +/* make_request is active */ + *(current->bio_tail) = bio; + bio->bi_next =NULL ; + current->bio_tail = &bio->bi_next; +return ; + } +/* not active yet, make it active */ + current->bio_list =NULL ; + current->bio_tail = & current->bio_list; +__generic_make_request (bio); +while (current->bio_list) { + bio = current->bio_list; + current->bio_list = bio->bi_next; +if (bio->bi_next ==NULL ) + current->bio_tail = ¤t->bio_list; +else + bio->bi_next =NULL ; +__generic_make_request (bio); + } + current->bio_tail =NULL ;/* deactivate */ +} +EXPORT_SYMBOL (generic_make_request);/**
include/linux/sched.h renamed from include/linux/sched.h~current~ +3 -0
@@ -649,6 +649,9 @@ struct task_struct {/* journalling filesystem info */ void *journal_info; + +/* stacked block device info */ +struct bio *bio_list, **bio_tail;/* VM state */ struct reclaim_state *reclaim_state;
Quoted 12 lines · On Fri, Sep 02, 2005 at 04:40:54PM +1000 Neil Brown wrote:
Quoted 11 lines · On Friday September 2, [email protected] wrote:
Quoted 9 lines · Chris Wedgwood
Quoted 2 lines · Adrian Bunk
4Kb kernel stacks are the future on i386, and it seems the problems it initially caused are now sorted out.
Not entirely.
XFS when mixed with raid/lvm/nfs still blows up. It's probably not alone in this respect but worse than ext2/3.
Quoted 8 lines
Quoted 2 lines
To clarify, you mean AND not OR (/) there -- in other words, raid[+raid]+dm[+dm]+xfs+nfs can be fatal, yes.
It should be reasonably simple to remove this problem of stacked drivers.
There really isn't any need for md and dm (or md and md or ..) to use the stack and the same time.
Sorry to bump in so late - but there seems to be a reporter who is suffering from these issues now:
Quoted 23 lines · Alexander Nyberg
Quoted 12 lines · On Fri, Sep 02, 2005 at 04:40:54PM +1000 Neil Brown wrote:
Quoted 11 lines · On Friday September 2, [email protected] wrote:
Quoted 9 lines · Chris Wedgwood
Quoted 2 lines · Adrian Bunk
4Kb kernel stacks are the future on i386, and it seems the problems it initially caused are now sorted out.
Not entirely.
XFS when mixed with raid/lvm/nfs still blows up. It's probably not alone in this respect but worse than ext2/3.
Quoted 8 lines
Quoted 2 lines
To clarify, you mean AND not OR (/) there -- in other words, raid[+raid]+dm[+dm]+xfs+nfs can be fatal, yes.
It should be reasonably simple to remove this problem of stacked drivers.
There really isn't any need for md and dm (or md and md or ..) to use the stack and the same time.
Quoted 4 lines
Sorry to bump in so late - but there seems to be a reporter who is suffering from these issues now:
Nathan, can you look into this bug?
TIA
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 SeedQuoted 6 lines · Adrian Bunk
Quoted 2 lines · Alexander Nyberg
Nathan, can you look into this bug?
OK - looks like a scheduling-while-atomic warning on a metdata buffer read, then a panic (sometime later?) at do_page_fault with no useful stack trace (removed by bug reporter? - thats the one you need...). The first stack trace (atomic/shedule) would not be >4K afaict, so thats a red herring I think.
cheers.
Signature · 1 line
Nathan
Hello
Quoted 11 lines · Adrian Bunk
4Kb kernel stacks are the future on i386, and it seems the problems it initially caused are now sorted out.
Does anyone knows about any currently unsolved problems?
I'd like to:
- get a patch into on of the next -mm kernels that unconditionally enables 4KSTACKS
- if there won't be new reports of breakages, send a patch to completely remove !4KSTACKS for 2.6.15
Quoted 5 lines
In -mm, Reiser4 still has a dependency on !4KSTACKS.
I've mentioned this at least twice to the Reiser4 people, and they should check why this dependency is still there and if there are still stack issues in Reiser4 fix them.
We are about to send reiser4 update which makes it to not depend on !4kstack.
Quoted 6 lines
If not people using Reiser4 on i386 will have to decide whether to switch the filesystem or the architecture...
cu
Adrian
Quoted 16 lines · Adrian Bunk
4Kb kernel stacks are the future on i386, and it seems the problems it initially caused are now sorted out.
Does anyone knows about any currently unsolved problems?
I'd like to:
- get a patch into on of the next -mm kernels that unconditionally enables 4KSTACKS
- if there won't be new reports of breakages, send a patch to completely remove !4KSTACKS for 2.6.15In -mm, Reiser4 still has a dependency on !4KSTACKS.
I've mentioned this at least twice to the Reiser4 people, and they should check why this dependency is still there and if there are still stack issues in Reiser4 fix them.
Quoted 8 lines
If not people using Reiser4 on i386 will have to decide whether to switch the filesystem or the architecture...
cu
Adrian
Can you wait just one month after we get in for this? Or even 2 weeks. vs needs a weekend, etc.....
Quoted 4 lines · Adrian Bunk
4Kb kernel stacks are the future on i386, and it seems the problems it initially caused are now sorted out.
Does anyone knows about any currently unsolved problems?
ndiswrapper
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 9 lines · Lee Revell
Quoted 4 lines · Adrian Bunk
4Kb kernel stacks are the future on i386, and it seems the problems it initially caused are now sorted out.
Does anyone knows about any currently unsolved problems?
ndiswrapper
While I agree ndiswrapper has a use ... I don't think we should base kernel development upon messing with something that is designed to run a windows driver in linux ...
// Stefan
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (MingW32)
iD8DBQFDGqPiBrn2kJu9P78RAgO4AJ9r6FNwB+72iRmdcMoxP0vi8gTDUQCfeUG5 5Qbcq/o/Zao79JPEVqOmH+M=
=xpUz
-----END PGP SIGNATURE-----
Quoted 9 lines · Stefan Smietanowski
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1Quoted 5 lines · Lee Revell
Quoted 3 lines · Adrian Bunk
4Kb kernel stacks are the future on i386, and it seems the problems it initially caused are now sorted out.
Quoted 8 lines
Quoted 4 lines
Quoted 1 line
Does anyone knows about any currently unsolved problems?
ndiswrapper
While I agree ndiswrapper has a use ... I don't think we should base kernel development upon messing with something that is designed to run a windows driver in linux ...
Good point, but I don't think we should needlessly render people's hardware inoperable either.
Lee
Quoted 13 lines · Lee Revell
Quoted 12 lines · Stefan Smietanowski
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1Quoted 8 lines · Lee Revell
Quoted 4 lines · Adrian Bunk
4Kb kernel stacks are the future on i386, and it seems the problems it initially caused are now sorted out.
Does anyone knows about any currently unsolved problems?
Quoted 8 lines
Quoted 5 lines
Quoted 1 line
ndiswrapper
While I agree ndiswrapper has a use ... I don't think we should base kernel development upon messing with something that is designed to run a windows driver in linux ...
Good point, but I don't think we should needlessly render people's hardware inoperable either.
The NdisWrapper FAQ already tells you that you need a patch for some of the binary-only Windows drivers that require more than 8kB stacks.
And the fact that NdisWrapper is mostly working hinders the development of open source drivers for this hardware.
Quoted 1 line
Lee
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 Seed2005/9/4, Lee Revell <[email protected]>:
Quoted 7 lines · Adrian Bunk
Quoted 4 lines
4Kb kernel stacks are the future on i386, and it seems the problems it initially caused are now sorted out.
Does anyone knows about any currently unsolved problems?
ndiswrapper
Just a thought : why couldn't ndiswrapper set apart some piece of memory and use it as the stack by changing the esp register before executing windows code.
Like http://article.gmane.org/gmane.linux.drivers.ndiswrapper.general/4737
It's dirty, I know, but after all they are executing win32 code ...
Why wouldn't this work ?
Signature · 1 line
Guillaume
Adrian Bunk wrote (ao):
Quoted 11 lines
4Kb kernel stacks are the future on i386, and it seems the problems it initially caused are now sorted out.
Does anyone knows about any currently unsolved problems?
I'd like to:
- get a patch into on of the next -mm kernels that unconditionally enables 4KSTACKS
- if there won't be new reports of breakages, send a patch to completely remove !4KSTACKS for 2.6.15
Quoted 7 lines
In -mm, Reiser4 still has a dependency on !4KSTACKS.
I've mentioned this at least twice to the Reiser4 people, and they should check why this dependency is still there and if there are still stack issues in Reiser4 fix them.If not people using Reiser4 on i386 will have to decide whether to switch the filesystem or the architecture...
FWIW: I use Reiser4 for several months now on several i386 systems, and I always remove the "&& !4STACKS" from fs/reiser4/Kconfig and enable CONFIG_4KSTACKS:
# zgrep -E 'REISER4|4KSTACKS' /proc/config.gz CONFIG_REISER4_FS=y # CONFIG_REISER4_DEBUG is not set CONFIG_4KSTACKS=y
Also using lvm2, or raid1, or raid5, on ATA, SATA or SCSI. I haven't experienced any problems yet, but the systems don't see heavy usage too.
Kind regards, Sander
Signature · 2 lines
Humilis IT Services and Solutions http://www.humilis.net