All of lore.kernel.org
 help / color / mirror / Atom feed
From: Davidlohr Bueso <dave@stgolabs.net>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: bigeasy@linutronix.de, peterz@infradead.org,
	linux-kernel@vger.kernel.org, dbueso@suse.de,
	rostedt@goodmis.org, mingo@kernel.org, hpa@zytor.com,
	torvalds@linux-foundation.org, linux-tip-commits@vger.kernel.org,
	stable@vger.kernel.org
Subject: Re: [tip:sched/core] sched/core: Reset task' s lockless wake-queues on fork()
Date: Sat, 9 Jan 2016 11:25:17 -0800	[thread overview]
Message-ID: <20160109192517.GA6139@linux-uzut.site> (raw)
In-Reply-To: <alpine.DEB.2.11.1601081041220.3575@nanos>

On Fri, 08 Jan 2016, Thomas Gleixner wrote:

>On Wed, 6 Jan 2016, tip-bot for Sebastian Andrzej Siewior wrote:
>
>> Commit-ID:  093e5840ae76f1082633503964d035f40ed0216d
>> Gitweb:     http://git.kernel.org/tip/093e5840ae76f1082633503964d035f40ed0216d
>> Author:     Sebastian Andrzej Siewior <bigeasy@linutronix.de>
>> AuthorDate: Mon, 21 Dec 2015 18:17:10 +0100
>> Committer:  Ingo Molnar <mingo@kernel.org>
>> CommitDate: Wed, 6 Jan 2016 11:01:07 +0100
>>
>> sched/core: Reset task's lockless wake-queues on fork()
>>
>> In the following commit:
>>
>>   7675104990ed ("sched: Implement lockless wake-queues")
>>
>> we gained lockless wake-queues.
>>
>> The -RT kernel managed to lockup itself with those. There could be multiple
>> attempts for task X to enqueue it for a wakeup _even_ if task X is already
>> running.
>>
>> The reason is that task X could be runnable but not yet on CPU. The the
>> task performing the wakeup did not leave the CPU it could performe
>> multiple wakeups.
>>
>> With the proper timming task X could be running and enqueued for a
>> wakeup. If this happens while X is performing a fork() then its its
>> child will have a !NULL `wake_q` member copied.
>>
>> This is not a problem as long as the child task does not participate in
>> lockless wakeups :)

It also makes sense in that a new task has no business inherinting whatever
pending wakeups the parent is involved in. It should get a fresh wake_q.

>>
>> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
>> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
>> Cc: Davidlohr Bueso <dbueso@suse.de>
>> Cc: Linus Torvalds <torvalds@linux-foundation.org>
>> Cc: Peter Zijlstra <peterz@infradead.org>
>> Cc: Steven Rostedt <rostedt@goodmis.org>
>> Cc: Thomas Gleixner <tglx@linutronix.de>
>> Fixes: 7675104990ed ("sched: Implement lockless wake-queues")
>
>Shouldn't that go into stable?

Yes, as of v4.2 afaict. Ccing.

Thanks,
Davidlohr

      reply	other threads:[~2016-01-09 19:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-21 17:17 [PATCH] sched: reset task's lockless wake-queues on fork() Sebastian Andrzej Siewior
2016-01-06 18:48 ` [tip:sched/core] sched/core: Reset task' s " tip-bot for Sebastian Andrzej Siewior
2016-01-08  9:41   ` Thomas Gleixner
2016-01-09 19:25     ` Davidlohr Bueso [this message]

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=20160109192517.GA6139@linux-uzut.site \
    --to=dave@stgolabs.net \
    --cc=bigeasy@linutronix.de \
    --cc=dbueso@suse.de \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=stable@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.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.