Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
To preempt or not to preempt
View unanswered posts
View posts from last 24 hours

Goto page 1, 2, 3  Next  
Reply to topic    Gentoo Forums Forum Index Gentoo Chat
View previous topic :: View next topic  

Do you have preempt enabled in your kernel?
Yes
73%
 73%  [ 124 ]
No
26%
 26%  [ 44 ]
Total Votes : 168

Author Message
petrjanda
Veteran
Veteran


Joined: 05 Sep 2003
Posts: 1557
Location: Brno, Czech Republic

PostPosted: Wed Jul 07, 2004 12:09 pm    Post subject: To preempt or not to preempt Reply with quote

Do you use a preemptive kernel?
_________________
There is, a not-born, a not-become, a not-made, a not-compounded. If that unborn, not-become, not-made, not-compounded were not, there would be no escape from this here that is born, become, made and compounded. - Gautama Siddharta
Back to top
View user's profile Send private message
mixa
Tux's lil' helper
Tux's lil' helper


Joined: 05 Mar 2004
Posts: 133
Location: Finland

PostPosted: Wed Jul 07, 2004 12:21 pm    Post subject: Reply with quote

Yes, I've used pre-emptive kernels since 2.6.0 :)
Back to top
View user's profile Send private message
steel300
Veteran
Veteran


Joined: 10 Jul 2003
Posts: 1155

PostPosted: Wed Jul 07, 2004 12:22 pm    Post subject: Reply with quote

Win2K actually runs on a preemptive kernel. If I were back in linux under a 2.6 kernel there's no chance I'd be running preempt.
_________________
Rationality is the recognition of the fact that nothing can alter the truth and nothing can take precedence over that act of perceiving it.
Back to top
View user's profile Send private message
playfool
l33t
l33t


Joined: 01 Jun 2004
Posts: 688
Location: Århus, Denmark

PostPosted: Wed Jul 07, 2004 12:28 pm    Post subject: Reply with quote

steel300 wrote:
Win2K actually runs on a preemptive kernel. If I were back in linux under a 2.6 kernel there's no chance I'd be running preempt.


I voted no, I'm pretty sure the default RedHat kernel has that feature disabled, since it's suspected of doing bad things, I can't really tell if it's on or off.
Back to top
View user's profile Send private message
Pink
Veteran
Veteran


Joined: 24 Jul 2003
Posts: 1062

PostPosted: Wed Jul 07, 2004 12:36 pm    Post subject: Reply with quote

Big no from me :D
Back to top
View user's profile Send private message
AlterEgo
Veteran
Veteran


Joined: 25 Apr 2002
Posts: 1619

PostPosted: Wed Jul 07, 2004 12:57 pm    Post subject: Reply with quote

I run pre-empt on 2.4 kernels.
On 2.6 kernels, I think is has outlived its usefulness.
http://lkml.org/lkml/2004/3/18/130
Back to top
View user's profile Send private message
neenee
Veteran
Veteran


Joined: 20 Jul 2003
Posts: 1786

PostPosted: Wed Jul 07, 2004 1:04 pm    Post subject: Reply with quote

i use it and i can tell the difference.
Back to top
View user's profile Send private message
Hauser
l33t
l33t


Joined: 27 Dec 2003
Posts: 650
Location: 4-dimensional hyperplane

PostPosted: Wed Jul 07, 2004 1:11 pm    Post subject: Reply with quote

Why not.
_________________
AMD Athlon XP 2600+; 512M RAM;
nVidia FX5700LE; Hitachi 120Gb
2.6.9-nitro4, reiser4, linux26-headers+nptl

Do I like to compile everything?
Positive definite!
Back to top
View user's profile Send private message
yngwin
Retired Dev
Retired Dev


Joined: 19 Dec 2002
Posts: 4572
Location: Suzhou, China

PostPosted: Wed Jul 07, 2004 2:33 pm    Post subject: Reply with quote

I use low-latency instead.
Back to top
View user's profile Send private message
Malakin
Veteran
Veteran


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

PostPosted: Wed Jul 07, 2004 9:19 pm    Post subject: Reply with quote

Quote:
Win2K actually runs on a preemptive kernel.
Every source I can find says Win2K does not run on a preemptive kernel. Do you have any reliable sources that state otherwise?
Back to top
View user's profile Send private message
steel300
Veteran
Veteran


Joined: 10 Jul 2003
Posts: 1155

PostPosted: Wed Jul 07, 2004 9:22 pm    Post subject: Reply with quote

Malakin wrote:
Quote:
Win2K actually runs on a preemptive kernel.
Every source I can find says Win2K does not run on a preemptive kernel. Do you have any reliable sources that state otherwise?


Any source I pull will be labelled as FUD and Microsoft BS, so I really don't feel like wasting either of our time with this.
_________________
Rationality is the recognition of the fact that nothing can alter the truth and nothing can take precedence over that act of perceiving it.
Back to top
View user's profile Send private message
spb
Retired Dev
Retired Dev


Joined: 02 Jan 2004
Posts: 2135
Location: Cambridge, UK

PostPosted: Wed Jul 07, 2004 9:27 pm    Post subject: Reply with quote

I've got it on, just because it's on by default, and I never noticed a great difference with it off.
Back to top
View user's profile Send private message
playfool
l33t
l33t


Joined: 01 Jun 2004
Posts: 688
Location: Århus, Denmark

PostPosted: Wed Jul 07, 2004 9:46 pm    Post subject: Reply with quote

Actually Windows has fully preemptive scheduling since 2000 I think, it wouldn't surprise me if their kernel was preemptive as well.
Back to top
View user's profile Send private message
apeitheo
Apprentice
Apprentice


Joined: 09 Jan 2004
Posts: 222

PostPosted: Wed Jul 07, 2004 10:24 pm    Post subject: Reply with quote

steel300 wrote:
Malakin wrote:
Quote:
Win2K actually runs on a preemptive kernel.
Every source I can find says Win2K does not run on a preemptive kernel. Do you have any reliable sources that state otherwise?


Any source I pull will be labelled as FUD and Microsoft BS, so I really don't feel like wasting either of our time with this.

Try us. :roll:
Back to top
View user's profile Send private message
placeholder
Advocate
Advocate


Joined: 07 Feb 2004
Posts: 2500

PostPosted: Wed Jul 07, 2004 10:37 pm    Post subject: Reply with quote

Heck, the Windows kernel is merely a DLL wrapper so it probably isn't preemptive although some other C:/windows/system32/*.dll it wraps into the system, whether it's used or not, might be.

I use a preemptive kernel and don't think I've ever used a non-preemptive one so I don't know whether or not it's any better or worse. However, it sounds as if it would be like having DMA turned off almost all the time. I myself would rather have smooth running under heavy load. I don't ever recall any version of Windows doing that, especially not 98 or XP and I used Win2K at school for several months and that thing would get slow as when doing CPU-intensive things.

So if the Windows2K (or whatever other version) 'kernel' actually has preemptability, it sure doesn't work very well.
Back to top
View user's profile Send private message
apeitheo
Apprentice
Apprentice


Joined: 09 Jan 2004
Posts: 222

PostPosted: Thu Jul 08, 2004 12:08 am    Post subject: Reply with quote

I have preempt turned on in the kernel, only because the kernel help file for it, says that if you're building the kernel for a desktop computer, you should turn it on. Oh and it says "If unsure select Y" :wink: So if someone would point out why I shouldn't, I'll be glad to know why.
Back to top
View user's profile Send private message
placeholder
Advocate
Advocate


Joined: 07 Feb 2004
Posts: 2500

PostPosted: Thu Jul 08, 2004 12:19 am    Post subject: Reply with quote

Nightgrave wrote:
I have preempt turned on in the kernel, only because the kernel help file for it, says that if you're building the kernel for a desktop computer, you should turn it on. Oh and it says "If unsure select Y" :wink: So if someone would point out why I shouldn't, I'll be glad to know why.


Those are also some very good reasons.... Seeing that I didn't code the kernel, I'd rather listen to Linus or one of the other kernel devs. :wink:
Back to top
View user's profile Send private message
neenee
Veteran
Veteran


Joined: 20 Jul 2003
Posts: 1786

PostPosted: Thu Jul 08, 2004 7:21 am    Post subject: Reply with quote

Nightgrave wrote:
steel300 wrote:
Malakin wrote:
Quote:
Win2K actually runs on a preemptive kernel.
Every source I can find says Win2K does not run on a preemptive kernel. Do you have any reliable sources that state otherwise?


Any source I pull will be labelled as FUD and Microsoft BS, so I really don't feel like wasting either of our time with this.

Try us. :roll:


i agree.. i mean.. it's true that many - those who are still stuck in
the 'i am a linux user and therefor i should at least dislike microsoft
and all of their products regardless of me enjoying a game of 'age
of empires' now and then - would try to dismiss anything in favor of
microsoft as anything but the truth, but that doesn't mean all of us
are MS-bashers.

if you know your way around it, windows works fine. it just seems
that some prefer complaining to solving their issues with it.

i used it for years and i did so (..drumroll..) voluntarily - i was as
passionate about it as i now am about linux.. and as with a good lo-
ver, i doubt i'll ever forget the good times we had together.

:wink:
Back to top
View user's profile Send private message
apeitheo
Apprentice
Apprentice


Joined: 09 Jan 2004
Posts: 222

PostPosted: Thu Jul 08, 2004 7:41 am    Post subject: Reply with quote

neenee wrote:
i agree.. i mean.. it's true that many - those who are still stuck in
the 'i am a linux user and therefor i should at least dislike microsoft
and all of their products regardless of me enjoying a game of 'age
of empires' now and then - would try to dismiss anything in favor of
microsoft as anything but the truth, but that doesn't mean all of us
are MS-bashers.

if you know your way around it, windows works fine. it just seems
that some prefer complaining to solving their issues with it.

i used it for years and i did so (..drumroll..) voluntarily - i was as
passionate about it as i now am about linux.. and as with a good lo-
ver, i doubt i'll ever forget the good times we had together.

Yeah well, for some reason I think steel300 is just trying to be contrary, and start an uproar.
Back to top
View user's profile Send private message
placeholder
Advocate
Advocate


Joined: 07 Feb 2004
Posts: 2500

PostPosted: Thu Jul 08, 2004 8:22 am    Post subject: Reply with quote

neenee wrote:
Nightgrave wrote:
steel300 wrote:
Malakin wrote:
Quote:
Win2K actually runs on a preemptive kernel.
Every source I can find says Win2K does not run on a preemptive kernel. Do you have any reliable sources that state otherwise?


Any source I pull will be labelled as FUD and Microsoft BS, so I really don't feel like wasting either of our time with this.

Try us. :roll:


i agree.. i mean.. it's true that many - those who are still stuck in
the 'i am a linux user and therefor i should at least dislike microsoft
and all of their products regardless of me enjoying a game of 'age
of empires' now and then - would try to dismiss anything in favor of
microsoft as anything but the truth, but that doesn't mean all of us
are MS-bashers.

if you know your way around it, windows works fine. it just seems
that some prefer complaining to solving their issues with it.

i used it for years and i did so (..drumroll..) voluntarily - i was as
passionate about it as i now am about linux.. and as with a good lo-
ver, i doubt i'll ever forget the good times we had together.

:wink:


Funny, all I can remember are the viruses from Kazaa lite, BSOD, losing anime and other data, and etc. You might say that it's the user's fault and it probably is, but if the OS doesn't let you know how it works or boot non-GUI with an actually useful command line, then IMO that's a shitty OS. I hate proprietary, because the EULA for Wndows states that you don't actually own your copy of MS, you just own a license. Also, anything you store on a FAT* filesystem is legally property of MS, especially if you use WMA or etc.

I don't hate Windows because I run Linux, no matter what stupid shit you want to conjur up. I hate MS/Windows because I lost over 50gb of data with it, MS can easily possess your HDD if it has a FAT* filesystem and make you pay royalties to get it back, MS brought down the Sega Dreamcast, I can only learn as much as the Redmond programmers want to me, I can't compile my own so pretty much every little DLL driver gets wrapped into the kernel making boot time longer, I can't customize it more than the Redmond programmers want me to unless I pay ridiculously high prices for third party software that's not even as stable as open source apps, it's closed source so I can't hack code and fix bugs[there are many bugs in Windows that MS might never fix] on my own, and etc. However, if Windows changes and gets a useful terminal and goes open source (which MS it thinking about doing) then I would at least try it out via dual-boot.

It's funny how people try to say that all people that use Linux hate Windows because they use Linux, and they have no fricken' proof since they can't get into your mind. Remember, other people may have used Windows more than you causing the normal-use slowdown to kick-in even with it being defragmented once a week. Some people have different experiences which cause different opinions, so get the hell over yourself.

As for steel300, he's either become completely oblivious to things lately (totally tried to deny that IMblaze was made from the Gaim source code although the screenshots and the fact the debug windows says "Gaim" didn't matter to him. He's either been brainwashed by MS or has completely lost touch with the real world.

~Pwnz3r(Kiss my ass, it has many vitamins and minerals like "stfu" and "RPHDO"[Realization that People Have Differing Opinions].)
Back to top
View user's profile Send private message
John5788
Advocate
Advocate


Joined: 06 Apr 2004
Posts: 2140
Location: 127.0.0.1

PostPosted: Thu Jul 08, 2004 9:59 am    Post subject: Reply with quote

what the difference in a preemptive kernel and a nonpreemptive kernel?
_________________
John5788
Back to top
View user's profile Send private message
placeholder
Advocate
Advocate


Joined: 07 Feb 2004
Posts: 2500

PostPosted: Thu Jul 08, 2004 10:25 am    Post subject: Reply with quote

John5788 wrote:
what the difference in a preemptive kernel and a nonpreemptive kernel?


I read the help on it earlier in menuconfig and it's used in order to make everything run smoothly even under heavy CPU load and is useful for desktops/workstations.
Back to top
View user's profile Send private message
beandog
Bodhisattva
Bodhisattva


Joined: 04 May 2003
Posts: 2072
Location: /usa/utah

PostPosted: Thu Jul 08, 2004 2:21 pm    Post subject: Reply with quote

Here's why I don't use preemptive kernel ...

from ck-sources page:

Quote:
Preempt?
I recommend disabling preemption in the kernel configuration! It causes poorly written applications to misbehave far more. The gains in lateny with in-kernel preemption in 2.6 would not be noticable to a human, unlike 2.4 which had much larger latencies in the kernel.


I dont pretend to understand things, but I know I like the ck-sources, so, whatever... no preempt, and things are still supah-fast. :)

Edit: doh! a link would be nice .. http://members.optusnet.com.au/ckolivas/kernel/
_________________
If it ain't broke, tweak it. dvds | blurays | blog | wiki
Back to top
View user's profile Send private message
DiskBreaker
Apprentice
Apprentice


Joined: 07 Oct 2003
Posts: 224

PostPosted: Thu Jul 08, 2004 2:27 pm    Post subject: Reply with quote

The complete discussion on lkml regarding the use of kernel preemption is summed up here: http://kerneltrap.org/node/view/2702. It looks like everyone there agrees that ever since preemption has been part of the linux kernel, a lot of locking bugs especially in SMP code have been found & fixed. Wether or not to enable it for a production system is debatable. I have not experienced any speed gain at all with preempt so I usually turn it off.

John5788 wrote:
what the difference in a preemptive kernel and a nonpreemptive kernel?


I am not an expert on this, so correct me if I'm wrong. Basically a preemptive kernel can suspend some program (pushes it back onto the stack) that is executing and instead give another program some CPU time. Criteria on when to preempt could be e.g. the elapsed time of the currently running process (time-slicing) or the priority of the process. This helps if a process suddenly decided to occupy all of the CPU for a long time and your system locks up.

This sounds good initially, but a problem occurs if a process is holding a lock. The kernel will only be able to suspend the process after it has released its lock and so it has to wait. Therefore preemptiveness is more useful if lock times are relatively short. The argument here for preemptive kernels is that the time the kernel has to wait for the lock to be released will always be smaller than the time the longest possible system call would take (e.g. in a badly coded application that suddenly takes over 100% of your CPU). But since the 2.6 kernel has been improved a lot and there isn't much latency it is questionable if a preemptive kernel would offer any speed gain (keep in mind that the additional preemption code also adds some overhead to the kernel).

I guess you should try it for yourself and see if you like it or not :)

hth,
disk
Back to top
View user's profile Send private message
placeholder
Advocate
Advocate


Joined: 07 Feb 2004
Posts: 2500

PostPosted: Thu Jul 08, 2004 2:41 pm    Post subject: Reply with quote

Is there any way to turn off preempt without a reboot? If not I think I'll wait a little bit or feel froggy and do it anyway. lol
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo Chat All times are GMT
Goto page 1, 2, 3  Next
Page 1 of 3

 
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