[lkml]   [2006]   [Jun]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: 2.6.16-rc6-mm2
Andi Kleen wrote:
> On Tuesday 13 June 2006 07:08, Keith Owens wrote:
>>Andi Kleen (on Tue, 13 Jun 2006 06:56:45 +0200) wrote:
>>>>I have previously suggested a lightweight solution that pins a process
>>>>to a cpu
>>>That is preempt_disable()/preempt_enable() effectively
>>>It's also light weight as much as these things can be.
>>The difference being that preempt_disable() does not allow the code to
>>sleep. There are some places where we want to use cpu local data
>>the code can tolerate preemption and even sleeping, as long as the
>>process schedules back on the same cpu.
> Seems like a pretty obscure case to optimize for.
> Anyways if you want to do that you can always do
> disable_preempt();
> set thread affinity mask to current cpu
> enable_preempt();
> do weird stuff and sleep ... ;
> restore affinity mask
> Can any of these people proposing "solutions" in this thread
> demonstrate this stuff is actually performance critical?

You can't do this in general, because CPU hotplug will reset the
affinity mask if the CPU is unplugged. I'd just say: don't do that.

However you can get some similar functionality by putting stuff in

SUSE Labs, Novell Inc.
Send instant messages to your online friends

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2006-06-13 07:45    [W:0.065 / U:14.212 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site