2.6.22 -mm merge plans
Subsystems (20)
Re: [PATCH] mm: swap prefetch improvements
In reply to Ingo MolnarQuoted 5 lines · Ingo Molnar
It clearly should not consider 'itself' as IO activity. This suggests some bug in the 'detect activity' mechanism, agreed? I'm wondering whether you are seeing the same problem, or is all swap-prefetch IO on your system continuous until it's done [or some other IO comes inbetween]?
When nothing else is happening anywhere on the system it reads in bursts and goes to sleep during journal writeout.
Signature · 7 lines
-ck -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Re: [PATCH] mm: swap prefetch improvements
Quoted 9 lines · Con Kolivas
Quoted 5 lines · Ingo Molnar
It clearly should not consider 'itself' as IO activity. This suggests some bug in the 'detect activity' mechanism, agreed? I'm wondering whether you are seeing the same problem, or is all swap-prefetch IO on your system continuous until it's done [or some other IO comes inbetween]?
When nothing else is happening anywhere on the system it reads in bursts and goes to sleep during journal writeout.
hm, what do you call 'journal writeout' here that would be happening on my system?
Ingo
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Re: [PATCH] mm: swap prefetch improvements
Quoted 8 lines · Ingo Molnar
Quoted 7 lines · Con Kolivas
Quoted 5 lines · Ingo Molnar
It clearly should not consider 'itself' as IO activity. This suggests some bug in the 'detect activity' mechanism, agreed? I'm wondering whether you are seeing the same problem, or is all swap-prefetch IO on your system continuous until it's done [or some other IO comes inbetween]?
Quoted 5 lines
Quoted 2 lines
When nothing else is happening anywhere on the system it reads in bursts and goes to sleep during journal writeout.
hm, what do you call 'journal writeout' here that would be happening on my system?
Not really sure what you have in terms of fs, but here even with nothing going on, ext3 writes to disk every 5 seconds with kjournald.
Signature · 7 lines
-ck -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
A message that is not in the archive (sent off-list or not yet received): [email protected]
Re: [PATCH] mm: swap prefetch improvements
Quoted 5 lines · Con Kolivas
Quoted 2 lines
hm, what do you call 'journal writeout' here that would be happening on my system?
Not really sure what you have in terms of fs, but here even with nothing going on, ext3 writes to disk every 5 seconds with kjournald.
i have ext3, but it doesnt do that on my box. Also, i would have noticed any IO activity in the 'swap prefetch off' case. When i said completely idle, i really meant it ;-)
so swap-prefetch stops for 5 seconds for no apparent reason.
Ingo
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Re: [ck] Re: [PATCH] mm: swap prefetch improvements
In reply to Ingo MolnarQuoted 28 lines · Ingo Molnar
Quoted 10 lines · Con Kolivas
Quoted 9 lines · Ingo Molnar
Quoted 8 lines · Con Kolivas
Quoted 7 lines
Quoted 4 lines
there was nothing else running on the system - so i suspect the swapin activity flagged 'itself' as some 'other' activity and stopped? The swapins happened in 4 bursts, separated by 5 seconds total idleness.
I've noted burst swapins separated by some seconds of pause in my desktop system too (with
sp_testerand an idle gnome).Quoted 8 lines
Quoted 6 lines
Quoted 2 lines
That really is expected, as just about anything, including journal writeout, would be enough to put it back to sleep for 5 more seconds.
note that nothing like that happened on my system - in the swap-prefetch-off case there was _zero_ IO activity during the sleep period.
Ok, granted it's _very_ conservative. [...]
but your first reaction was "it should not have slept for 5 seconds":
| Hmm.. The timer waits 5 seconds before trying to prefetch, but then | only stops if it detects any activity elsewhere. It doesn't actually | try to go idle in between
Quoted 5 lines
It clearly should not consider 'itself' as IO activity. This suggests some bug in the 'detect activity' mechanism, agreed? I'm wondering whether you are seeing the same problem, or is all swap-prefetch IO on your system continuous until it's done [or some other IO comes inbetween]?
The only "problem" I can see with this idea is in the potential case that it takes up all the IO activity, and so there is never enough IO activity from other progams to trigger the wait mechanism because they don't get a chance to run.
That could probably be "fixed" by capping the IO, though... (with one of those oh-so-lovable "magic numbers" or a tunable)
That said, I don't think there are any issues with the code compensating for its own activity in the "detect activity" mechanism -- assuming there wasn't a major impact in e.g. maintainability or something.
As for the burstyness... considering the "no negative impact" stance, I can understand that. But it seems inefficient, at best...
Signature · 11 lines
Michael Chang Please avoid sending me Word or PowerPoint attachments. See http://www.gnu.org/philosophy/no-word-attachments.html Thank you. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Re: [ck] Re: [PATCH] mm: swap prefetch improvements
Quoted 10 lines · Michael Chang
Quoted 5 lines
It clearly should not consider 'itself' as IO activity. This suggests some bug in the 'detect activity' mechanism, agreed? I'm wondering whether you are seeing the same problem, or is all swap-prefetch IO on your system continuous until it's done [or some other IO comes inbetween]?
The only "problem" I can see with this idea is in the potential case that it takes up all the IO activity, and so there is never enough IO activity from other progams to trigger the wait mechanism because they don't get a chance to run.
i dont understand what you mean. Any 'use only idle IO capacity' mechanism should immediately cease to be active the moment any other app tries to do IO - whether the IO subsystem is saturated or not.
Quoted 7 lines
That said, I don't think there are any issues with the code compensating for its own activity in the "detect activity" mechanism -- assuming there wasn't a major impact in e.g. maintainability or something.
As for the burstyness... considering the "no negative impact" stance, I can understand that. But it seems inefficient, at best...
well, it's a plain old bug (a not too serious one) in my book, i'm surprised that we are now at mail #7 about it :-) I reported it, and i guess Con will fix it eventually. There's really no need to deny that it exists or to try to talk it out of existence. Sheesh! :-)
Ingo
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Re: [ck] Re: [PATCH] mm: swap prefetch improvements
In reply to Con KolivasQuoted 17 lines · On Tue, 22 May 2007 20:37:54 +1000 Con Kolivas <[email protected]> wrote:
Quoted 9 lines · Ingo Molnar
Quoted 8 lines · Con Kolivas
Quoted 7 lines
Quoted 4 lines
there was nothing else running on the system - so i suspect the swapin activity flagged 'itself' as some 'other' activity and stopped? The swapins happened in 4 bursts, separated by 5 seconds total idleness.
I've noted burst swapins separated by some seconds of pause in my desktop system too (with
sp_testerand an idle gnome).Quoted 6 lines
Quoted 2 lines
That really is expected, as just about anything, including journal writeout, would be enough to put it back to sleep for 5 more seconds.
note that nothing like that happened on my system - in the swap-prefetch-off case there was _zero_ IO activity during the sleep period.
Quoted 9 lines
Ok, granted it's _very_ conservative. I really don't want to risk its presence being a burden on anything, and the iowait it induces probably makes it turn itself off for another
PREFETCH_DELAY(5s). I really don't want to cross the line to where it is detrimental in any way. Not dropping out on acond_reschedand perhaps making the delay tunable should be enough to make it a little less "sleepy".Signature · 1 line
-ck
Hi. I just did some video encoding on my desktop and I was noticing (for the first time in a while) that running apps had to hit swap quite a lot when I switched to them (the encoding was going at full blast for most of the day, and most of the time other running apps were idle). Now, a good half of my RAM appeared to be free during all this, so I was thinking at the time that it would be nice if swap prefetch could be tunably more aggressive. I guess it would be ideal in this case if it could kick in during tunably low disk-IO periods, even if the CPU is rather busy. I'm sure you've considered this, so I only butt in here to cast a vote for it. :)
Of course, I could be completely wrong about the possibility.. and I seem to remember that the disk cache can take up about half the ram by default without this showing up in 'gnome-system-monitor'... which I guess might happen during heavy encoding.. but even if it did, I could have set the limit lower, and would then have still appreciated prefetching.
Ash
Re: [PATCH] mm: swap prefetch improvements
Quoted 10 lines · Ash Milsted
Hi. I just did some video encoding on my desktop and I was noticing (for the first time in a while) that running apps had to hit swap quite a lot when I switched to them (the encoding was going at full blast for most of the day, and most of the time other running apps were idle). Now, a good half of my RAM appeared to be free during all this, so I was thinking at the time that it would be nice if swap prefetch could be tunably more aggressive. I guess it would be ideal in this case if it could kick in during tunably low disk-IO periods, even if the CPU is rather busy. I'm sure you've considered this, so I only butt in here to cast a vote for it. :)
In this case nicing the video encode should be enough to make it prefetch even during heavy cpu usage. It detects the total nice level rather than the cpu usage.
Quoted 6 lines
Of course, I could be completely wrong about the possibility.. and I seem to remember that the disk cache can take up about half the ram by default without this showing up in 'gnome-system-monitor'... which I guess might happen during heavy encoding.. but even if it did, I could have set the limit lower, and would then have still appreciated prefetching.
I plan to make it prefetch more aggressively by default soon and make it more tunable too.
Signature · 1 line
-ck
Re: [PATCH] mm: swap prefetch improvements
Quoted 12 lines · On Wed, 23 May 2007 08:50:01 +1000 Con Kolivas <[email protected]> wrote:
Quoted 10 lines · Ash Milsted
Hi. I just did some video encoding on my desktop and I was noticing (for the first time in a while) that running apps had to hit swap quite a lot when I switched to them (the encoding was going at full blast for most of the day, and most of the time other running apps were idle). Now, a good half of my RAM appeared to be free during all this, so I was thinking at the time that it would be nice if swap prefetch could be tunably more aggressive. I guess it would be ideal in this case if it could kick in during tunably low disk-IO periods, even if the CPU is rather busy. I'm sure you've considered this, so I only butt in here to cast a vote for it. :)
Quoted 4 lines
In this case nicing the video encode should be enough to make it prefetch even during heavy cpu usage. It detects the total nice level rather than the cpu usage.
Cunning, but I guess the regular (less than 5 seconds apart) reads/writes during the encoding process would cause prefetching to hold off, no? I had used nice and ionice to reduce the encoder priority, which made desktop apps pretty responsive, except when they had to hit swap. If swap prefetch is using the idle io-priority I suppose it would hardly affect performance if it kicked in during such use, since it would operate in between the encoder reads anyway (assuming the encoder is at higher ioprio), right ?
Quoted 4 lines
I plan to make it prefetch more aggressively by default soon and make it more tunable too.
'Sounds good!
Re: swap-prefetch: 2.6.22 -mm merge plans
In reply to Ray LeeQuoted 15 lines · Ray Lee
Quoted 3 lines · Nick Piggin
You said it helped with the updatedb problem. That says we should look at why it is going bad first, and for example improve use-once algorithms. After we do that, then swap prefetching might still help, which is fine.
Nick, if you're volunteering to do that analysis, then great. If not, then you're just providing a airy hope with nothing to back up when or if that work would ever occur.
Further, if you or someone else *does* do that work, then guess what, we still have the option to rip out the swap prefetching code after the hypothetical use-once improvements have been proven and merged. Which, by the way, I've watched people talk about since 2.4. That was, y'know, a *while* ago.
Quoted 8 lines
So enough with the stop energy, okay? You're better than that.
Con? He is right about the last feature to go in needs to work gracefully with what's there now. However, it's not unheard of for authors of other sections of code to help out with incompatibilities by answering politely phrased questions for guidance. Though the intersection of users between cpusets and desktop systems seems small indeed.
Let's just set the record straight. I actually discussed cpusets over a year ago in this nonsense and was told by sgi folk there was no need to get my head around cpusets and honouring node placement should be enough which, by the way, swap prefetch does. So I by no means ignored this; we just hit an impasse on just how much more featured it should be for the sake of a goddamn home desktop pc feature.
Anyway why the hell am I resurrecting this thread? The code is declared dead already. Leave it be.
Signature · 7 lines
-ck -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Re: swap-prefetch: 2.6.22 -mm merge plans
In reply to Con KolivasQuoted 6 lines · Con Kolivas
Quoted 2 lines · Ingo Molnar
agreed. Con, IIRC you wrote a testcase for this, right? Could you please send us the results of that testing?
Yes, sorry it's a crappy test app but works on 32bit. Timed with prefetch disabled and then enabled swap prefetch saves ~5 seconds on average hardware on this one test case. I had many users try this and the results were between 2 and 10 seconds, but always showed a saving on this testcase. This effect easily occurs on printing a big picture, editing a large file, compressing an iso image or whatever in real world workloads. Smaller, but much more frequent effects of this over the course of a day obviously also occur and do add up.
I'll try this when I get the scheduler stuff done, and also dig out the "resp1" stuff for "back when." I see the most recent datasets were comparing 2.5.43-mm2 responsiveness with 2.4.19-ck7, you know I always test your stuff ;-)
Guess it might need a bit of polish for current hardware, I was testing on *small* machines, deliberately.
Signature · 9 lines
Bill Davidsen <[email protected]> "We have more to fear from the bungling of the incompetent than from the machinations of the wicked." - from Slashdot -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Re: swap-prefetch: 2.6.22 -mm merge plans
In reply to Ingo MolnarQuoted 4 lines · Ingo Molnar
Quoted 1 line · Nick Piggin
Quoted 1 line
i'm wondering about swap-prefetch:
Quoted 9 lines
Quoted 1 line
Being able to config all these core heuristics changes is really not that much of a positive. The fact that we might _need_ to config something out, and double the configuration range isn't too pleasing.
Well, to the desktop user this is a speculative performance feature that he is willing to potentially waste CPU and IO capacity, in expectation of better performance.
On the conceptual level it is
_preciselythe same thing as regular filereadahead_. (with the difference that to me swapahead seems to be quite a bit more intelligent than our current file readahead logic.)This feature has no API or ABI impact at all, it's a pure performance feature. (besides the trivial sysctl to turn it runtime on/off).
Quoted 1 line
Here were some of my concerns, and where our discussion got up to.
[...snip...]
Quoted 4 lines
i see no real problem here. We've had heuristics for a _long_ time in various areas of the code. Sometimes they work, sometimes they suck.
the flow of this is really easy: distro looking for a feature edge turns it on and announces it, if the feature does not work out for users then user turns it off and complains to distro, if enough users complain then distro turns it off for next release, upstream forgets about this performance feature and eventually removes it once someone notices that it wouldnt even compile in the past 2 main releases. I see no problem here, we did that in the past too with performance features. The networking stack has literally dozens of such small tunable things which get experimented with, and whose defaults do get tuned carefully. Some of the knobs help bandwidth, some help latency.
I haven't looked at this code since it first came out and didn't impress me, but I think it would be good to get the current version in. However, when you say "user turns it off" I hope you mean "in /proc/sys with a switch or knob" and not by expecting people to recompile and install a kernel. Then it might take a little memory but wouldn't do something undesirable.
Note: I had no bad effect from the code, it just didn't feel faster. On a low memory machine it might help. Of course I have wanted to have a hard limit on memory used for i/o buffers, just to avoid swapping programs to make room for i/o, so to some extent I feel as if this is a fix for a problem we shouldn't have.
Signature · 9 lines
Bill Davidsen <[email protected]> "We have more to fear from the bungling of the incompetent than from the machinations of the wicked." - from Slashdot -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
On Mon, Apr 30, 2007 at 04:20:07PM -0700, Andrew Morton wrote:
...
Quoted 3 lines
git-unionfs.patch
Does this have a future?
Yes! There are many active users who use our unioning functionality.
Namespace unification consists of several major parts:
1) Duplicate elimination: This can be handled in the VFS. However, it would clutter up the VFS code with a lot of wrappers around key VFS functions to select the appropriate dentry/inode/etc. object from the underlying branch. (You also need to provide efficient and sane readdir/seekdir semantics which we do with our "On Disk Format" support.)
2) Copyup: Having a unified namespace by itself isn't enough. You also need copy-on-write functionality when the source file is on a read-only branch. This makes unioning much more useful and is one of the main attractions to unionfs users.
3) Whiteouts: Whiteouts are a key unioning construct. As it was pointed out at OLS 2006, they are a properly of the union and _NOT_ a branch. Therefore, they should not be stored persistently on a branch but rather in some "external" storage.
4) You also need unique and *persistent* inode numbers for network f/s exports and other unix tools.
5) You need to provide dynamic branch management functionality: adding, removing, and changing the mode of branches in an existing union.
We have considerable experience in unioning file systems for years now; we are currently working on the third generation of the code. All of the above features, and more, are USED by users, and are NEEDED by users.
We believe the right approach is the one we've taken, and is the least
intrusive: a standalone (stackable) file system that doesn't clutter the VFS, with some small and gradual changes to the VFS to support stacking. As you may have noticed, we have been successfully submitting VFS patches to make the VFS more stacking friendly (not just to Unionfs, but also to eCryptfs which has been in since 2.6.19).
The older Union mounts, alas, try to put all that functionality into the VFS. We recognize that some people think that union mounts at the VFS level is the "elegant" approach, but we hope people will listen to us and learn from our experience: unioning may seem simple in principle, but it is difficult in practice. (See http://unionfs.fileystems.org/ for a lot more info.) So we don't think that is a viable long term approach to have all of the unioning functionality in the VFS for two main reasons:
(1) If you want users to use a VFS-level unioning functionality ala union-mounts, then you're going to have to implement *all* of the features we have implemented; the VFS clutter and complexity that will result will be very considerable, and we just don't think that it'd happen.
(2) Some may suggest to have a lightweight union mounts that only offers a subset of the functionality that's suitable for placing in the VFS. In that case, most unionfs users simply won't use it. You'd need union mounts to provide ALL of the functionality that we have TODAY, if you want users to it.
As far as we can see the remaining stumbling block right now is cache coherency between the layers. Whether you provide unioning as a stackable f/s or shoved into the VFS, coherency will have to be addressed. In our upcoming paper and talk at OLS'07, we plan to bring up and discuss several ideas we've explored already on how to resolve this incoherency. Our ideas range from complex graph-based pointer management between objects of all sorts, to simple timestamp-based VFS hooks. (We've been experimenting with several approaches and so far we're leaning toward the simple timestamp based on, again in the interest of keeping the VFS changes simple. We hope to have more results to report by OLS time.)
Josef "Jeff" Sipek, on behalf of the Unionfs team.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>