VM and swap - it's really unusable
Quoted 2 lines · On Tue, 8 Jan 2002, Dieter [iso-8859-15] Nützel wrote:
Is it possible to decide, now what should go into 2.4.18 (maybe -pre3) -aa or -rmap?
-rmap is 2.5 stuff.
I would really like to integrate -aa stuff as soon as I can understand _why_ Andrea is doing those changes.
Note that people will _always_ complain about VM: It will always be possible to optimize it to some case and cause harm to other cases.
I'm not saying that VM is perfect right now: It for sure has problems.
Quoted 1 line
Andrew Morten`s read-latency.patch is a clear winner for me, too.
AFAIK Andrew's code simply adds schedule points around the kernel, right?
If so, nope, I do not plan to integrate it.
Quoted 1 line
What about 00_nanosleep-5 and bootmem?
What is 00_nanosleep-5 and bootmem ?
Quoted 1 line
The O(1) scheduler?
2.5 stuff.
Quoted 2 lines
Maybe preemption? It is disengageable so nobody should be harmed but we get the chance for wider testing.
2.5 too.
Quoted 6 lines
Quoted 1 line
Andrew Morten`s read-latency.patch is a clear winner for me, too.
AFAIK Andrew's code simply adds schedule points around the kernel, righ= t?=20
If so, nope, I do not plan to integrate it.
Yep. It has the most wonderful effect on system latency without actually breaking any semantics. Pre-empt is a trickier one because it does change actual behaviour a lot more, although it should be preserving locking rules.
Alan
Quoted 7 lines · Marcelo Tosatti
Quoted 2 lines · On Tue, 8 Jan 2002, Dieter [iso-8859-15] Nützel wrote:
Is it possible to decide, now what should go into 2.4.18 (maybe -pre3) -aa or -rmap?
Quoted 7 lines
-rmap is 2.5 stuff.
I would really like to integrate -aa stuff as soon as I can understand _why_ Andrea is doing those changes.
Note that people will _always_ complain about VM: It will always be possible to optimize it to some case and cause harm to other cases.
At the moment I've one showstopper thing to fix (enterprise thing only though, normal boxes doesn't care about this), then I will try to split out those bits for integration and they should become much more readable.
Quoted 8 lines
I'm not saying that VM is perfect right now: It for sure has problems.
Quoted 1 line
Andrew Morten`s read-latency.patch is a clear winner for me, too.
AFAIK Andrew's code simply adds schedule points around the kernel, right?
If so, nope, I do not plan to integrate it.
Note that some of them are bugfixes, without them an luser can hang the machine for several seconds on any box with some giga of ram by simple reading and writing into a large enough buffer. I think we never had time to care merging those bits into mainline yet and this is probably the main reason they're not integrated but it's something that should be in mainline IMHO.
Quoted 3 lines
Quoted 1 line
What about 00_nanosleep-5 and bootmem?
What is 00_nanosleep-5 and bootmem ?
nanosleep gives usec resolution to the rest-of-time returned by nanosleep, this avoids glibc userspace starvation on nanosleep interrupted by a flood of signals. It was requested by glibc people.
I know nanosleep triggers ltp failures (both kindly reported by Paul Larson and Randy Hron), but I really suspect a false positive in the ltp testsuite, I didn't had time to check it yet, but certainly I tested nanosleep retval usec resolution with some testcase written by hand (compared to gettimeofday output) after writing it long ago, and it was apparently working fine and I never had problems with it yet.
Andrea
From: Marcelo Tosatti <[email protected]>
Date: Tue, 8 Jan 2002 11:59:36 -0200 (BRST)
Quoted 1 line · On Tue, 8 Jan 2002, Dieter [iso-8859-15] Nützel wrote:
Andrew Morten`s read-latency.patch is a clear winner for me, too.
AFAIK Andrew's code simply adds schedule points around the kernel, right?
If so, nope, I do not plan to integrate it.
No, this is the block I/O scheduler changes he did which up the priority of reads wrt. writes so they do not sit around forever.
Franks a lot,
David S. Miller
[email protected]
Quoted 6 lines · Marcelo Tosatti
Quoted 2 lines
Andrew Morten`s read-latency.patch is a clear winner for me, too.
AFAIK Andrew's code simply adds schedule points around the kernel, right?
If so, nope, I do not plan to integrate it.
I haven't sent it to you yet :) It improves the kernel. That's good, isn't it? (There are already forty or fifty open-coded rescheduling points in the kernel. That patch just adds the missing (and most important) ten).
BTW, with regard to the "preempt and low-lat improve disk throughput" argument. I have occasionally seen small throughput improvements, but I think these may be just request-merging flukes. Certainly they were very small.
The one area where it sometimes makes a huuuuuge throughput improvement is software RAID.
Much of the VM and dirty buffer writeout code assumes that submit_bh() starts I/O. Guess what? RAID's submit_bh() sometimes *doesn't* start I/O. Because the IO is started by a different thread.
With the Riel VM I had a test case in which software RAID completely and utterly collapsed because of this. The machine was spending huge amounts of time spinning in page_launder(), madly submitting I/O, but never yielding, so the I/O wasn't being started.
-aa VM has an open-coded yield in shrink_cahce() which prevents that particular collapse. But I had a report yesterday that the mini-ll patch triples throughput on a complex RAID stack in 2.4.17. Same reason.
Arguably, this is a RAID problem - raidN_make_request() should be yielding. But it's better to do this in one nice, single, reviewable place - submit_bh(). However that won't prevent wait_for_buffers() from starving the raid thread.
RAID is not alone. ksoftirqd, keventd and loop_thread() also need reasonably good response times.
But given the number of people who have been providing feedback on this patch, and on the disk-read-latency patch, none of this is going anywhere, and mine will be the only Linux machines which don't suck. (Takes ball, goes home).
-
Quoted 8 lines · Andrea Arcangeli
...
Quoted 1 line
What is 00_nanosleep-5 and bootmem ?
nanosleep gives usec resolution to the rest-of-time returned by nanosleep, this avoids glibc userspace starvation on nanosleep interrupted by a flood of signals. It was requested by glibc people.
It would be really nice to do something about that two millisecond busywait for RT tasks in sys_nanosleep(). It's really foul.
The rudest thing about it is that programmers think "oh, let's be nice to the machine and use usleep(1000)". Boy, do they get a shock when they switch their pthread app to use an RT policy.
Does anyone have any clever ideas?
-
Quoted 4 lines · Andrew Morton
Quoted 3 lines · Marcelo Tosatti
Quoted 2 lines
Andrew Morten`s read-latency.patch is a clear winner for me, too.
Quoted 8 lines
Quoted 3 lines
AFAIK Andrew's code simply adds schedule points around the kernel, right?
If so, nope, I do not plan to integrate it.
I haven't sent it to you yet :) It improves the kernel. That's good, isn't it? (There are already forty or fifty open-coded rescheduling points in the kernel. That patch just adds the missing (and most important) ten).
yes, only make sure not to add live locks.
Quoted 1 line
reviewable place -
submit_bh(). However that won't prevent
agreed, I also merged this part of mini-ll in 18pre2aa1 infact.
Andrea
Quoted 13 lines · Andrew Morton
Quoted 8 lines · Andrea Arcangeli
...
Quoted 1 line
What is 00_nanosleep-5 and bootmem ?
nanosleep gives usec resolution to the rest-of-time returned by nanosleep, this avoids glibc userspace starvation on nanosleep interrupted by a flood of signals. It was requested by glibc people.
It would be really nice to do something about that two millisecond busywait for RT tasks in
sys_nanosleep(). It's really foul.
Quoted 6 lines
The rudest thing about it is that programmers think "oh, let's be nice to the machine and use usleep(1000)". Boy, do they get a shock when they switch their pthread app to use an RT policy.
Does anyone have any clever ideas?
actually with a design proposal I did today, I think for x86-64 we'll be able to reach something of the order of 1msec/100usec of precision in nanosleep without the need of RT privilegies (note this has nothing to do with the nanosleep patch in -aa, the nanosleep patch is about the retval, not about "how time will pass"). However the whole timer handling will have to be revisited by the time we start to code this.
Andrea
Quoted 6 lines · Andrea Arcangeli
Note that some of them are bugfixes, without them an luser can hang the machine for several seconds on any box with some giga of ram by simple reading and writing into a large enough buffer. I think we never had time to care merging those bits into mainline yet and this is probably the main reason they're not integrated but it's something that should be in mainline IMHO.
Or just doing a large write while doing lots of reads... my personal nemesis is "mkisofs" for backups, which reads lots of small files and builds a CD image, which suddenly gets discovered by the kernel and written, seemingly in a monolythic chunk. I MAY be able to improve this with tuning the bdflush parameters, and I tried some tentative patches which didn't make a huge gain.
I don't know if the solution lies in forcing write to start when a certain size of buffers are queued regardless of percentages, or in better scheduling of reads ahead of writes, or whatever.
Signature · 3 lines
bill davidsen <[email protected]> CTO, TMR Associates, Inc Doing interesting things with little computers since 1979.