From: Arjan van de Ven <arjan@infradead.org>
To: torvalds@linux-foundation.org
Cc: Pekka Paalanen <pq@iki.fi>,
"Alexey Dobriyan" <adobriyan@gmail.com>,
linux-kernel@vger.kernel.org, pq@iki.fi
Subject: [fix] Too async libata breakage
Date: Thu, 8 Jan 2009 12:53:17 -0800 [thread overview]
Message-ID: <20090108125317.648397d2@infradead.org> (raw)
In-Reply-To: <20090108221753.78648cd6@daedalus.pq.iki.fi>
> > Additional async_synchronize_full() helps and box boot to the end.
Hi Linus,
can you add the patch below to your tree? This makes the
async_synchronize_full() a real absolute async barrier, rather than
just synchronizing the work scheduled upto the starting point.
It's a bit too much for some cases (so later on I might introduce the
softer synchronization again) but it solves some real problems
for people so this should go into -rc1 please...
>From ca1827b142e41b54c612026b3c0b5d239f21a715 Mon Sep 17 00:00:00 2001
From: Arjan van de Ven <arjan@linux.intel.com>
Date: Thu, 8 Jan 2009 12:35:11 -0800
Subject: [PATCH] async: make async_synchronize_full() more serializing
turns out that there are real problems with allowing async
tasks that are scheduled from async tasks to run after
the async_synchronize_full() returns.
This patch makes the _full more strict and a complete
synchronization. Later I might need to add back a lighter
form of synchronization for other uses.. but not right now.
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
---
kernel/async.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/kernel/async.c b/kernel/async.c
index 9737338..64cc916 100644
--- a/kernel/async.c
+++ b/kernel/async.c
@@ -206,7 +206,9 @@ EXPORT_SYMBOL_GPL(async_schedule_special);
void async_synchronize_full(void)
{
- async_synchronize_cookie(next_cookie);
+ do {
+ async_synchronize_cookie(next_cookie);
+ } while (!list_empty(&async_running) || !list_empty(&async_pending));
}
EXPORT_SYMBOL_GPL(async_synchronize_full);
--
1.5.5.1
--
Arjan van de Ven Intel Open Source Technology Centre
For development, discussion and tips for power savings,
visit http://www.lesswatts.org
next prev parent reply other threads:[~2009-01-08 20:51 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-08 20:02 Too async libata breakage Alexey Dobriyan
2009-01-08 20:17 ` Pekka Paalanen
2009-01-08 20:53 ` Arjan van de Ven [this message]
2009-01-08 21:22 ` [fix] " Justin P. Mattock
2009-01-08 22:20 ` Justin P. Mattock
2009-01-08 22:31 ` Arjan van de Ven
2009-01-08 23:26 ` Justin P. Mattock
2009-01-09 0:16 ` Justin P. Mattock
2009-01-09 0:23 ` Linus Torvalds
2009-01-09 0:33 ` Justin P. Mattock
2009-01-09 10:05 ` Justin P. Mattock
2009-01-09 10:10 ` Tejun Heo
2009-01-09 10:19 ` [PATCH] libata: use WARN_ON_ONCE on hot paths Tejun Heo
2009-01-09 11:31 ` Zdenek Kabelac
2009-01-09 12:03 ` Jeff Garzik
2009-01-09 12:07 ` Alan Cox
2009-01-09 17:10 ` Justin P. Mattock
2009-01-09 18:39 ` Justin P. Mattock
2009-01-11 19:58 ` Zdenek Kabelac
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=20090108125317.648397d2@infradead.org \
--to=arjan@infradead.org \
--cc=adobriyan@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=pq@iki.fi \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox