lkml.org 
[lkml]   [2013]   [Aug]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC] per-cpu preempt_count
On 08/12/2013 10:35 AM, Linus Torvalds wrote:
>
> Agreed. Making it atomic would suck, and cancel all advantages of the
> better code generation to access it. Good point.
>
> And yeah, it could be two variables in the same cacheline or something.
>

So we would have code looking something like:

decl %fs:preempt_count
jnz 1f
cmpb $0,%fs:need_resched
je 1f
call __preempt_schedule
1:

It's a nontrivial amount of code, but would seem a fair bit better than
what we have now, at least.

-hpa



\
 
 \ /
  Last update: 2013-08-12 23:21    [W:0.135 / U:0.948 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site