diff options
author | Raghavendra G <rgowdapp@redhat.com> | 2016-11-24 14:58:20 +0530 |
---|---|---|
committer | Atin Mukherjee <amukherj@redhat.com> | 2016-12-22 03:43:14 -0800 |
commit | 96fb35624060565e02e946a970b3e777071bde9c (patch) | |
tree | a375bccd2b79b0d0c269474a2a318138ca6045aa /libglusterfs/src/xlator.h | |
parent | 7ee998b9041d594d93a4e2ef369892c185e80def (diff) |
performance/readdir-ahead: limit cache size
This patch introduces a new option called "rda-cache-limit", which is
the maximum value the entire readdir-ahead cache can grow into. Since,
readdir-ahead holds a reference to inode through dentries, this patch
also accounts memory stored by various xlators in inode contexts.
Change-Id: I84cc0ca812f35e0f9041f8cc71effae53a9e7f99
BUG: 1356960
Signed-off-by: Raghavendra G <rgowdapp@redhat.com>
Reviewed-on: http://review.gluster.org/16137
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Poornima G <pgurusid@redhat.com>
Smoke: Gluster Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Diffstat (limited to 'libglusterfs/src/xlator.h')
-rw-r--r-- | libglusterfs/src/xlator.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libglusterfs/src/xlator.h b/libglusterfs/src/xlator.h index 70e6f0a108d..b11d1a96f32 100644 --- a/libglusterfs/src/xlator.h +++ b/libglusterfs/src/xlator.h @@ -847,6 +847,10 @@ typedef int32_t (*cbk_client_t)(xlator_t *this, client_t *client); typedef void (*cbk_ictxmerge_t) (xlator_t *this, fd_t *fd, inode_t *inode, inode_t *linked_inode); +typedef size_t (*cbk_inodectx_size_t)(xlator_t *this, inode_t *inode); + +typedef size_t (*cbk_fdctx_size_t)(xlator_t *this, fd_t *fd); + struct xlator_cbks { cbk_forget_t forget; cbk_release_t release; @@ -855,6 +859,8 @@ struct xlator_cbks { cbk_client_t client_destroy; cbk_client_t client_disconnect; cbk_ictxmerge_t ictxmerge; + cbk_inodectx_size_t ictxsize; + cbk_fdctx_size_t fdctxsize; }; typedef int32_t (*dumpop_priv_t) (xlator_t *this); |