lkml.org 
[lkml]   [1999]   [Sep]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] show_buffers() resurrection
On Sat, 11 Sep 1999, David S. Miller wrote:

>Andrea, this was _SPECIFICALLY_ removed because it made the buffer
>cache locking more complex. You risk total and complete deadlock
>unless you change all of the buffer cache spinlocks to be IRQ
>spinlocks.

Do you read my patch? Do you know how spin_trylock works? One of my two
questions must have answer == no.

If you didn't find a way to make it safe without converting all spinlocks
to irq-spinlocks you shouldn't be so sure I can't find a way to do that
safely.

Also 2.2.x has the same bug in SMP since you should do:

spin_trylock(&kernel_flag);

at the top of show_buffers().

And anyway it's extremely stupid to remove the debugging code in a 2.3.x
kernel where you want to get out from the kernel more debugging
information, and left the bug in 2.2.x where 99% of users doesn't care
about such information. Note that also in 2.2.x the bug can be fixed
without removing the function for SMP. On an UP compile instead you should
#ifdef __SMP__ the code if you want to fix all doors for races, since
spin_trylock does nothing on UP (it would work fine if the spinlock
wouldn't be a noop...). Right now in 2.3.x I believe it's better to _not_
comment out the code also considering that such potential irq-race is
present in 2.0.x 2.1.x 2.2.x and considering that my code is completly
safe in a SMP compile. We'll #ifdef __SMP__ the code when we'll be near to
2.4.x.

And even if the lru list information wouldn't be safely-fixable in SMP we
should still printk the "Buffer memory" since in a complete lockup I want
to see such information from the SYSRQ+M.

So I definetly _want_ the show_buffers() resurrection.

The only point I can agree with you is the UP compile, if you want to hide
the debugging information to not risk to irq-race I can send you a new
patch with only an additional #ifdef __SMP__. I believe the right thing
to do is adding an #ifdef __SMP__ at code-freeze time.

Andrea


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:53    [W:0.062 / U:0.420 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site