X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Ffld%2Ffld_internal.h;h=421b5c9ce9dc039562cbc84da24ff49e34a471ba;hb=89a3ba641bfc54f62d5ab59766a086f9c66e1d25;hp=ecf990776c2da3fc8fedea26051a53131202974c;hpb=d0e0d25b54ca14161a49b018aca640414a8bbb10;p=fs%2Flustre-release.git diff --git a/lustre/fld/fld_internal.h b/lustre/fld/fld_internal.h index ecf9907..421b5c9 100644 --- a/lustre/fld/fld_internal.h +++ b/lustre/fld/fld_internal.h @@ -45,7 +45,33 @@ enum fld_op { }; enum { - FLD_HTABLE_SIZE = 256 + /* 4M of FLD cache will not hurt client a lot. */ + FLD_SERVER_CACHE_SIZE = (4 * 0x100000), + + /* 1M of FLD cache will not hurt client a lot. */ + FLD_CLIENT_CACHE_SIZE = (1 * 0x100000) +}; + +enum { + /* Cache threshold is 10 percent of size. */ + FLD_SERVER_CACHE_THRESHOLD = 10, + + /* Cache threshold is 10 percent of size. */ + FLD_CLIENT_CACHE_THRESHOLD = 10 +}; + +enum { + /* + * One page is used for hashtable. That is sizeof(struct hlist_head) * + * 1024. + */ + FLD_CLIENT_HTABLE_SIZE = (1024 * 1), + + /* + * Here 4 pages are used for hashtable of server cache. This is is + * because cache it self is 4 times bugger. + */ + FLD_SERVER_HTABLE_SIZE = (1024 * 4) }; extern struct lu_fld_hash fld_hash[];