From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753242AbcAVLWg (ORCPT ); Fri, 22 Jan 2016 06:22:36 -0500 Received: from e06smtp06.uk.ibm.com ([195.75.94.102]:60457 "EHLO e06smtp06.uk.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752561AbcAVLWa (ORCPT ); Fri, 22 Jan 2016 06:22:30 -0500 X-IBM-Helo: d06dlp01.portsmouth.uk.ibm.com X-IBM-MailFrom: borntraeger@de.ibm.com X-IBM-RcptTo: linux-kernel@vger.kernel.org From: Christian Borntraeger To: linux-kernel@vger.kernel.org Cc: Thomas Gleixner , Christian Borntraeger Subject: [PATCH 1/1] debugobjects: Allow bigger number of objects Date: Fri, 22 Jan 2016 12:22:41 +0100 Message-Id: <1453461761-14761-1-git-send-email-borntraeger@de.ibm.com> X-Mailer: git-send-email 2.3.0 X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16012211-0025-0000-0000-0000059CC715 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On my bigger s390 systems I always get "Out of memory. ODEBUG disabled". Since the number of objects is needed at compile time in the code, let's provide a Kconfig variable to increase the number of static objects. Signed-off-by: Christian Borntraeger --- lib/Kconfig.debug | 11 +++++++++++ lib/debugobjects.c | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 8c15b29..dc44b6f 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -453,6 +453,17 @@ config DEBUG_OBJECTS_ENABLE_DEFAULT help Debug objects boot parameter default value +config DEBUG_OBJECTS_STATIC_ELEMENTS + int "debug_objects static element buffer size (100-10000)" + range 100 10000 + default "500" + depends on DEBUG_OBJECTS + help + How many static objects can be stored at early boot time. If this + value is exceeded object debugging will stop with an message + "Out of memory. ODEBUG disabled". Higher values will allocate a + bigger static buffer, but this buffer will be released later on. + config DEBUG_SLAB bool "Debug slab memory allocations" depends on DEBUG_KERNEL && SLAB && !KMEMCHECK diff --git a/lib/debugobjects.c b/lib/debugobjects.c index 547f7f9..fc4ae86 100644 --- a/lib/debugobjects.c +++ b/lib/debugobjects.c @@ -21,7 +21,7 @@ #define ODEBUG_HASH_BITS 14 #define ODEBUG_HASH_SIZE (1 << ODEBUG_HASH_BITS) -#define ODEBUG_POOL_SIZE 512 +#define ODEBUG_POOL_SIZE CONFIG_DEBUG_OBJECTS_STATIC_ELEMENTS #define ODEBUG_POOL_MIN_LEVEL 256 #define ODEBUG_CHUNK_SHIFT PAGE_SHIFT -- 2.3.0