* BH_Req question
@ 2001-04-10 20:12 Rajagopal Ananthanarayanan
2001-04-10 21:42 ` Andrea Arcangeli
0 siblings, 1 reply; 3+ messages in thread
From: Rajagopal Ananthanarayanan @ 2001-04-10 20:12 UTC (permalink / raw)
To: linux-kernel; +Cc: axboe, torvalds
Hi,
It seems BH_Req is set on a buffer_head by submit_bh.
What part of the code unsets this flag during normal
operations? One path seems to be block_flushpage->unmap_buffer
->clear_bit(BH_Req), but IIRC block_flushpage is used only
for truncates. There must be another path to unset BH_Req
under normal memory pressure, or (more unambiguously) on IO completion.
So: in what ways can BH_Req be unset?
Thanks for any input, i've been staring at the code for long without avail ...
cheers,
ananth.
PS: In case why the question: I've got a system with tons of
pages with buffers marked BH_Req, so try_to_free_buffers() bails
out thinking that the buffer is busy ...
--
--------------------------------------------------------------------------
Rajagopal Ananthanarayanan ("ananth")
Member Technical Staff, SGI.
--------------------------------------------------------------------------
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: BH_Req question
2001-04-10 20:12 BH_Req question Rajagopal Ananthanarayanan
@ 2001-04-10 21:42 ` Andrea Arcangeli
2001-04-10 22:03 ` Rajagopal Ananthanarayanan
0 siblings, 1 reply; 3+ messages in thread
From: Andrea Arcangeli @ 2001-04-10 21:42 UTC (permalink / raw)
To: Rajagopal Ananthanarayanan; +Cc: linux-kernel, axboe, torvalds
On Tue, Apr 10, 2001 at 01:12:02PM -0700, Rajagopal Ananthanarayanan wrote:
>
> Hi,
>
> It seems BH_Req is set on a buffer_head by submit_bh.
> What part of the code unsets this flag during normal
> operations? One path seems to be block_flushpage->unmap_buffer
> ->clear_bit(BH_Req), but IIRC block_flushpage is used only
> for truncates. There must be another path to unset BH_Req
> under normal memory pressure, or (more unambiguously) on IO completion.
>
> So: in what ways can BH_Req be unset?
BH_Req is never unset until the buffer is destroyed (put back on the freelist).
BH_Req only says if such a buffer ever did any I/O yet or not. It is basically
only used to deal with I/O errors in sync_buffers().
> PS: In case why the question: I've got a system with tons of
> pages with buffers marked BH_Req, so try_to_free_buffers() bails
> out thinking that the buffer is busy ...
Either your debugging is wrong or you broke try_to_free_buffers because a
buffer with BH_Req must still be perfectly freeable.
Andrea
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: BH_Req question
2001-04-10 21:42 ` Andrea Arcangeli
@ 2001-04-10 22:03 ` Rajagopal Ananthanarayanan
0 siblings, 0 replies; 3+ messages in thread
From: Rajagopal Ananthanarayanan @ 2001-04-10 22:03 UTC (permalink / raw)
To: Andrea Arcangeli; +Cc: linux-kernel, axboe
Andrea Arcangeli wrote:
>
[ ... ]
>
> BH_Req is never unset until the buffer is destroyed (put back on the freelist).
> BH_Req only says if such a buffer ever did any I/O yet or not. It is basically
> only used to deal with I/O errors in sync_buffers().
Interesting. Thanks for the explanation. Since submit_bh was setting BH_Req,
I was misled into thinking that end_io would unset it ...
>
> > PS: In case why the question: I've got a system with tons of
> > pages with buffers marked BH_Req, so try_to_free_buffers() bails
> > out thinking that the buffer is busy ...
>
> Either your debugging is wrong or you broke try_to_free_buffers because a
> buffer with BH_Req must still be perfectly freeable.
Okay, I got distracted by BH_Req, which I mistook to be in BUFFER_BUSY_BITS.
There was also BH_Lock set on the buffers, which would qualify for BUFFER_BUSY_BITS ...
so may be it is a buffer_locking problem somewhere.
cheers,
ananth.
--------------------------------------------------------------------------
Rajagopal Ananthanarayanan ("ananth")
Member Technical Staff, SGI.
--------------------------------------------------------------------------
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2001-04-10 22:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-04-10 20:12 BH_Req question Rajagopal Ananthanarayanan
2001-04-10 21:42 ` Andrea Arcangeli
2001-04-10 22:03 ` Rajagopal Ananthanarayanan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox