linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Brian King <brking@linux.vnet.ibm.com>
To: "Ted Ts'o" <tytso@mit.edu>
Cc: Josef Bacik <josef@redhat.com>,
	linux-ext4@vger.kernel.org, cmm@linux.vnet.ibm.com,
	pmac@au1.ibm.com
Subject: Re: [PATCHv2 1/1] jbd2: Fix I/O hang in jbd2_journal_release_jbd_inode
Date: Fri, 27 Aug 2010 14:28:07 -0500	[thread overview]
Message-ID: <4C7811C7.2050506@linux.vnet.ibm.com> (raw)
In-Reply-To: <20100827191025.GV4453@thunk.org>

On 08/27/2010 02:10 PM, Ted Ts'o wrote:
> On Wed, Jul 14, 2010 at 01:58:46PM -0500, Brian King wrote:
>>
>> I've been debugging a hang in jbd2_journal_release_jbd_inode
>> which is being seen on Power 6 systems quite a lot. When we get
>> in the hung state, all I/O to the disk in question gets blocked
>> where we stay indefinitely. Looking at the task list, I can see
>> we are stuck in jbd2_journal_release_jbd_inode waiting on a
>> wake up. I added some debug code to detect this scenario and
>> dump additional data if we were stuck in jbd2_journal_release_jbd_inode
>> for longer than 30 minutes. When it hit, I was able to see that
>> i_flags was 0, suggesting we missed the wake up.
>>
>> This patch changes i_flags to be an unsigned long, uses bit operators
>> to access it, and adds barriers around the accesses. Prior to applying
>> this patch, we were regularly hitting this hang on numerous systems
>> in our test environment. After applying the patch, the hangs no longer
>> occur. Its still not clear to me why the j_list_lock doesn't protect us
>> in this path. It also appears a hang very similar to this was seen
>> in the past and then was no longer recreatable:
> 
> I've been look at this patch, and I can see how converting to bitops
> definitely makes sense.  I can also see how adding
> smp_mb__after_clear_bit() makes sense.  However, it's not clear the
> smp_mb() call here helps?

It may not be necessary. I originally added it in order to balance
the test_bit with the clear_bit. I'll check with the folks hitting this
in test and see if I can get access to the failing machine. If so,
I'll pull this out and see if we actually need it or not.

Thanks,

Brian

-- 
Brian King
Linux on Power Virtualization
IBM Linux Technology Center



  reply	other threads:[~2010-08-27 19:28 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-14 14:56 [PATCH 1/1] jbd2: Fix I/O hang in jbd2_journal_release_jbd_inode Brian King
2010-07-14 16:32 ` Eric Sandeen
2010-07-14 16:39   ` Brian King
2010-07-14 16:40   ` Eric Sandeen
2010-07-14 17:44 ` Josef Bacik
2010-07-14 18:58   ` [PATCHv2 " Brian King
2010-07-14 19:05     ` Josef Bacik
2010-07-14 20:08       ` Brian King
2010-07-21 14:01       ` Brian King
2010-07-21 19:02     ` Jan Kara
2010-07-21 19:06       ` Jan Kara
2010-07-22 21:30       ` Brian King
2010-08-27 19:10     ` Ted Ts'o
2010-08-27 19:28       ` Brian King [this message]
2010-08-31 14:04       ` Brian King

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=4C7811C7.2050506@linux.vnet.ibm.com \
    --to=brking@linux.vnet.ibm.com \
    --cc=cmm@linux.vnet.ibm.com \
    --cc=josef@redhat.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=pmac@au1.ibm.com \
    --cc=tytso@mit.edu \
    /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).