public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Li Zhong <zhong@linux.vnet.ibm.com>
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: Wed, 11 Jul 2012 15:42:32 -0700	[thread overview]
Message-ID: <20120711154232.165cbca9.akpm@linux-foundation.org> (raw)
In-Reply-To: <1341817465.4579.5.camel@ThinkPad-T420>

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.

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?


  reply	other threads:[~2012-07-11 22:42 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 [this message]
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

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=20120711154232.165cbca9.akpm@linux-foundation.org \
    --to=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 \
    --cc=zhong@linux.vnet.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