Re: [PATCH] not sleep while holding a locked page in block_truncate_page

2000-12-28 Thread Linus Torvalds
On Thu, 28 Dec 2000, Marcelo Tosatti wrote: > > If we call mark_buffer_dirty() on an already dirty buffer, we may sleep > waiting for bdflush even if we haven't caused _any_ real disk IO (because > the buffer was already dirty anyway). > > I think it makes more sense if we only call balance_di

Re: [PATCH] not sleep while holding a locked page in block_truncate_page

2000-12-28 Thread Marcelo Tosatti
On Thu, 28 Dec 2000, Linus Torvalds wrote: > > > On Thu, 28 Dec 2000, Marcelo Tosatti wrote: > > > > Hi Linus, > > > > block_truncate_page() function unecessarily calls mark_buffer_dirty(), > > which may wait on bdflush, while holding a locked page. > > Good catch. It should be ok to slee

Re: [PATCH] not sleep while holding a locked page in block_truncate_page

2000-12-28 Thread Linus Torvalds
On Thu, 28 Dec 2000, Marcelo Tosatti wrote: > > Hi Linus, > > block_truncate_page() function unecessarily calls mark_buffer_dirty(), > which may wait on bdflush, while holding a locked page. Good catch. It should be ok to sleep for bdflush while holding the page, but at the same time it's ce

[PATCH] not sleep while holding a locked page in block_truncate_page

2000-12-28 Thread Marcelo Tosatti
Hi Linus, block_truncate_page() function unecessarily calls mark_buffer_dirty(), which may wait on bdflush, while holding a locked page. The following patch against 2.4.0test13pre4 makes block_truncate_page call balance_dirty() (which may wait for bdflush) after when we unlocked the page and d