Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1314917 > unrolled thread
| Started by | Christian Borntraeger <borntraeger@de.ibm.com> |
|---|---|
| First post | 2016-01-22 12:30 +0100 |
| Last post | 2016-01-27 14:40 +0100 |
| Articles | 4 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH 1/1] debugobjects: Allow bigger number of objects Christian Borntraeger <borntraeger@de.ibm.com> - 2016-01-22 12:30 +0100
Re: [PATCH 1/1] debugobjects: Allow bigger number of objects Thomas Gleixner <tglx@linutronix.de> - 2016-01-26 21:30 +0100
Re: [PATCH 1/1] debugobjects: Allow bigger number of objects Christian Borntraeger <borntraeger@de.ibm.com> - 2016-01-27 13:50 +0100
Re: [PATCH 1/1] debugobjects: Allow bigger number of objects Thomas Gleixner <tglx@linutronix.de> - 2016-01-27 14:40 +0100
| From | Christian Borntraeger <borntraeger@de.ibm.com> |
|---|---|
| Date | 2016-01-22 12:30 +0100 |
| Subject | [PATCH 1/1] debugobjects: Allow bigger number of objects |
| Message-ID | <qTI4G-3lg-19@gated-at.bofh.it> |
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 <borntraeger@de.ibm.com>
---
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
[toc] | [next] | [standalone]
| From | Thomas Gleixner <tglx@linutronix.de> |
|---|---|
| Date | 2016-01-26 21:30 +0100 |
| Message-ID | <qVips-Vs-13@gated-at.bofh.it> |
| In reply to | #1314917 |
On Fri, 22 Jan 2016, Christian Borntraeger wrote: > 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. How many do you need on those big machines? Can't we scale that automagically with the number of cpus or such? Thanks, tglx > Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> > --- > 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 > >
[toc] | [prev] | [next] | [standalone]
| From | Christian Borntraeger <borntraeger@de.ibm.com> |
|---|---|
| Date | 2016-01-27 13:50 +0100 |
| Message-ID | <qVxHQ-3xq-11@gated-at.bofh.it> |
| In reply to | #1318337 |
On 01/26/2016 09:22 PM, Thomas Gleixner wrote: > On Fri, 22 Jan 2016, Christian Borntraeger wrote: > >> 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. > > How many do you need on those big machines? Can't we scale that automagically > with the number of cpus or such? It seems to be 530 - actually pretty close. Hmm, we could simply increase that to 1000, it is initdata anyway? > > Thanks, > > tglx > >> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> >> --- >> 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 >> >> >
[toc] | [prev] | [next] | [standalone]
| From | Thomas Gleixner <tglx@linutronix.de> |
|---|---|
| Date | 2016-01-27 14:40 +0100 |
| Message-ID | <qVyud-49M-3@gated-at.bofh.it> |
| In reply to | #1318924 |
On Wed, 27 Jan 2016, Christian Borntraeger wrote: > On 01/26/2016 09:22 PM, Thomas Gleixner wrote: > > On Fri, 22 Jan 2016, Christian Borntraeger wrote: > > > >> 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. > > > > How many do you need on those big machines? Can't we scale that automagically > > with the number of cpus or such? > > It seems to be 530 - actually pretty close. > Hmm, we could simply increase that to 1000, it is initdata anyway? Yes, it's initdata, so it doesn't matter much. Thanks, tglx
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web