lkml.org 
[lkml]   [2008]   [Jun]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH][resubmit] x86: enable preemption in delay
>>> On Wed, Jun 18, 2008 at  8:08 AM, in message <4858C286.BA47.005A.0@novell.com>,
"Gregory Haskins" <ghaskins@novell.com> wrote:
>>>> On Wed, Jun 18, 2008 at 3:55 AM, in message <20080618075518.GD4135@elte.hu>,
> Ingo Molnar <mingo@elte.hu> wrote:
>
>> * Marin Mitov <mitov@issp.bas.bg> wrote:
>>
>>> Why not something like that (do keep in mind I am not an expert :-):
>>>
>>> static void delay_tsc(unsigned long loops)
>>> {
>>> get and store the mask of allowed cpus;
>>> /* prevent the migration */
>>> set the mask of allowed cpus to the current cpu only;
>>> /* is it possible? could it be guaranteed? */
>>> loop for the delay;
>>> restore the old mask of allowed cpus;
>>> }
>>>
>>> You have got the idea. Could it be realized? Is it more expensive than
>>> the current realization? So, comments, please.
>>
>> hm, changing/saving/restorig cpus_allowed is really considered a 'heavy'
>> operation compared to preempt_disable(). On a 4096 CPUs box cpus_allowed
>> is 4096 bits which is half a kilobyte ...
>>
>> preempt_disable()/enable() on the other hand only touches a single
>> variable, (thread_info->preempt_count which is an u32)
>>
>> Ingo
>
> FWIW: I had submitted some "migration disable" patches a while back that
> would solve this without the cpus_allowed manipulations described here. Its
> more expensive than a preempt-disable (but its preemptible), yet its way
> cheaper (and more correct / less racy) than chaning cpus_allowed. I could
> resubmit if there was any interest, though I think Ingo said he didnt like
> the concept on the first pass. Anyway, FYI.

Sorry, should have provided a reference:

http://lkml.org/lkml/2008/2/12/344

>
> -Greg
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html




\
 
 \ /
  Last update: 2008-06-18 14:15    [W:0.105 / U:0.480 seconds]
©2003-2014 Jasper Spaans. Advertise on this site