[lkml]   [2002]   [Jan]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] One-liner typo 2.5.3-pre3 in ppc/kernel/idle.c

> Looks like need_resched conversion error.

Actually there is a (badly commented) optimisation here. (OK so it isn't
commented at all :)

The code used to say:

int oldval = xchg(&current->need_resched, -1);

if (!oldval) {
while(current->need_resched == -1)
; /* Do Nothing */

We atomically grab the current value of need_resched and replace it with
-1. The -1 tells the scheduler that we are busy looping and it doesnt need
to send an IPI to force a reschedule.

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: 2005-03-22 13:18    [W:0.058 / U:3.932 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site