<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/include/trace/events/jbd2.h, branch v4.0</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>jbd2: trace when lock_buffer in do_get_write_access takes a long time</title>
<updated>2013-04-21T20:47:54+00:00</updated>
<author>
<name>Theodore Ts'o</name>
<email>tytso@mit.edu</email>
</author>
<published>2013-04-21T20:47:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=f783f091e49ce4896e6b026af82d76e0537c6089'/>
<id>f783f091e49ce4896e6b026af82d76e0537c6089</id>
<content type='text'>
While investigating interactivity problems it was clear that processes
sometimes stall for long periods of times if an attempt is made to
lock a buffer which is undergoing writeback.  It would stall in
a trace looking something like

[&lt;ffffffff811a39de&gt;] __lock_buffer+0x2e/0x30
[&lt;ffffffff8123a60f&gt;] do_get_write_access+0x43f/0x4b0
[&lt;ffffffff8123a7cb&gt;] jbd2_journal_get_write_access+0x2b/0x50
[&lt;ffffffff81220f79&gt;] __ext4_journal_get_write_access+0x39/0x80
[&lt;ffffffff811f3198&gt;] ext4_reserve_inode_write+0x78/0xa0
[&lt;ffffffff811f3209&gt;] ext4_mark_inode_dirty+0x49/0x220
[&lt;ffffffff811f57d1&gt;] ext4_dirty_inode+0x41/0x60
[&lt;ffffffff8119ac3e&gt;] __mark_inode_dirty+0x4e/0x2d0
[&lt;ffffffff8118b9b9&gt;] update_time+0x79/0xc0
[&lt;ffffffff8118ba98&gt;] file_update_time+0x98/0x100
[&lt;ffffffff81110ffc&gt;] __generic_file_aio_write+0x17c/0x3b0
[&lt;ffffffff811112aa&gt;] generic_file_aio_write+0x7a/0xf0
[&lt;ffffffff811ea853&gt;] ext4_file_write+0x83/0xd0
[&lt;ffffffff81172b23&gt;] do_sync_write+0xa3/0xe0
[&lt;ffffffff811731ae&gt;] vfs_write+0xae/0x180
[&lt;ffffffff8117361d&gt;] sys_write+0x4d/0x90
[&lt;ffffffff8159d62d&gt;] system_call_fastpath+0x1a/0x1f
[&lt;ffffffffffffffff&gt;] 0xffffffffffffffff

Signed-off-by: Mel Gorman &lt;mgorman@suse.de&gt;
Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
While investigating interactivity problems it was clear that processes
sometimes stall for long periods of times if an attempt is made to
lock a buffer which is undergoing writeback.  It would stall in
a trace looking something like

[&lt;ffffffff811a39de&gt;] __lock_buffer+0x2e/0x30
[&lt;ffffffff8123a60f&gt;] do_get_write_access+0x43f/0x4b0
[&lt;ffffffff8123a7cb&gt;] jbd2_journal_get_write_access+0x2b/0x50
[&lt;ffffffff81220f79&gt;] __ext4_journal_get_write_access+0x39/0x80
[&lt;ffffffff811f3198&gt;] ext4_reserve_inode_write+0x78/0xa0
[&lt;ffffffff811f3209&gt;] ext4_mark_inode_dirty+0x49/0x220
[&lt;ffffffff811f57d1&gt;] ext4_dirty_inode+0x41/0x60
[&lt;ffffffff8119ac3e&gt;] __mark_inode_dirty+0x4e/0x2d0
[&lt;ffffffff8118b9b9&gt;] update_time+0x79/0xc0
[&lt;ffffffff8118ba98&gt;] file_update_time+0x98/0x100
[&lt;ffffffff81110ffc&gt;] __generic_file_aio_write+0x17c/0x3b0
[&lt;ffffffff811112aa&gt;] generic_file_aio_write+0x7a/0xf0
[&lt;ffffffff811ea853&gt;] ext4_file_write+0x83/0xd0
[&lt;ffffffff81172b23&gt;] do_sync_write+0xa3/0xe0
[&lt;ffffffff811731ae&gt;] vfs_write+0xae/0x180
[&lt;ffffffff8117361d&gt;] sys_write+0x4d/0x90
[&lt;ffffffff8159d62d&gt;] system_call_fastpath+0x1a/0x1f
[&lt;ffffffffffffffff&gt;] 0xffffffffffffffff

Signed-off-by: Mel Gorman &lt;mgorman@suse.de&gt;
Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>jbd2: add tracepoints which provide per-handle statistics </title>
<updated>2013-02-08T18:00:22+00:00</updated>
<author>
<name>Theodore Ts'o</name>
<email>tytso@mit.edu</email>
</author>
<published>2013-02-08T18:00:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=343d9c283c9847da043fda3e76e3197f27b667dd'/>
<id>343d9c283c9847da043fda3e76e3197f27b667dd</id>
<content type='text'>
Handles which stay open a long time are problematic when it comes time
to close down a transaction so it can be committed.  These tracepoints
will help us determine which ones are the problematic ones, and to
validate whether changes makes things better or worse.

Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Handles which stay open a long time are problematic when it comes time
to close down a transaction so it can be committed.  These tracepoints
will help us determine which ones are the problematic ones, and to
validate whether changes makes things better or worse.

Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>jbd2: track request delay statistics</title>
<updated>2013-02-07T03:30:23+00:00</updated>
<author>
<name>Theodore Ts'o</name>
<email>tytso@mit.edu</email>
</author>
<published>2013-02-07T03:30:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=9fff24aa2c5c504aadead1ff9599e813604c2e53'/>
<id>9fff24aa2c5c504aadead1ff9599e813604c2e53</id>
<content type='text'>
Track the delay between when we first request that the commit begin
and when it actually begins, so we can see how much of a gap exists.
In theory, this should just be the remaining scheduling quantuum of
the thread which requested the commit (assuming it was not a
synchronous operation which triggered the commit request) plus
scheduling overhead; however, it's possible that real time processes
might get in the way of letting the kjournald thread from executing.

Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Track the delay between when we first request that the commit begin
and when it actually begins, so we can see how much of a gap exists.
In theory, this should just be the remaining scheduling quantuum of
the thread which requested the commit (assuming it was not a
synchronous operation which triggered the commit request) plus
scheduling overhead; however, it's possible that real time processes
might get in the way of letting the kjournald thread from executing.

Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>jbd2: issue cache flush after checkpointing even with internal journal</title>
<updated>2012-03-14T02:22:54+00:00</updated>
<author>
<name>Jan Kara</name>
<email>jack@suse.cz</email>
</author>
<published>2012-03-14T02:22:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=79feb521a44705262d15cc819a4117a447b11ea7'/>
<id>79feb521a44705262d15cc819a4117a447b11ea7</id>
<content type='text'>
When we reach jbd2_cleanup_journal_tail(), there is no guarantee that
checkpointed buffers are on a stable storage - especially if buffers were
written out by jbd2_log_do_checkpoint(), they are likely to be only in disk's
caches. Thus when we update journal superblock effectively removing old
transaction from journal, this write of superblock can get to stable storage
before those checkpointed buffers which can result in filesystem corruption
after a crash. Thus we must unconditionally issue a cache flush before we
update journal superblock in these cases.

A similar problem can also occur if journal superblock is written only in
disk's caches, other transaction starts reusing space of the transaction
cleaned from the log and power failure happens. Subsequent journal replay would
still try to replay the old transaction but some of it's blocks may be already
overwritten by the new transaction. For this reason we must use WRITE_FUA when
updating log tail and we must first write new log tail to disk and update
in-memory information only after that.

Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When we reach jbd2_cleanup_journal_tail(), there is no guarantee that
checkpointed buffers are on a stable storage - especially if buffers were
written out by jbd2_log_do_checkpoint(), they are likely to be only in disk's
caches. Thus when we update journal superblock effectively removing old
transaction from journal, this write of superblock can get to stable storage
before those checkpointed buffers which can result in filesystem corruption
after a crash. Thus we must unconditionally issue a cache flush before we
update journal superblock in these cases.

A similar problem can also occur if journal superblock is written only in
disk's caches, other transaction starts reusing space of the transaction
cleaned from the log and power failure happens. Subsequent journal replay would
still try to replay the old transaction but some of it's blocks may be already
overwritten by the new transaction. For this reason we must use WRITE_FUA when
updating log tail and we must first write new log tail to disk and update
in-memory information only after that.

Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>jbd2: split updating of journal superblock and marking journal empty</title>
<updated>2012-03-13T19:41:04+00:00</updated>
<author>
<name>Jan Kara</name>
<email>jack@suse.cz</email>
</author>
<published>2012-03-13T19:41:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=24bcc89c7e7c64982e6192b4952a0a92379fc341'/>
<id>24bcc89c7e7c64982e6192b4952a0a92379fc341</id>
<content type='text'>
There are three case of updating journal superblock. In the first case, we want
to mark journal as empty (setting s_sequence to 0), in the second case we want
to update log tail, in the third case we want to update s_errno. Split these
cases into separate functions. It makes the code slightly more straightforward
and later patches will make the distinction even more important.

Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There are three case of updating journal superblock. In the first case, we want
to mark journal as empty (setting s_sequence to 0), in the second case we want
to update log tail, in the third case we want to update s_errno. Split these
cases into separate functions. It makes the code slightly more straightforward
and later patches will make the distinction even more important.

Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>jbd2: add drop_transaction/update_superblock_end tracepoints</title>
<updated>2012-02-20T22:53:01+00:00</updated>
<author>
<name>Seiji Aguchi</name>
<email>seiji.aguchi@hds.com</email>
</author>
<published>2012-02-20T22:53:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=2201c590dd6e802795e21e69e3c152c519f1568e'/>
<id>2201c590dd6e802795e21e69e3c152c519f1568e</id>
<content type='text'>
This patch adds trace_jbd2_drop_transaction and
trace_jbd2_update_superblock_end because there are similar tracepoints
in jbd and they are needed in jbd2 as well.

Reviewed-by: Lukas Czerner &lt;lczerner@redhat.com&gt;
Signed-off-by: Seiji Aguchi &lt;seiji.aguchi@hds.com&gt;
Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch adds trace_jbd2_drop_transaction and
trace_jbd2_update_superblock_end because there are similar tracepoints
in jbd and they are needed in jbd2 as well.

Reviewed-by: Lukas Czerner &lt;lczerner@redhat.com&gt;
Signed-off-by: Seiji Aguchi &lt;seiji.aguchi@hds.com&gt;
Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>jbd2: remove jbd2_dev_to_name() from jbd2 tracepoints</title>
<updated>2011-07-11T02:05:08+00:00</updated>
<author>
<name>Theodore Ts'o</name>
<email>tytso@mit.edu</email>
</author>
<published>2011-07-11T02:05:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=4862fd6047ed02e2726667c54d35f538eecc56aa'/>
<id>4862fd6047ed02e2726667c54d35f538eecc56aa</id>
<content type='text'>
Using function calls in TP_printk causes perf heartburn, so print the
MAJOR/MINOR device numbers instead.

Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Using function calls in TP_printk causes perf heartburn, so print the
MAJOR/MINOR device numbers instead.

Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ext4: add more tracepoints and use dev_t in the trace buffer</title>
<updated>2011-03-22T01:38:05+00:00</updated>
<author>
<name>Jiaying Zhang</name>
<email>jiayingz@google.com</email>
</author>
<published>2011-03-22T01:38:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=0562e0bad483d10e9651fbb8f21dc3d0bad57374'/>
<id>0562e0bad483d10e9651fbb8f21dc3d0bad57374</id>
<content type='text'>
- Add more ext4 tracepoints.
- Change ext4 tracepoints to use dev_t field with MAJOR/MINOR macros
so that we can save 4 bytes in the ring buffer on some platforms.
- Add sync_mode to ext4_da_writepages, ext4_da_write_pages, and
ext4_da_writepages_result tracepoints. Also remove for_reclaim
field from ext4_da_writepages since it is usually not very useful.

Signed-off-by: Jiaying Zhang &lt;jiayingz@google.com&gt;
Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Add more ext4 tracepoints.
- Change ext4 tracepoints to use dev_t field with MAJOR/MINOR macros
so that we can save 4 bytes in the ring buffer on some platforms.
- Add sync_mode to ext4_da_writepages, ext4_da_write_pages, and
ext4_da_writepages_result tracepoints. Also remove for_reclaim
field from ext4_da_writepages since it is usually not very useful.

Signed-off-by: Jiaying Zhang &lt;jiayingz@google.com&gt;
Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ext4,jbd2: convert tracepoints to use major/minor numbers</title>
<updated>2010-10-28T02:08:50+00:00</updated>
<author>
<name>Theodore Ts'o</name>
<email>tytso@mit.edu</email>
</author>
<published>2010-10-28T02:08:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=a269029d0e2192046be4c07ed78a45022469ee4c'/>
<id>a269029d0e2192046be4c07ed78a45022469ee4c</id>
<content type='text'>
Unfortunately perf can't deal with anything other than direct structure
accesses in the TP_printk() section.  It will drop dead when it sees
jbd2_dev_to_name() in the "print fmt" section of the tracepoint.

Addresses-Google-Bug: 3138508

Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Unfortunately perf can't deal with anything other than direct structure
accesses in the TP_printk() section.  It will drop dead when it sees
jbd2_dev_to_name() in the "print fmt" section of the tracepoint.

Addresses-Google-Bug: 3138508

Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ext4: Add new tracepoint for jbd2_cleanup_journal_tail</title>
<updated>2009-12-23T12:45:44+00:00</updated>
<author>
<name>Theodore Ts'o</name>
<email>tytso@mit.edu</email>
</author>
<published>2009-12-23T12:45:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=71f2be213a0009098819e5c04f75ff19f84f2122'/>
<id>71f2be213a0009098819e5c04f75ff19f84f2122</id>
<content type='text'>
Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
</pre>
</div>
</content>
</entry>
</feed>
