diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2011-09-01 14:31:59 +0200 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2011-10-21 13:39:34 +0200 |
commit | 54335b1fca27b84baa75b1f45985d98262003837 (patch) | |
tree | c6b21aff1759d86be56208e9981117e4383c3f47 /fs/gfs2/incore.h | |
parent | GFS2: Make resource groups "append only" during life of fs (diff) | |
download | linux-54335b1fca27b84baa75b1f45985d98262003837.tar.xz linux-54335b1fca27b84baa75b1f45985d98262003837.zip |
GFS2: Cache the most recently used resource group in the inode
This means that after the initial allocation for any inode, the
last used resource group is cached in the inode for future use.
This drastically reduces the number of lookups of resource
groups in the common case, and this the contention on that
data structure.
The allocation algorithm is the same as previously, except that we
always check to see if the goal block is within the cached rgrp
first before going to the rbtree to look one up.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/incore.h')
-rw-r--r-- | fs/gfs2/incore.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/gfs2/incore.h b/fs/gfs2/incore.h index 56847f5903ae..55e335b52839 100644 --- a/fs/gfs2/incore.h +++ b/fs/gfs2/incore.h @@ -256,8 +256,6 @@ struct gfs2_alloc { unsigned int al_line; char *al_file; struct gfs2_holder al_rgd_gh; - struct gfs2_rgrpd *al_rgd; - }; enum { @@ -279,6 +277,7 @@ struct gfs2_inode { struct gfs2_holder i_iopen_gh; struct gfs2_holder i_gh; /* for prepare/commit_write only */ struct gfs2_alloc *i_alloc; + struct gfs2_rgrpd *i_rgd; u64 i_goal; /* goal block for allocations */ struct rw_semaphore i_rw_mutex; struct list_head i_trunc_list; |