xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: "Joe Jin" <joe.jin@oracle.com>
To: Daniel Stodden <daniel.stodden@citrix.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
	"greg.marsden@oracle.com" <greg.marsden@oracle.com>,
	Joe Jin <joe.jin@oracle.com>, Jan Beulich <JBeulich@novell.com>,
	"deepak.patel@oracle.com" <deepak.patel@oracle.com>,
	Keir Fraser <Keir.Fraser@eu.citrix.com>
Subject: Re: [PATCH] Fix blkback/blktap sysfs read bug.
Date: Thu, 21 Jan 2010 15:49:28 +0800	[thread overview]
Message-ID: <20100121074928.GA31296@joejin-pc.cn.oracle.com> (raw)
In-Reply-To: <1264058809.6898.181.camel@ramone.somacoma.net>

> Your patch will work okay on 2.6.18.
> 
> But collisions will deadlock after 2.6.23
> 
> Found an old stack trace:
> 
> [2009-07-08 06:15:08 UTC] INFO: task xb.00021.xvdd:30039 blocked for more than 120 seconds.
> [2009-07-08 06:15:08 UTC] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
> [2009-07-08 06:15:08 UTC]        c7adfe0c 00000246 00000000 00000000 5b88fd4f 00000256 c7ade000 c7adfdc8 
> [2009-07-08 06:15:08 UTC]        c0107c1b 38c984a4 00000256 c7adfddc ed629578 ed6293f0 ed629578 c16bdb00 
> [2009-07-08 06:15:08 UTC]        00000000 eea0d500 c16bdb34 002dc05a 00000000 00000005 0024c31c e20a8ff0 
> [2009-07-08 06:15:08 UTC] Call Trace:
> [2009-07-08 06:15:08 UTC]  [<c0107c1b>] ? local_clock+0x3b/0x90
> [2009-07-08 06:15:08 UTC]  [<c0344675>] schedule_timeout+0x75/0xc0
> [2009-07-08 06:15:08 UTC]  [<c011ed81>] ? pick_next_task_fair+0x91/0xd0
> [2009-07-08 06:15:08 UTC]  [<c03442c9>] wait_for_common+0xa9/0x1c0
> [2009-07-08 06:15:08 UTC]  [<c0120d40>] ? default_wake_function+0x0/0x10
> [2009-07-08 06:15:08 UTC]  [<c0344472>] wait_for_completion+0x12/0x20
> [2009-07-08 06:15:08 UTC]  [<c01cf9e7>] sysfs_addrm_finish+0x1e7/0x230
> [2009-07-08 06:15:08 UTC]  [<c01ce2e5>] sysfs_hash_and_remove+0x45/0x70
> [2009-07-08 06:15:08 UTC]  [<c01d0adb>] remove_files+0x1b/0x30
> [2009-07-08 06:15:08 UTC]  [<c01d0b26>] sysfs_remove_group+0x36/0xc0
> [2009-07-08 06:15:08 UTC]  [<c01ae02f>] ? __blkdev_put+0x14f/0x160
> [2009-07-08 06:15:08 UTC]  [<c02769fc>] xenvbd_sysfs_delif+0x2c/0x60
> [2009-07-08 06:15:08 UTC]  [<c0276a76>] blkback_close+0x46/0x70
> [2009-07-08 06:15:08 UTC]  [<c0275d33>] blkif_schedule+0x583/0x5b0
> [2009-07-08 06:15:08 UTC]  [<c011ed81>] ? pick_next_task_fair+0x91/0xd0
> [2009-07-08 06:15:08 UTC]  [<c013dda0>] ? autoremove_wake_function+0x0/0x50
> [2009-07-08 06:15:08 UTC]  [<c02757b0>] ? blkif_schedule+0x0/0x5b0
> [2009-07-08 06:15:08 UTC]  [<c013da42>] kthread+0x42/0x70
> [2009-07-08 06:15:08 UTC]  [<c013da00>] ? kthread+0x0/0x70
> [2009-07-08 06:15:08 UTC]  [<c010561b>] kernel_thread_helper+0x7/0x10
> 
> The reason is in sysfs_deactivate(), which will sync callers against any
> remaining thread in .show()
> - show() hangs on the lock
> - the lock holder in sysfs_remove_group(), 
>   waiting for show() to complete.
> 
> Pardon me -- I'm not entirely sure where/how these patches are currently
> submitted and merged. I suppose yours are only for linux-2.6.18.hg, not
> e.g. pvops? Then sorry for any confusion.
> 

Daniel, 

Thanks a lot of your comments, it really help for me, yes my patch based 
linux-2.6.18.hg branch. As Jan have pointed out in previous email, it should 
be sysfs's issue, looked like later kernel sysfs have fixed the issue?

Thanks,
Joe

  reply	other threads:[~2010-01-21  7:49 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-19  9:52 [PATCH] Fix blkback/blktap sysfs read bug Joe Jin
2010-01-19 10:25 ` Jan Beulich
2010-01-19 11:32   ` Joe Jin
2010-01-19 12:06     ` Jan Beulich
2010-01-19 14:13       ` Joe Jin
2010-01-19 16:20         ` Jan Beulich
2010-01-20  2:06           ` Joe Jin
2010-01-20  7:46             ` Jan Beulich
2010-01-20 10:51               ` Joe Jin
2010-01-20 11:06                 ` Jan Beulich
2010-01-20 11:45                   ` Joe Jin
2010-01-20 20:25                     ` Keir Fraser
2010-01-21  2:16                     ` Daniel Stodden
2010-01-21  3:13                       ` Joe Jin
2010-01-21  7:26                         ` Daniel Stodden
2010-01-21  7:49                           ` Joe Jin [this message]
2010-01-21 18:01                             ` Daniel Stodden

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=20100121074928.GA31296@joejin-pc.cn.oracle.com \
    --to=joe.jin@oracle.com \
    --cc=JBeulich@novell.com \
    --cc=Keir.Fraser@eu.citrix.com \
    --cc=daniel.stodden@citrix.com \
    --cc=deepak.patel@oracle.com \
    --cc=greg.marsden@oracle.com \
    --cc=xen-devel@lists.xensource.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;
as well as URLs for NNTP newsgroup(s).