Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Pre-emptive vs low-latency patch discrepancy?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
474
l33t
l33t


Joined: 19 Apr 2002
Posts: 714

PostPosted: Thu May 09, 2002 11:15 am    Post subject: Pre-emptive vs low-latency patch discrepancy? Reply with quote

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
View user's profile Send private message
friedmud
Apprentice
Apprentice


Joined: 18 Apr 2002
Posts: 258
Location: Austin, TX USA

PostPosted: Thu May 09, 2002 4:45 pm    Post subject: Low Latency and Pre-empt opinions!?!? Reply with quote

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
View user's profile Send private message
474
l33t
l33t


Joined: 19 Apr 2002
Posts: 714

PostPosted: Thu May 09, 2002 7:16 pm    Post subject: My 2 pence worth ... Reply with quote

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! :wink:

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
View user's profile Send private message
arkane
l33t
l33t


Joined: 30 Apr 2002
Posts: 918
Location: Phoenix, AZ

PostPosted: Thu May 09, 2002 9:02 pm    Post subject: Reply with quote

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
View user's profile Send private message
Coogee
Apprentice
Apprentice


Joined: 23 Apr 2002
Posts: 184
Location: E.U.

PostPosted: Thu May 09, 2002 10:51 pm    Post subject: Reply with quote

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
View user's profile Send private message
Malakin
Veteran
Veteran


Joined: 14 Apr 2002
Posts: 1692
Location: Victoria BC Canada

PostPosted: Fri May 10, 2002 12:44 am    Post subject: Reply with quote

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
View user's profile Send private message
Malakin
Veteran
Veteran


Joined: 14 Apr 2002
Posts: 1692
Location: Victoria BC Canada

PostPosted: Fri May 10, 2002 12:57 am    Post subject: Reply with quote

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
View user's profile Send private message
c_kuzmanic
Guru
Guru


Joined: 18 Apr 2002
Posts: 488
Location: Los Angeles , California

PostPosted: Mon Jun 03, 2002 5:44 am    Post subject: Reply with quote

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
View user's profile Send private message
AutoBot
l33t
l33t


Joined: 22 Apr 2002
Posts: 968
Location: Usually Out

PostPosted: Mon Jun 03, 2002 5:49 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum