* Re: [Proposal] DEBUG_SLAB should select DEBUG_SPINLOCK
2004-05-28 19:45 [Proposal] DEBUG_SLAB should select DEBUG_SPINLOCK Roland Dreier
@ 2004-05-28 19:42 ` Randy.Dunlap
2004-05-28 19:54 ` Roland Dreier
0 siblings, 1 reply; 5+ messages in thread
From: Randy.Dunlap @ 2004-05-28 19:42 UTC (permalink / raw)
To: Roland Dreier; +Cc: linux-kernel
On 28 May 2004 12:45:35 -0700 Roland Dreier wrote:
| I recently had a rather amusing debugging session. I developed some
| code that worked fine on my test kernel, which had CONFIG_DEBUG_SLAB
| turned on. However, as soon as I moved to a kernel without slab
| debugging to do some benchmarks, I started getting lockups. It turns
| out that I had a spinlock in my data structure that I forgot to
| initialize but the poisoning from slab debugging had taken care of
| initializing it for me. I didn't catch this during development
| because I had left CONFIG_DEBUG_SPINLOCK off.
|
| Fortunately (for my sanity) I was able to diagnose this pretty quickly
| with the help of the NMI oopser. However, for other developers' sake,
| I think it might make sense to add
|
| select DEBUG_SPINLOCK
|
| to the DEBUG_SLAB stanza of Kconfig.
|
| I'm not posting a patch because I wanted to find out the status of
| Randy Dunlap's patch that consolidates the debugging options. Is that
| patch going to be merged, in someone's tree somewhere, dropped, or what?
Andrew asked me to delay it until 2.6.6, which I did.
Sent that, but not merged.
I will be rediffing it and resending it again for 2.6.7 and
probably some intermediate kernels if that's what it takes.
| If the consensus is that we don't want to do this anyway, that's
| fine. I mostly wanted to share this bug, which amused me.
--
~Randy
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Proposal] DEBUG_SLAB should select DEBUG_SPINLOCK
@ 2004-05-28 19:45 Roland Dreier
2004-05-28 19:42 ` Randy.Dunlap
0 siblings, 1 reply; 5+ messages in thread
From: Roland Dreier @ 2004-05-28 19:45 UTC (permalink / raw)
To: linux-kernel, rddunlap
I recently had a rather amusing debugging session. I developed some
code that worked fine on my test kernel, which had CONFIG_DEBUG_SLAB
turned on. However, as soon as I moved to a kernel without slab
debugging to do some benchmarks, I started getting lockups. It turns
out that I had a spinlock in my data structure that I forgot to
initialize but the poisoning from slab debugging had taken care of
initializing it for me. I didn't catch this during development
because I had left CONFIG_DEBUG_SPINLOCK off.
Fortunately (for my sanity) I was able to diagnose this pretty quickly
with the help of the NMI oopser. However, for other developers' sake,
I think it might make sense to add
select DEBUG_SPINLOCK
to the DEBUG_SLAB stanza of Kconfig.
I'm not posting a patch because I wanted to find out the status of
Randy Dunlap's patch that consolidates the debugging options. Is that
patch going to be merged, in someone's tree somewhere, dropped, or what?
If the consensus is that we don't want to do this anyway, that's
fine. I mostly wanted to share this bug, which amused me.
Thanks,
Roland
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Proposal] DEBUG_SLAB should select DEBUG_SPINLOCK
2004-05-28 19:42 ` Randy.Dunlap
@ 2004-05-28 19:54 ` Roland Dreier
2004-05-28 20:00 ` Randy.Dunlap
0 siblings, 1 reply; 5+ messages in thread
From: Roland Dreier @ 2004-05-28 19:54 UTC (permalink / raw)
To: Randy.Dunlap; +Cc: linux-kernel
Randy> Andrew asked me to delay it until 2.6.6, which I did. Sent
Randy> that, but not merged.
Randy> I will be rediffing it and resending it again for 2.6.7 and
Randy> probably some intermediate kernels if that's what it takes.
Thanks for the info. I guess I'll wait for your patch to be merged
and then send my (trivial) patch.
- Roland
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Proposal] DEBUG_SLAB should select DEBUG_SPINLOCK
2004-05-28 19:54 ` Roland Dreier
@ 2004-05-28 20:00 ` Randy.Dunlap
2004-05-28 20:35 ` Roland Dreier
0 siblings, 1 reply; 5+ messages in thread
From: Randy.Dunlap @ 2004-05-28 20:00 UTC (permalink / raw)
To: Roland Dreier; +Cc: linux-kernel
On 28 May 2004 12:54:35 -0700 Roland Dreier wrote:
| Randy> Andrew asked me to delay it until 2.6.6, which I did. Sent
| Randy> that, but not merged.
|
| Randy> I will be rediffing it and resending it again for 2.6.7 and
| Randy> probably some intermediate kernels if that's what it takes.
|
| Thanks for the info. I guess I'll wait for your patch to be merged
| and then send my (trivial) patch.
You can wait, or send it to Andrew for merging (it will just be one
more small change for me), or send it to me for Kconfig.debug.
I won't lose it, but it's probably safer just to send it to Andrew,
and I can deal with that small diff later.
--
~Randy
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Proposal] DEBUG_SLAB should select DEBUG_SPINLOCK
2004-05-28 20:00 ` Randy.Dunlap
@ 2004-05-28 20:35 ` Roland Dreier
0 siblings, 0 replies; 5+ messages in thread
From: Roland Dreier @ 2004-05-28 20:35 UTC (permalink / raw)
To: Randy.Dunlap; +Cc: linux-kernel
Randy> You can wait, or send it to Andrew for merging (it will
Randy> just be one more small change for me), or send it to me for
Randy> Kconfig.debug.
Randy> I won't lose it, but it's probably safer just to send it to
Randy> Andrew, and I can deal with that small diff later.
I'm going to wait to make my patch so that I don't have to change
every single arch Kconfig file to add the same line to the DEBUG_SLAB
stanza.
- R.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2004-05-28 20:35 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-28 19:45 [Proposal] DEBUG_SLAB should select DEBUG_SPINLOCK Roland Dreier
2004-05-28 19:42 ` Randy.Dunlap
2004-05-28 19:54 ` Roland Dreier
2004-05-28 20:00 ` Randy.Dunlap
2004-05-28 20:35 ` Roland Dreier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox