From a3aa2eefd3d4708ce7094ed644c30b784c39eb2c Mon Sep 17 00:00:00 2001 From: Alex Zhuravlev Date: Wed, 27 Oct 2021 08:48:03 +0300 Subject: [PATCH] LU-15168 osd: use large allocation for idc cache as in some cases (e.g. ofd precreate) the cache can grow to dozens of kilobytes (sizeof(struct idc_map_cache)=40 * 1024). Signed-off-by: Alex Zhuravlev Change-Id: Id9e0996a7a1d07065f4a50c1d5be5051e756559a Reviewed-on: https://review.whamcloud.com/45382 Reviewed-by: Andreas Dilger Tested-by: Maloo Reviewed-by: Mike Pershin Tested-by: jenkins --- lustre/osd-ldiskfs/osd_handler.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lustre/osd-ldiskfs/osd_handler.c b/lustre/osd-ldiskfs/osd_handler.c index 34f8465c..756a0fc 100644 --- a/lustre/osd-ldiskfs/osd_handler.c +++ b/lustre/osd-ldiskfs/osd_handler.c @@ -212,13 +212,13 @@ osd_idc_add(const struct lu_env *env, struct osd_device *osd, i = oti->oti_ins_cache_size * 2; if (i == 0) i = OSD_INS_CACHE_SIZE; - OBD_ALLOC_PTR_ARRAY(idc, i); + OBD_ALLOC_PTR_ARRAY_LARGE(idc, i); if (idc == NULL) return ERR_PTR(-ENOMEM); if (oti->oti_ins_cache != NULL) { memcpy(idc, oti->oti_ins_cache, oti->oti_ins_cache_used * sizeof(*idc)); - OBD_FREE_PTR_ARRAY(oti->oti_ins_cache, + OBD_FREE_PTR_ARRAY_LARGE(oti->oti_ins_cache, oti->oti_ins_cache_used); } oti->oti_ins_cache = idc; @@ -7737,7 +7737,7 @@ static void osd_key_fini(const struct lu_context *ctx, lu_buf_free(&info->oti_big_buf); if (idc != NULL) { LASSERT(info->oti_ins_cache_size > 0); - OBD_FREE_PTR_ARRAY(idc, info->oti_ins_cache_size); + OBD_FREE_PTR_ARRAY_LARGE(idc, info->oti_ins_cache_size); info->oti_ins_cache = NULL; info->oti_ins_cache_size = 0; } -- 1.8.3.1