mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] not sleep while holding a locked page in block_truncate_page
@ 2000-12-28 15:18 Marcelo Tosatti
  2000-12-28 18:01 ` Linus Torvalds
  0 siblings, 1 reply; 7+ messages in thread
From: Marcelo Tosatti @ 2000-12-28 15:18 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Juan Quintela, Rik van Riel, linux-kernel


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 decrement its counter.

Comments?

--- linux.orig/fs/buffer.c.orig    Thu Dec 28 15:01:01 2000
+++ linux/fs/buffer.c Thu Dec 28 15:01:40 2000
@@ -1909,12 +1909,13 @@
        flush_dcache_page(page);
        kunmap(page);
 
-       mark_buffer_dirty(bh);
+       __mark_buffer_dirty(bh);
        err = 0;
 
 unlock:
        UnlockPage(page);
        page_cache_release(page);
+       balance_dirty(bh->b_dev);
 out:
        return err;
 }


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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2000-12-29 16:40 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-12-28 15:18 [PATCH] not sleep while holding a locked page in block_truncate_page Marcelo Tosatti
2000-12-28 18:01 ` Linus Torvalds
2000-12-28 16:25   ` Marcelo Tosatti
2000-12-28 18:25     ` Linus Torvalds
2000-12-28 18:35       ` [PATCH] remove __mark_buffer_dirty and related changes Marcelo Tosatti
2000-12-29 10:31         ` Russell King
2000-12-29 14:16           ` Marcelo Tosatti

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®