public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mike Galbraith <bitbucket@online.de>
To: Kirill Tkhai <tkhai@yandex.ru>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	Ingo Molnar <mingo@redhat.com>,
	Peter Zijlstra <peterz@infradead.org>
Subject: Re: [PATCH] sched: Add logic to handle parallel try_to_wake_up() of the same task
Date: Sun, 14 Jul 2013 07:55:16 +0200	[thread overview]
Message-ID: <1373781316.7242.34.camel@marge.simpson.net> (raw)
In-Reply-To: <1517081373730349@web23d.yandex.ru>

On Sat, 2013-07-13 at 19:45 +0400, Kirill Tkhai wrote: 
> This patch adds optimization of try_to_wake_up() function
> for cases when the system is doing parallel wake_up
> of the same task on the different cpus. Also it adds
> accounting the statistics of these situations.
> 
> We check the status of the task we want to wake up.
> If it is TASK_WAKING then the task is manipulated
> by try_to_wake_up() on another cpu. And after this
> check it will be a moment when the task is queued
> and his status is TASK_RUNNING. We just return
> earlier when we are sure the task will be TASK_RUNNING
> in the future (maybe right after the check). The profit is
> we don't loop while we are waiting the spinlock.

Hm, you're adding cycles to the common case to shave spin cycles in the
very rare case, then spending some to note that a collision happened.
What makes recording worth even 1 cycle?  What am I gonna do with the
knowledge that $dinkynum wakeups intersected at a some random task?

-Mike



  reply	other threads:[~2013-07-14  5:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-13 15:45 [PATCH] sched: Add logic to handle parallel try_to_wake_up() of the same task Kirill Tkhai
2013-07-14  5:55 ` Mike Galbraith [this message]
2013-07-15  6:31 ` Peter Zijlstra
2013-07-15 14:14   ` Kirill Tkhai
2013-07-15 20:19     ` Peter Zijlstra
2013-07-15 20:22       ` Kirill Tkhai

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=1373781316.7242.34.camel@marge.simpson.net \
    --to=bitbucket@online.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=tkhai@yandex.ru \
    /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