Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755480AbcCaAA7 (ORCPT ); Wed, 30 Mar 2016 20:00:59 -0400 Received: from linuxhacker.ru ([217.76.32.60]:42708 "EHLO fiona.linuxhacker.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752633AbcC3Xth (ORCPT ); Wed, 30 Mar 2016 19:49:37 -0400 From: green@linuxhacker.ru To: Greg Kroah-Hartman , devel@driverdev.osuosl.org, Andreas Dilger Cc: Linux Kernel Mailing List , Lustre Development List , Oleg Drokin , Li Dongyang Subject: [PATCH v2 01/46] staging/lustre/obdclass: limit lu_site hash table size Date: Wed, 30 Mar 2016 19:48:22 -0400 Message-Id: <1459381747-2886687-2-git-send-email-green@linuxhacker.ru> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1459381747-2886687-1-git-send-email-green@linuxhacker.ru> References: <1459381747-2886687-1-git-send-email-green@linuxhacker.ru> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1347 Lines: 35 From: Oleg Drokin Allocating a big hash table using the formula for osd does not really work for clients. We will create new hash table for each mount on a single client which is a lot of memory more than expected. This patch limits the hash table up to 8M which has 524288 entries Signed-off-by: Li Dongyang Reviewed-on: http://review.whamcloud.com/18048 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7689 Reviewed-by: Fan Yong Reviewed-by: Alex Zhuravlev Signed-off-by: Oleg Drokin --- drivers/staging/lustre/lustre/obdclass/lu_object.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/obdclass/lu_object.c b/drivers/staging/lustre/lustre/obdclass/lu_object.c index 65a4746..69fdcee 100644 --- a/drivers/staging/lustre/lustre/obdclass/lu_object.c +++ b/drivers/staging/lustre/lustre/obdclass/lu_object.c @@ -935,7 +935,7 @@ static void lu_dev_add_linkage(struct lu_site *s, struct lu_device *d) * Initialize site \a s, with \a d as the top level device. */ #define LU_SITE_BITS_MIN 12 -#define LU_SITE_BITS_MAX 24 +#define LU_SITE_BITS_MAX 19 /** * total 256 buckets, we don't want too many buckets because: * - consume too much memory -- 2.1.0