View previous topic :: View next topic |
Author |
Message |
474 l33t
Joined: 19 Apr 2002 Posts: 714
|
Posted: Thu May 09, 2002 11:15 am Post subject: Pre-emptive vs low-latency patch discrepancy? |
|
|
I noticed that the latest Gentoo kernel sources include the options of both Robert Love's pre-emptive patch and Andrew Morton's low-latency patch. This is all well and good. But I am a little concerned that both patches are from different contributors and am suspicious that they might not co-exist effectively. Mr Love has created the lock-breaking patch (to reduce spinlocks mainly in VM/VFS kernel code - preemption cannot occur under a spinlock apparently) to go with the pre-emptive kernel patch and this is what he has to say about it:
Quote: | With the preemptible kernel, the need for explicit scheduling points, like in the low-latency patches, are no more |
Surely he is referring to the Morton's "low latency patch" as we know it? And in the README:
Quote: | Lock breaking patch for the fully preemptible linux kernel. Or, a low-latency patch for preempt kernel |
To me, this implies that Morton's low-latency patch is redundant if you are using Love's preemptive kernel. So shouldn't we be using either the Love's stuff or Morton's stuff but not both? Yet, the Gentoo kernel allows you to enable both and doesn't have Love's lock-break patch right?
Further input would be welcome as there seems to be a scarcity of material about the implications. The 6 million dollar question is which one is better but also what are the technical implications of either beyond its mechanics ..? All I know is that increased preemption will result in slightly lower I/O throughput over the long term - I guess that is why Microso$t Windows NT Workstation has a lower "quanta" setting than Windows NT Server for example. Any kernel experts out there who could shed some light on all of this? |
|
Back to top |
|
|
friedmud Apprentice
Joined: 18 Apr 2002 Posts: 258 Location: Austin, TX USA
|
Posted: Thu May 09, 2002 4:45 pm Post subject: Low Latency and Pre-empt opinions!?!? |
|
|
I was wanting some people to chime in and give their opinions on whether low-latency and pre-empt are good for desktop systems.
I have found through my own (very non-rigorous) testing that Pre-empt does seem to speed up my desktop some - but it seems as if the low-latency patches actually SLOW DOWN the desktop experience.
Therefore I run Pre-empt only.
Anybody else? |
|
Back to top |
|
|
474 l33t
Joined: 19 Apr 2002 Posts: 714
|
Posted: Thu May 09, 2002 7:16 pm Post subject: My 2 pence worth ... |
|
|
I'm glad somebody else brought this up! Have a look at my earlier posting here: https://forums.gentoo.org/viewtopic.php?t=2144
I think I'm on the right track with the points expressed in that post, namely: Robert Love's patch is getting more exposure/publicity and, from what I know, is getting more support. And I'll quote him again:
Quote: | With the premptible kernel, the need for explicit scheduling points, like in the low-latency patches, are no more |
As no-one has yet offered any real information to the contrary, nor have I found any yet - I'm voting for pre-emptive only! Pre-emptive implies lower latencies anyway and I don't believe it is sensible to have two individual patches which affect the kernel in such a fundamental matter. The issue of improving kernel latency needs to be approached broadly and carefully, not with a mish-mash of 3rd party patches. That's asking for trouble I reckon. Any Gentoo luminaries reading? If so, please add the lock-breaking patch ... cheers!
IMHO, the Linux kernel definitely needs it - especially for desktop use. As a Windows XP/FreeBSD/OpenBSD user also, my Linux box isn't matching up .. yet. As a matter of fact, I just finished recompiling the kernel with pre-emption so let me see ... |
|
Back to top |
|
|
arkane l33t
Joined: 30 Apr 2002 Posts: 918 Location: Phoenix, AZ
|
Posted: Thu May 09, 2002 9:02 pm Post subject: |
|
|
I was wondering what the preempt thing does anyway? I know what preemptive multitasking is (versus cooperative, Win3.1/MacOS style) but I thought Linux was preemptive already? Or was I wrong? (wow, that'd be a first! *jk*)
I tried the preempt selection and I didn't really notice much of a difference. Well, stuff in the foreground like mozilla went a bit faster (not alot though), and compiling a kernel made it mozilla's screen refresh shakey. (without the pre-empt selection I can do both without a problem) |
|
Back to top |
|
|
Coogee Apprentice
Joined: 23 Apr 2002 Posts: 184 Location: E.U.
|
Posted: Thu May 09, 2002 10:51 pm Post subject: |
|
|
arkane wrote: | I was wondering what the preempt thing does anyway? I know what preemptive multitasking is (versus cooperative, Win3.1/MacOS style) but I thought Linux was preemptive already? Or was I wrong? (wow, that'd be a first! *jk*)
|
Linux is pre-emptive, but only in user space = outside of the kernel. |
|
Back to top |
|
|
Malakin Veteran
Joined: 14 Apr 2002 Posts: 1692 Location: Victoria BC Canada
|
Posted: Fri May 10, 2002 12:44 am Post subject: |
|
|
Quote: | Linux is pre-emptive, but only in user space = outside of the kernel. | From what I've read so are most other OS's like winxp.
The main difference between the two is preempt is a simple and clean way to offer low latency so that the kernel preempts whenever it can. The low latency patches instead patch a lot of places in the kernel allowing preemption in places where it's not normally possible. According to tests done low latency patches are more effective but since it patches a ton of places in the kernel it not a clean simple solution, it's more a big mess and is more likely to conflict with other patches. Either produce results effective enough for most users. If someone requires super low latency for some specific reason they can combine the patches.
I use just the preempt patch myself, note that Preempt was officially accepted into 2.5x
Here's a good article comparing the two:
http://www.linuxdevices.com/articles/AT8906594941.html
And here's the slashdot comments on it:
http://slashdot.org/article.pl?sid=02/03/22/0320238&mode=thread |
|
Back to top |
|
|
Malakin Veteran
Joined: 14 Apr 2002 Posts: 1692 Location: Victoria BC Canada
|
Posted: Fri May 10, 2002 12:57 am Post subject: |
|
|
I posted some links you can read in this thread, they answer your questions:
https://forums.gentoo.org/viewtopic.php?t=2164
But a brief answer is, no preempt doesn't make low latency redundant. They can be combined for a greater effect. Low latency has a greater effect but Preempt is a much better way of doing it which is why it was accepted into 2.5. |
|
Back to top |
|
|
c_kuzmanic Guru
Joined: 18 Apr 2002 Posts: 488 Location: Los Angeles , California
|
Posted: Mon Jun 03, 2002 5:44 am Post subject: |
|
|
I tried using them both and for the first time ever experienced some rather nasty X11 crashes when using mplayer to play avi's. Now i'm just using preemptive and my system is rock-stable once more. It does seem that the compination of both of these patches is problematic. |
|
Back to top |
|
|
AutoBot l33t
Joined: 22 Apr 2002 Posts: 968 Location: Usually Out
|
Posted: Mon Jun 03, 2002 5:49 am Post subject: |
|
|
c_kuzmanic wrote: | I tried using them both and for the first time ever experienced some rather nasty X11 crashes when using mplayer to play avi's. Now i'm just using preemptive and my system is rock-stable once more. It does seem that the compination of both of these patches is problematic. |
This has not been a problem for me, so it must be configuration independent. _________________ This message self destructed a long time ago. |
|
Back to top |
|
|
|