Skip to contentSkip to conversation

status of Preemptible Kernel 2.6.7

DISCUSSION Marcus Hartig 3 participants 7 messages Jun 23, 2004 – Jun 24, 2004

lore
Share & tools
lore
#0 lore raw

Hello,

how is now the status of the preemptible feature of the kernel 2.6.7. Should preempt be used for desktop systems (like in the help menu) or should it not really?

I have made tests with the alsa-latency-test, where it not really reduces the latency of the kernel and gives a little bit lower performance of the whole system.

Regards,
Pl.cc me.

Marcus

Signature · 1 line
www.marcush.de
#1 lore raw
Quoted 5 lines · Marcus Hartig

Hello,

how is now the status of the preemptible feature of the kernel 2.6.7. Should preempt be used for desktop systems (like in the help menu) or should it not really?

I have made tests with the alsa-latency-test, where it not really reduces the latency of the kernel and gives a little bit lower performance of the whole system.

I vaguely recall someone recently talking about eliminating preempt by improving low-latency. See, if everything were ideal, we wouldn't need preempt, because all drivers would yield the CPU at appropriate times. Supposedly, preempt introduces some undesirable overhead.

Perhaps we could turn preempt into some kind of watch-dog. If a kernel thread doesn't behave, it gets killed. :)

#2 lore raw
Quoted 3 lines · Timothy Miller

I vaguely recall someone recently talking about eliminating preempt by improving low-latency. See, if everything were ideal, we wouldn't need preempt, because all drivers would yield the CPU at appropriate times.

If everything held locks for only sane periods of time, we would not need gross explicit yielding all over the place.

To answer Marcus's question: go for it and use it.

Robert Love

#3 lore raw
Quoted 10 lines · Robert Love
Quoted 1 line · Timothy Miller

I vaguely recall someone recently talking about eliminating preempt by improving low-latency. See, if everything were ideal, we wouldn't need preempt, because all drivers would yield the CPU at appropriate times.

If everything held locks for only sane periods of time, we would not need gross explicit yielding all over the place.

To answer Marcus's question: go for it and use it.

I wasn't talking about locks. I was talking about kernel functions taking long periods of time, cases where preempt has been useful to reduce kernel latency.

Holding locks for extended periods is something else entirely.

I presume there are sane cases where a kernel function will need to execute for a "long time", like when doing PIO disk access or COW, etc.
It would be good to have a way to limit the impact of those functions
in terms of user-perceived latency, just as preempt has done, but without preempt.

At least, I thought that was the idea.

Now, the thing is, if you have explicit cooperative yields, then a slow CPU might not yield often enough, and a fast CPU would yield too often.
Preempt has the advantage of using real time so that CPUs can
maximize throughput without affecting latency.

#4 lore raw
Quoted 5 lines · Timothy Miller

I wasn't talking about locks. I was talking about kernel functions taking long periods of time, cases where preempt has been useful to reduce kernel latency.

Holding locks for extended periods is something else entirely.

I know what you were talking about. I was replying that it seems better overall to me if we work to eliminate long lock hold times (which then eliminates long non-preemption times) than litter the kernel with explicit rescheduling statements.

Robert Love

#5 lore raw
Quoted 5 lines · Robert Love
Quoted 2 lines · Timothy Miller

I wasn't talking about locks. I was talking about kernel functions taking long periods of time, cases where preempt has been useful to reduce kernel latency.

Quoted 7 lines
Quoted 1 line

Holding locks for extended periods is something else entirely.

I know what you were talking about. I was replying that it seems better overall to me if we work to eliminate long lock hold times (which then eliminates long non-preemption times) than litter the kernel with explicit rescheduling statements.

Yes, getting rid of locks does seem to be a more immediately productive thing to do.

Are there any cases where we claim locks on data, rather than metadata?
That is to say, one would prefer to lock, claim a pointer or reference
or such, and then unlock, rather than to lock, manipulate data, and then unlock, right?

There might be situations where the data structures involved are larger (more pointers, flags, etc.), but we can get control of data without having to hold a lock on it.

Am I making sense? :)

#6 lore raw
In reply to Robert Love
Quoted 1 line · Robert Love

To answer Marcus's question: go for it and use it.

Ok, thanks for an answer. I will try it again with preempt and today I make some latency tests with 2.6.7.

Regards,

Marcus

Signature · 1 line
www.marcush.de