Whamcloud - gitweb
LU-2748 osd: allocate buffers on demand
authorAlex Zhuravlev <alexey.zhuravlev@intel.com>
Fri, 15 Feb 2013 09:19:29 +0000 (13:19 +0400)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 13 Mar 2013 04:36:26 +0000 (00:36 -0400)
commitd7ac66d2fddc3b2a6fb91b6421f9a15b80c8d10a
treee7bbec599beaf96bffb1bf480ea91f484b2ed305
parent89b733638db0f137b0b2b499e238284e2cdcc7ec
LU-2748 osd: allocate buffers on demand

instead of putting a lot of buffers statically within osd_thread_info,
we can allocate them on the first demand within this thread.
we also can allocate not the maximum, but some optimal amount and
reallocate if really needed. dr_created is not used, so removed.
the number of blocks is calculated using actual blocksize, not the
smallest one, so no need to multiply by 8 in 99.9% cases.

with PTLRPC_MAX_BRW_PAGES=1024 (as default in master branch) and
regular 1MB IO,
before: sizeof(struct osd_thread_info) = 82104
after:  sizeof(struct osd_thread_info) = 4328 + 4K (if IO thread)

should improve threads not doing IO: all MDS threads, LDLM threads,
MGS threads.

Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Change-Id: Ie07780537a4598c6a888ed9be4ef0bbb0d9b3d54
Reviewed-on: http://review.whamcloud.com/5444
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
lustre/include/linux/lustre_fsfilt.h
lustre/include/lu_object.h
lustre/lvfs/fsfilt_ext3.c
lustre/obdclass/lu_object.c
lustre/osd-ldiskfs/osd_handler.c
lustre/osd-ldiskfs/osd_internal.h
lustre/osd-ldiskfs/osd_io.c