From: Mark Gross <mgross@linux.co.intel.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: Mark Gross <mgross@linux.co.intel.com>,
Linus Torvalds <torvalds@osdl.org>,
Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] SMP signal latency fix up.
Date: 07 Nov 2003 07:43:10 -0800 [thread overview]
Message-ID: <1068219789.3615.8.camel@localhost.localdomain> (raw)
In-Reply-To: <Pine.LNX.4.56.0311071039490.20509@earth>
On Fri, 2003-11-07 at 01:45, Ingo Molnar wrote:
> On Fri, 6 Nov 2003, Mark Gross wrote:
>
> > }
> > - success = 1;
> > }
> > -#ifdef CONFIG_SMP
> > - else
> > - if (unlikely(kick) && task_running(rq, p) && (task_cpu(p) != smp_processor_id()))
> > - smp_send_reschedule(task_cpu(p));
> > -#endif
> > + success = 1;
>
> hm, this i believe is incorrect - you've moved the 'success' case outside
> of the 'real wakeup' branch.
>
Yup, I was confusing myself a bit on the return symantics of
try_to_wake_up, and the relationship with race between changing
task->state and scheduling a task off a cpu (the "array" test while
holding the rq lock.).
The feeling that this was likely wrong was eating at me all evening and
then it came to me around 8pm when I was driving my son to some thing.
> to avoid races, we only want to report success if the thread has been
> truly placed on the runqueue by this call. The other case (eg. changing
> TASK_INTERRUPTIBLE to TASK_RUNNING) does not count as a 'wakeup'. Note
> that if the task was in a non-TASK_RUNNING state then we dont have to kick
> the process anyway because it's in kernel-mode and will go through the
> signal return path soon.
>
> Ingo
next prev parent reply other threads:[~2003-11-07 23:58 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-11-06 22:49 [PATCH] SMP signal latency fix up Mark Gross
2003-11-06 23:20 ` Linus Torvalds
2003-11-07 1:39 ` Mark Gross
2003-11-07 1:42 ` Mark Gross
2003-11-07 9:45 ` Ingo Molnar
2003-11-07 15:43 ` Mark Gross [this message]
2003-11-07 9:39 ` Ingo Molnar
2003-11-07 15:09 ` Linus Torvalds
2003-11-07 15:17 ` Ingo Molnar
2003-11-07 15:31 ` Ingo Molnar
2003-11-07 15:29 ` Ingo Molnar
2003-11-07 17:03 ` Mark Gross
2003-11-08 6:48 ` Ingo Molnar
2003-11-06 23:26 ` Chris Friesen
2003-11-06 23:35 ` Mark Gross
2003-11-07 0:55 ` Nuno Silva
2003-11-07 10:24 ` Ingo Molnar
-- strict thread matches above, loose matches on Subject: below --
2003-11-06 23:00 Mark Gross
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=1068219789.3615.8.camel@localhost.localdomain \
--to=mgross@linux.co.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=torvalds@osdl.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.