linux-rt-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Theodore Ts'o <tytso@mit.edu>
To: Paul Gortmaker <paul.gortmaker@windriver.com>
Cc: linux-ext4@vger.kernel.org, linux-rt-users@vger.kernel.org
Subject: Re: [RFC PATCH 0/4] ext4/jbd2: several possible mainline fixes
Date: Mon, 10 Jun 2013 19:38:51 -0400	[thread overview]
Message-ID: <20130610233850.GA21795@thunk.org> (raw)
In-Reply-To: <1370892723-30860-1-git-send-email-paul.gortmaker@windriver.com>

On Mon, Jun 10, 2013 at 03:31:59PM -0400, Paul Gortmaker wrote:
> Using jbd_debug() it seems that I end up with jbd2_log_do_checkpoint
> and jbd2_journal_commit_transaction running into each other.  In one of
> my attached patches, I show they overlap to the point of interrupting
> each others jbd_debug messages.  Maybe that doesn't matter?  

That should be OK.  We do allow a new transactions while we are
committing an older transaction, and if this requires more space, a
checkpoint could start.  I'm not sure why you're apparently seeing a
deadlock under RT-linux, though.

> Stuck waiting/spinning somewhere in jbd2_journal_commit_transaction.
> As near as I can tell, it never got to phase 3 of commit_transaction.
> 
> Since jbd2_journal_commit_transaction is such a large function,
> I'm tempted to break it up some, just to ease my debugging (compare
> 0x1c20 to the smaller numbers around it).  Perhaps there would be
> interest in such kinds of patches for mainline?

Instead of breaking it up, can you just use addr2line, i.e.:

% addr2line -a ffffffff8046a067 -i -e vmlinux  
0xffffffff8046a067
./include/linux/buffer_head.h:287
./fs/ext4/inode.c:5585
./fs/ext4/inode.c:5963

I find this to be incredibly useful, since with the -i option it will
handle inline functions correctly.  In the above example there are two
levels of inlining, one explicitly marked inline in
include/linux/buffer.h, and one implicit inlining taking place because
we had a static function in fs/ext4/inode.c that was only called by
one caller.

Because of gcc's implicit inlining, just breaking up the function by
itself wouldn't be enough, unless you explicitly marked the new static
functions with noinline; but that introduces inefficiencies.  If the
only reason you want to do this is to make it easier to figure out a
stack trace, addr2line really is your friend....

Cheers,

					- Ted

  parent reply	other threads:[~2013-06-10 23:38 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-10 19:31 [RFC PATCH 0/4] ext4/jbd2: several possible mainline fixes Paul Gortmaker
2013-06-10 19:32 ` [PATCH 1/4] jbd2/journal_commit_transaction: relocate state lock to incorporate all users Paul Gortmaker
2013-06-11  2:12   ` Theodore Ts'o
2013-06-11  2:45     ` Paul Gortmaker
2013-06-11  2:52       ` Theodore Ts'o
2013-06-11 17:38     ` Paul Gortmaker
2013-06-11 17:53       ` Theodore Ts'o
2013-06-11 18:48         ` Paul Gortmaker
2013-06-11 21:54           ` Paul Gortmaker
2013-06-10 19:32 ` [PATCH 2/4] jbd2/log_wait_for_space: drop checkpoint mutex when waiting Paul Gortmaker
2013-06-11  2:33   ` Theodore Ts'o
2013-06-11  3:20     ` Paul Gortmaker
2013-06-11 13:03       ` Theodore Ts'o
2013-06-11 13:20         ` Paul Gortmaker
2013-06-10 19:32 ` [PATCH 3/4] jbd2: fix duplicate debug label for phase 2 Paul Gortmaker
2013-06-10 19:32 ` [PATCH 4/4] jbd/jbd2: relocate bit_spinlock header to jbd_common Paul Gortmaker
2013-06-10 23:38 ` Theodore Ts'o [this message]
2013-06-11  3:09   ` [RFC PATCH 0/4] ext4/jbd2: several possible mainline fixes Paul Gortmaker
2013-06-11 22:44 ` [PATCH v2 0/6] misc jbd2 fixes and cleanups Paul Gortmaker
2013-06-11 22:44   ` [PATCH 1/6] jbd2/journal_commit_transaction: relocate assert after state lock Paul Gortmaker
2013-06-13  2:42     ` Theodore Ts'o
2013-06-11 22:44   ` [PATCH 2/6] jbd2/log_wait_for_space: drop checkpoint mutex when waiting Paul Gortmaker
2013-06-13  2:55     ` Theodore Ts'o
2013-06-11 22:44   ` [PATCH 3/6] jbd2: fix duplicate debug label for phase 2 Paul Gortmaker
2013-06-13  2:57     ` Theodore Ts'o
2013-06-11 22:44   ` [PATCH 4/6] jbd/jbd2: relocate bit_spinlock header to jbd_common Paul Gortmaker
2013-06-13  3:02     ` Theodore Ts'o
2013-06-11 22:44   ` [PATCH 5/6] jbd2: make jbd_debug that won't split printk statements Paul Gortmaker
2013-06-11 22:44   ` [PATCH 6/6] jbd2: remove debug dependency on debug_fs; update help text Paul Gortmaker
2013-06-13  3:08     ` Theodore Ts'o
2013-06-13 13:51       ` Paul Gortmaker
2013-06-13 14:14         ` Theodore Ts'o
2013-06-13 14:47           ` Paul Gortmaker

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=20130610233850.GA21795@thunk.org \
    --to=tytso@mit.edu \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=paul.gortmaker@windriver.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).