All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5 v2] add extent status tree caching
@ 2013-07-16 15:17 Theodore Ts'o
  2013-07-16 15:17 ` [PATCH 1/5] ext4: refactor code to read the extent tree block Theodore Ts'o
                   ` (5 more replies)
  0 siblings, 6 replies; 32+ messages in thread
From: Theodore Ts'o @ 2013-07-16 15:17 UTC (permalink / raw)
  To: Ext4 Developers List; +Cc: Zheng Liu, Theodore Ts'o

In addition to fixing a few bugs and addressing review comments, we now
add a new ioctl, EXT4_IOC_PRECACHE_EXTENTS, which forces all of the
extents in an inode to be cached in the extents status tree, and marks
them to be preferentially protected when under memory pressure.  

This is critically important when using AIO to a preallocated file,
since if we need to read in blocks from the extent tree, the
io_submit(2) system call becomes synchronous, which is rather rude to
applications which were expecting the AIO to be "A".

As a bonus, using the extent status tree to store the logical to
physical block mapping is usually more compact that having to keep one
or more extent tree blocks in the buffer cache.

(Should we do this all the time, instead of when the application
explicitly requests it?  Maybe; there could be cases with very large,
fragmented files accessed by an application such as "file" is only needs
to look at a small subset of the file where this could result in an
unnecessary work and memory allocated.  OTOH, 95%+ of the time this
would probably be a win...)


Theodore Ts'o (5):
  ext4: refactor code to read the extent tree block
  ext4: print the block number of invalid extent tree blocks
  ext4: use unsigned int for es_status values
  ext4: cache all of an extent tree's leaf block upon reading
  ext4: add new ioctl EXT4_IOC_PRECACHE_EXTENTS

 fs/ext4/ext4.h              |  19 +++-
 fs/ext4/extents.c           | 259 +++++++++++++++++++++++++++++---------------
 fs/ext4/extents_status.c    |  52 ++++++++-
 fs/ext4/extents_status.h    |  50 +++++----
 fs/ext4/inode.c             |   6 +-
 fs/ext4/ioctl.c             |   3 +
 fs/ext4/migrate.c           |   2 +-
 fs/ext4/move_extent.c       |   2 +-
 include/trace/events/ext4.h |  28 +++--
 9 files changed, 296 insertions(+), 125 deletions(-)

-- 
1.7.12.rc0.22.gcdd159b


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

end of thread, other threads:[~2013-08-16 14:39 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-16 15:17 [PATCH 0/5 v2] add extent status tree caching Theodore Ts'o
2013-07-16 15:17 ` [PATCH 1/5] ext4: refactor code to read the extent tree block Theodore Ts'o
2013-07-16 15:18 ` [PATCH 2/5] ext4: print the block number of invalid extent tree blocks Theodore Ts'o
2013-07-18  0:56   ` Zheng Liu
2013-07-16 15:18 ` [PATCH 3/5] ext4: use unsigned int for es_status values Theodore Ts'o
2013-07-16 15:18 ` [PATCH 4/5] ext4: cache all of an extent tree's leaf block upon reading Theodore Ts'o
2013-07-16 15:18 ` [PATCH 5/5] ext4: add new ioctl EXT4_IOC_PRECACHE_EXTENTS Theodore Ts'o
2013-07-18  1:19   ` Zheng Liu
2013-07-18  2:50     ` Theodore Ts'o
2013-07-18 13:06       ` Zheng Liu
2013-07-18 15:21         ` Theodore Ts'o
2013-07-18 18:35 ` [PATCH 0/5 v2] add extent status tree caching Eric Sandeen
2013-07-18 18:53   ` Theodore Ts'o
2013-07-19  0:56     ` Eric Sandeen
2013-07-19  2:59       ` Theodore Ts'o
2013-07-19  3:33         ` Dave Chinner
2013-07-19 14:22           ` Jeff Moyer
2013-07-19 16:19           ` Theodore Ts'o
2013-07-22  1:38             ` Dave Chinner
2013-07-22  2:17               ` Zheng Liu
2013-07-22 10:02                 ` Dave Chinner
2013-07-22 12:57                   ` Zheng Liu
2013-07-30  3:08                     ` Dave Chinner
2013-08-04  1:27                       ` Theodore Ts'o
2013-08-13  3:10                         ` Dave Chinner
2013-08-13  3:21                           ` Eric Sandeen
2013-08-13 13:04                             ` Theodore Ts'o
2013-08-16  3:21                               ` Dave Chinner
2013-08-16 14:39                                 ` Theodore Ts'o
2013-07-18 23:54   ` Zheng Liu
2013-07-19  0:07     ` Theodore Ts'o
2013-07-19  1:03       ` Zheng Liu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.