From: Anton Blanchard <anton@samba.org>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: paulus@samba.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] One-liner typo 2.5.3-pre3 in ppc/kernel/idle.c
Date: Wed, 23 Jan 2002 16:31:18 +1100 [thread overview]
Message-ID: <20020123053118.GB14366@krispykreme> (raw)
In-Reply-To: <E16TFDk-0007wc-00@wagner.rustcorp.com.au>
In-Reply-To: <E16TFDk-0007wc-00@wagner.rustcorp.com.au>
> 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(¤t->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.
Anton
next prev parent reply other threads:[~2002-01-23 5:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-01-23 4:41 Rusty Russell
2002-01-23 5:31 ` Anton Blanchard [this message]
2002-01-23 6:00 ` Rusty Russell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20020123053118.GB14366@krispykreme \
--to=anton@samba.org \
--cc=linux-kernel@vger.kernel.org \
--cc=paulus@samba.org \
--cc=rusty@rustcorp.com.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®