From: Pavel Machek <pavel@ucw.cz>
To: Romit Dasgupta <romit@ti.com>
Cc: jens.axboe@oracle.com, rjw@sisk.pl, linux-kernel@vger.kernel.org,
linux-omap@vger.kernel.org, linux-pm@lists.linux-foundation.org
Subject: Re: [PATCH 1/1]: Thaws refrigerated bdi flusher threads before invoking kthread_stop on them
Date: Wed, 11 Nov 2009 11:34:44 +0100 [thread overview]
Message-ID: <20091111103444.GD26423@elf.ucw.cz> (raw)
In-Reply-To: <1257928216.15415.57.camel@boson>
On Wed 2009-11-11 14:00:16, Romit Dasgupta wrote:
> Kicks out frozen bdi flusher task out of the refrigerator when the flusher task
> needs to exit.
> Signed-off-by: Romit Dasgupta <romit@ti.com>
Ok, its slightly "interesting", but better than modifying common
code. Looks ok to me.
ACK.
Pavel
> ---
> diff --git a/mm/backing-dev.c b/mm/backing-dev.c
> index 5a37e20..c757b05 100644
> --- a/mm/backing-dev.c
> +++ b/mm/backing-dev.c
> @@ -606,8 +606,11 @@ static void bdi_wb_shutdown(struct backing_dev_info *bdi)
> * Finally, kill the kernel threads. We don't need to be RCU
> * safe anymore, since the bdi is gone from visibility.
> */
> - list_for_each_entry(wb, &bdi->wb_list, list)
> + list_for_each_entry(wb, &bdi->wb_list, list) {
> + if (unlikely(frozen(wb->task)))
> + wb->task->flags &= ~PF_FROZEN;
> kthread_stop(wb->task);
> + }
> }
>
> void bdi_unregister(struct backing_dev_info *bdi)
>
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
next prev parent reply other threads:[~2009-11-11 10:34 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-11 8:30 [PATCH 1/1]: Thaws refrigerated bdi flusher threads before invoking kthread_stop on them Romit Dasgupta
2009-11-11 10:34 ` Pavel Machek [this message]
2009-11-11 11:30 ` Rafael J. Wysocki
2009-11-11 11:50 ` Romit Dasgupta
2009-11-11 11:59 ` Rafael J. Wysocki
2009-11-11 19:37 ` Jens Axboe
2009-11-11 20:41 ` Rafael J. Wysocki
2009-11-12 11:52 ` Romit Dasgupta
2009-11-12 12:05 ` Jens Axboe
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=20091111103444.GD26423@elf.ucw.cz \
--to=pavel@ucw.cz \
--cc=jens.axboe@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux-pm@lists.linux-foundation.org \
--cc=rjw@sisk.pl \
--cc=romit@ti.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