From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: ego@in.ibm.com
Cc: Srivatsa Vaddagiri <vatsa@in.ibm.com>,
Linus Torvalds <torvalds@linux-foundation.org>,
Pavel Machek <pavel@ucw.cz>, Oleg Nesterov <oleg@tv-sign.ru>,
Andrew Morton <akpm@linux-foundation.org>,
LKML <linux-kernel@vger.kernel.org>,
Dipankar Sarma <dipankar@in.ibm.com>, Ingo Molnar <mingo@elte.hu>,
Paul E McKenney <paulmck@us.ibm.com>
Subject: Re: [RFD] Freezing of kernel threads
Date: Mon, 14 May 2007 12:07:21 +0200 [thread overview]
Message-ID: <200705141207.23002.rjw@sisk.pl> (raw)
In-Reply-To: <20070514072659.GA16236@in.ibm.com>
On Monday, 14 May 2007 09:26, Gautham R Shenoy wrote:
> On Mon, May 14, 2007 at 11:48:46AM +0530, Srivatsa Vaddagiri wrote:
> >
> > The other complication get/put_hotcpu() had was dealing with
> > write-followed-by-read lock attempt by the *same* thread (whilst doing
> > cpu_down/up). IIRC this was triggered by some callback processing in CPU_DEAD
> > or CPU_DOWN_PREPARE.
> >
> >
> > cpu_down()
> > |- take write lock
> > |- CPU_DOWN_PREPARE
> > | |- foo() wants a read_lock
> >
> > Stupid as it sounds, it was really found to be happening! Gautham, do you
> > recall who that foo() was? Somebody in cpufreq I guess ..
>
> IIRC, it was a problem with ondemand. while handling CPU_DEAD, ondemand code
> would call destroy_workqueue, which tried flushing the workqueue, which
> once upon a time did lock_cpu_hotplug, before Oleg and Andrew cleaned
> that up.
>
> Ofcourse, cpufreq works fine now after Venki's patches which
> just nullifies the reference to the policy structure of the cpu to be
> removed during the CPU_DOWN_PREPARE by calling __cpufreq_remove_dev
> instead of handling it in CPU_DEAD.
>
> However, as we have discovered, without freezing all the threads, it
> is inadvisable to call flush_workqueue from a cpu-hotplug callback
> path.
Please see my recent patch at http://lkml.org/lkml/2007/5/14/7 .
It's not exactly the same thing, but I think the trick in there might be
useful.
Greetings,
Rafael
next prev parent reply other threads:[~2007-05-14 10:02 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-12 18:17 [RFD] Freezing of kernel threads Rafael J. Wysocki
2007-05-12 18:25 ` Linus Torvalds
2007-05-12 21:14 ` Rafael J. Wysocki
2007-05-12 19:17 ` Pavel Machek
2007-05-12 19:40 ` Linus Torvalds
2007-05-12 22:14 ` Pavel Machek
2007-05-12 22:08 ` Rafael J. Wysocki
2007-05-12 19:36 ` Gautham R Shenoy
2007-05-12 19:57 ` Linus Torvalds
2007-05-12 20:11 ` Linus Torvalds
2007-05-13 8:33 ` Gautham R Shenoy
2007-05-13 16:33 ` Linus Torvalds
2007-05-13 20:08 ` Rafael J. Wysocki
2007-05-13 20:49 ` Linus Torvalds
2007-05-13 21:14 ` Rafael J. Wysocki
2007-05-14 6:18 ` Srivatsa Vaddagiri
2007-05-14 7:26 ` Gautham R Shenoy
2007-05-14 10:07 ` Rafael J. Wysocki [this message]
2007-05-14 7:41 ` Dipankar Sarma
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=200705141207.23002.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=akpm@linux-foundation.org \
--cc=dipankar@in.ibm.com \
--cc=ego@in.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=oleg@tv-sign.ru \
--cc=paulmck@us.ibm.com \
--cc=pavel@ucw.cz \
--cc=torvalds@linux-foundation.org \
--cc=vatsa@in.ibm.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