From: Li Zhong <zhong@linux.vnet.ibm.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
arjan@linux.intel.com,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
Christian Kujau <lists@nerdbynature.de>,
Cong Wang <xiyou.wangcong@gmail.com>,
Dan Williams <dan.j.williams@intel.com>
Subject: Re: [PATCH RESEND] Fix a dead loop in async_synchronize_full()
Date: Thu, 12 Jul 2012 10:49:29 +0800 [thread overview]
Message-ID: <1342061369.4091.21.camel@ThinkPad-T420> (raw)
In-Reply-To: <20120711154232.165cbca9.akpm@linux-foundation.org>
On Wed, 2012-07-11 at 15:42 -0700, Andrew Morton wrote:
> On Mon, 09 Jul 2012 15:04:25 +0800
> Li Zhong <zhong@linux.vnet.ibm.com> wrote:
>
> > This patch tries to fix a dead loop in async_synchronize_full(), which
> > could be seen when preemption is disabled on a single cpu machine.
> >
> > void async_synchronize_full(void)
> > {
> > do {
> > async_synchronize_cookie(next_cookie);
> > } while (!list_empty(&async_running) || !
> > list_empty(&async_pending));
> > }
> >
> > async_synchronize_cookie() calls async_synchronize_cookie_domain() with
> > &async_running as the default domain to synchronize.
> >
> > However, there might be some works in the async_pending list from other
> > domains. On a single cpu system, without preemption, there is no chance
> > for the other works to finish, so async_synchronize_full() enters a dead
> > loop.
> >
> > It seems async_synchronize_full() wants to synchronize all entries in
> > all running lists(domains), so maybe we could just check the entry_count
> > to know whether all works are finished.
> >
> > Currently, async_synchronize_cookie_domain() expects a non-NULL running
> > list ( if NULL, there would be NULL pointer dereference ), so maybe a
> > NULL pointer could be used as an indication for the functions to
> > synchronize all works in all domains.
>
> The patch is fairly wordwrapped - please fix up your email client.
Ah, sorry for that, I will check it.
>
> More seriously, it does not apply to linux-next due to some fairly
> significant changes which have been sitting in Dan's tree since May.
> What's going on?
>
Just went through Dan's patches, it seems that they also had
async_synchronize_full() to sync all domains. I will test/check those
patches, and drop this one if the result is good.
prev parent reply other threads:[~2012-07-12 2:49 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-09 7:04 [PATCH RESEND] Fix a dead loop in async_synchronize_full() Li Zhong
2012-07-11 22:42 ` Andrew Morton
2012-07-11 22:50 ` Dan Williams
2012-07-12 9:56 ` Li Zhong
2012-07-12 16:41 ` Dan Williams
2012-07-16 18:32 ` Christian Kujau
2012-07-16 23:01 ` Dan Williams
2012-07-17 1:57 ` Paul E. McKenney
2012-07-17 2:42 ` Li Zhong
2012-07-12 2:49 ` Li Zhong [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=1342061369.4091.21.camel@ThinkPad-T420 \
--to=zhong@linux.vnet.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=arjan@linux.intel.com \
--cc=dan.j.williams@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lists@nerdbynature.de \
--cc=paulmck@linux.vnet.ibm.com \
--cc=xiyou.wangcong@gmail.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