linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/12] jbd2 optimization and bug fixes
@ 2013-02-09 21:53 Theodore Ts'o
  2013-02-09 21:53 ` [PATCH 01/12] jbd2: track request delay statistics Theodore Ts'o
                   ` (12 more replies)
  0 siblings, 13 replies; 34+ messages in thread
From: Theodore Ts'o @ 2013-02-09 21:53 UTC (permalink / raw)
  To: Ext4 Developers List; +Cc: Theodore Ts'o

I've been recently looking at journalling code in ext4, and it's clear
that no one has really been through this code in a while.  It's easy to
find some easy optimization.

Some general rules of thumb that developers should keep in mind when
making changes to ext4:

1) It's important to minimize the amount of time that a handle is held
active, since a journal commit can't be closed until all handles have
been stopped.  In the ideal world, disk reads and memory allocations
should be done *before* calling ext4_journal_start().

2) It's important that number of credits needed for a particular handle
be large enough; otherwise it's possible that we run out of space in the
journal without being able to finish the handle.

3)  It's also important that we not overestimate then number of credits
needed, since otherwise we might close a transaction too early --- and
in particular, the process which starts the transaction commit process
will tend to suffer the greatest amount of latency.

Currently enabling quotas cause the number of credits required to
balloon significantly.  Most of the time we need nowhere the number of
credits which we reserve, so there's opportunity to optimize things.
(For example, we could make sure create the quota record is created in a
seprate transaction.)


Theodore Ts'o (12):
  jbd2: track request delay statistics
  jbd2: revert "jbd2: add COW fields to struct jbd2_journal_handle"
  jbd2: add tracepoints which provide per-handle statistics
  ext4: move the jbd2 wrapper functions out of super.c
  ext4: pass context information to jbd2__journal_start()
  ext4: grab page before starting transaction handle in write_begin()
  ext4: start handle at the last possible moment in ext4_unlink()
  ext4: start handle at the last possible moment in ext4_rmdir()
  ext4: fix the number of credits needed for ext4_ext_migrate()
  ext4: fix the number of credits needed for ext4_unlink() and
    ext4_rmdir()
  ext4: fix the number of credits needed for acl ops with inline data
  ext4: start handle at the last possible moment when creating inodes

 fs/ext4/acl.c               |   7 ++-
 fs/ext4/ext4.h              |  89 +++++++++++++++++++++++++-
 fs/ext4/ext4_jbd2.c         | 102 ++++++++++++++++++++++++++++++
 fs/ext4/ext4_jbd2.h         |  51 ++++++++++++---
 fs/ext4/extents.c           |  11 ++--
 fs/ext4/file.c              |   2 +-
 fs/ext4/ialloc.c            |  17 ++++-
 fs/ext4/indirect.c          |   7 ++-
 fs/ext4/inline.c            |  10 +--
 fs/ext4/inode.c             | 144 +++++++++++++++++++++++++-----------------
 fs/ext4/ioctl.c             |   4 +-
 fs/ext4/migrate.c           |  15 +++--
 fs/ext4/move_extent.c       |   2 +-
 fs/ext4/namei.c             | 150 +++++++++++++++++++++++---------------------
 fs/ext4/resize.c            |  10 +--
 fs/ext4/super.c             | 117 +++-------------------------------
 fs/ext4/xattr.c             |  11 +---
 fs/ext4/xattr.h             |  68 --------------------
 fs/jbd2/commit.c            |   8 +++
 fs/jbd2/journal.c           |  12 +++-
 fs/jbd2/transaction.c       |  29 ++++++++-
 include/linux/jbd2.h        |  41 +++++-------
 include/trace/events/jbd2.h | 106 ++++++++++++++++++++++++++++++-
 23 files changed, 621 insertions(+), 392 deletions(-)

-- 
1.7.12.rc0.22.gcdd159b


^ permalink raw reply	[flat|nested] 34+ messages in thread

end of thread, other threads:[~2013-02-11 20:14 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-09 21:53 [PATCH 00/12] jbd2 optimization and bug fixes Theodore Ts'o
2013-02-09 21:53 ` [PATCH 01/12] jbd2: track request delay statistics Theodore Ts'o
2013-02-11 15:57   ` Jan Kara
2013-02-09 21:53 ` [PATCH 02/12] jbd2: revert "jbd2: add COW fields to struct jbd2_journal_handle" Theodore Ts'o
2013-02-11 15:58   ` Jan Kara
2013-02-09 21:53 ` [PATCH 03/12] jbd2: add tracepoints which provide per-handle statistics Theodore Ts'o
2013-02-09 21:53 ` [PATCH 04/12] ext4: move the jbd2 wrapper functions out of super.c Theodore Ts'o
2013-02-09 21:53 ` [PATCH 05/12] ext4: pass context information to jbd2__journal_start() Theodore Ts'o
2013-02-11 16:16   ` Jan Kara
2013-02-11 18:13     ` Theodore Ts'o
2013-02-11 19:58       ` Jan Kara
2013-02-11 20:14         ` Theodore Ts'o
2013-02-09 21:53 ` [PATCH 06/12] ext4: grab page before starting transaction handle in write_begin() Theodore Ts'o
2013-02-11 16:35   ` Jan Kara
2013-02-09 21:53 ` [PATCH 07/12] ext4: start handle at the last possible moment in ext4_unlink() Theodore Ts'o
2013-02-11 16:21   ` Jan Kara
2013-02-09 21:53 ` [PATCH 08/12] ext4: start handle at the last possible moment in ext4_rmdir() Theodore Ts'o
2013-02-11 16:22   ` Jan Kara
2013-02-09 21:53 ` [PATCH 09/12] ext4: fix the number of credits needed for ext4_ext_migrate() Theodore Ts'o
2013-02-11 16:26   ` Jan Kara
2013-02-09 21:53 ` [PATCH 10/12] ext4: fix the number of credits needed for ext4_unlink() and ext4_rmdir() Theodore Ts'o
2013-02-11 16:28   ` Jan Kara
2013-02-11 18:30     ` Theodore Ts'o
2013-02-11 19:30       ` Jan Kara
2013-02-09 21:53 ` [PATCH 11/12] ext4: fix the number of credits needed for acl ops with inline data Theodore Ts'o
2013-02-10 13:42   ` Tao Ma
2013-02-10 18:15     ` Shentino
2013-02-10 19:43       ` Theodore Ts'o
2013-02-11 16:16         ` Andreas Dilger
2013-02-11 16:30   ` Jan Kara
2013-02-09 21:53 ` [PATCH 12/12] ext4: start handle at the last possible moment when creating inodes Theodore Ts'o
2013-02-11  1:47   ` Theodore Ts'o
2013-02-11 16:00   ` Andreas Dilger
2013-02-11 15:52 ` [PATCH 00/12] jbd2 optimization and bug fixes Jan Kara

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).