From: Davide Libenzi <davidel@xmailserver.org>
To: Andi Kleen <ak@suse.de>
Cc: linux-kernel@vger.kernel.org, lse-tech@lists.sourceforge.net,
Larry McVoy <lm@bitmover.com>,
David Lang <david.lang@digitalinsight.com>,
Mike Kravetz <mkravetz@sequent.com>
Subject: Re: CPU affinity & IPI latency
Date: Sun, 15 Jul 2001 13:31:12 -0700 (PDT) [thread overview]
Message-ID: <XFMail.20010715133112.davidel@xmailserver.org> (raw)
In-Reply-To: <20010715221542.B14480@gruyere.muc.suse.de>
On 15-Jul-2001 Andi Kleen wrote:
> On Fri, Jul 13, 2001 at 03:43:05PM -0700, Mike Kravetz wrote:
>> - Define a new field in the task structure 'saved_cpus_allowed'.
>> With a little collapsing of existing fields, there is room to put
>> this on the same cache line as 'cpus_allowed'.
>> - In reschedule_idle() if we determine that the best CPU for a task
>> is the CPU it is associated with (p->processor), then temporarily
>> bind the task to that CPU. The task is temporarily bound to the
>> CPU by overwriting the 'cpus_allowed' field such that the task can
>> only be scheduled on the target CPU. Of course, the original
>> value of 'cpus_allowed' is saved in 'saved_cpus_allowed'.
>> - In schedule(), the loop which examines all tasks on the runqueue
>> will restore the value of 'cpus_allowed'.
>
> This sounds racy, at least with your simple description. Even other CPUs
> could walk their run queue while the IPI is being processed and reset the
> cpus_allowed flag too early. I guess it would need a check in the
> schedule loop that restores cpus_allowed that the current CPU is the only
> on set in that task's cpus_allowed. This unfortunately would hang the
> process if the CPU for some reason cannot process schedules timely, so
> it may be needed to add a timestamp also to the task_struct that allows
> the restoration of cpus_allowed even from non target CPUs after some
> time.
I previously expressed ( maybe in this thread, I don't remember ) my idea of
not touching ( hacking ) the current scheduler to let it fit to SMP, that IMHO,
has different problems and needs different answers.
Anyway, as I said a couple of messages ago, the solution of this problem could
be to move the moved task in a private ( per CPU ) wakeup list that, when the
idle comes up, it'll be ran.
- Davide
next prev parent reply other threads:[~2001-07-15 20:28 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-07-12 23:40 CPU affinity & IPI latency Mike Kravetz
2001-07-13 0:22 ` Davide Libenzi
2001-07-13 0:36 ` Larry McVoy
2001-07-13 2:06 ` Mark Hahn
2001-07-13 16:41 ` Davide Libenzi
2001-07-13 17:31 ` Mike Kravetz
2001-07-13 19:17 ` Davide Libenzi
2001-07-13 19:39 ` [Lse-tech] " Gerrit Huizenga
2001-07-13 20:05 ` Davide Libenzi
2001-07-13 17:05 ` Mike Kravetz
2001-07-13 19:51 ` David Lang
2001-07-13 22:43 ` Mike Kravetz
2001-07-15 20:02 ` Davide Libenzi
2001-07-15 20:10 ` [Lse-tech] " Andi Kleen
2001-07-15 20:15 ` Andi Kleen
2001-07-15 20:31 ` Davide Libenzi [this message]
2001-07-16 15:46 ` [Lse-tech] " Mike Kravetz
2001-07-13 19:54 ` Chris Wedgwood
2001-07-15 7:42 ` Troy Benjegerdes
2001-07-15 9:05 ` [Lse-tech] " Andi Kleen
2001-07-15 17:00 ` Troy Benjegerdes
2001-07-16 0:58 ` Mike Kravetz
-- strict thread matches above, loose matches on Subject: below --
2001-07-14 3:25 Hubertus Franke
2001-07-16 16:14 ` Mike Kravetz
2001-07-16 21:25 ` Davide Libenzi
2001-07-16 10:10 Hubertus Franke
2001-07-16 16:16 ` Davide Libenzi
2001-07-16 18:26 Hubertus Franke
2001-07-16 21:45 Hubertus Franke
2001-07-16 22:56 ` Davide Libenzi
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=XFMail.20010715133112.davidel@xmailserver.org \
--to=davidel@xmailserver.org \
--cc=ak@suse.de \
--cc=david.lang@digitalinsight.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lm@bitmover.com \
--cc=lse-tech@lists.sourceforge.net \
--cc=mkravetz@sequent.com \
/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