All of lore.kernel.org
 help / color / mirror / Atom feed
From: Trond Myklebust <trond.myklebust@fys.uio.no>
To: Andrew Morton <akpm@osdl.org>
Cc: David Howells <dhowells@redhat.com>,
	axboe@kernel.dk, linux-fsdevel@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 19/19] BLOCK: Make it possible to disable the block layer [try #6]
Date: Wed, 30 Aug 2006 17:06:39 -0400	[thread overview]
Message-ID: <1156971999.5787.12.camel@localhost> (raw)
In-Reply-To: <20060830124400.23ca9b38.akpm@osdl.org>

[-- Attachment #1: Type: text/plain, Size: 720 bytes --]

On Wed, 2006-08-30 at 12:44 -0700, Andrew Morton wrote:
> I think I'll just slam all this in at the first opportunity.  Stuff will
> break, but it will be easy to fix.
> 
> If you try to upissue this patchset I shall be seeking an IP-routable hand
> grenade.
> 
> On Tue, 29 Aug 2006 19:06:34 +0100
> David Howells <dhowells@redhat.com> wrote:
> 
> > +static inline long blk_congestion_wait(int rw, long timeout)
> > +{
> > +	return timeout;
> > +}
> 
> This function is misnamed and is implemented in the wrong place.  It's not
> really a block thing at all.  If/when/soon NFS starts to implement it and
> call it, things will need to be renamed and reshuffled.

Already done in the NFS git tree. See attached patch.



[-- Attachment #2: linux-2.6.18-052-add_fixes_for_the_congestion_wait_crap.dif --]
[-- Type: message/rfc822, Size: 2917 bytes --]

From: Trond Myklebust <Trond.Myklebust@netapp.com>
Subject: No Subject
Date: Mon, 28 Aug 2006 08:15:59 -0400
Message-ID: <1156971983.5787.11.camel@localhost>

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
---

 block/ll_rw_blk.c         |   12 ++++++++++++
 fs/nfs/write.c            |    1 +
 include/linux/blkdev.h    |    1 +
 include/linux/writeback.h |    1 +
 mm/page-writeback.c       |    9 +++++++++
 5 files changed, 24 insertions(+), 0 deletions(-)

diff --git a/block/ll_rw_blk.c b/block/ll_rw_blk.c
index ddd9253..dcbd6ff 100644
--- a/block/ll_rw_blk.c
+++ b/block/ll_rw_blk.c
@@ -2734,6 +2734,18 @@ long blk_congestion_wait(int rw, long ti
 
 EXPORT_SYMBOL(blk_congestion_wait);
 
+/**
+ * blk_congestion_end - wake up sleepers on a congestion queue
+ * @rw: READ or WRITE
+ */
+void blk_congestion_end(int rw)
+{
+	wait_queue_head_t *wqh = &congestion_wqh[rw];
+
+	if (waitqueue_active(wqh))
+		wake_up(wqh);
+}
+
 /*
  * Has to be called with the request spinlock acquired
  */
diff --git a/fs/nfs/write.c b/fs/nfs/write.c
index 7bc500b..1f7a6d4 100644
--- a/fs/nfs/write.c
+++ b/fs/nfs/write.c
@@ -403,6 +403,7 @@ int nfs_writepages(struct address_space 
 out:
 	clear_bit(BDI_write_congested, &bdi->state);
 	wake_up_all(&nfs_write_congestion);
+	writeback_congestion_end();
 	return err;
 }
 
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index aafe827..96c9040 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -746,6 +746,7 @@ extern void blk_queue_free_tags(request_
 extern int blk_queue_resize_tags(request_queue_t *, int);
 extern void blk_queue_invalidate_tags(request_queue_t *);
 extern long blk_congestion_wait(int rw, long timeout);
+extern void blk_congestion_end(int rw);
 
 extern void blk_rq_bio_prep(request_queue_t *, struct request *, struct bio *);
 extern int blkdev_issue_flush(struct block_device *, sector_t *);
diff --git a/include/linux/writeback.h b/include/linux/writeback.h
index 9e38b56..0422036 100644
--- a/include/linux/writeback.h
+++ b/include/linux/writeback.h
@@ -85,6 +85,7 @@ int wakeup_pdflush(long nr_pages);
 void laptop_io_completion(void);
 void laptop_sync_completion(void);
 void throttle_vm_writeout(void);
+void writeback_congestion_end(void);
 
 /* These are exported to sysctl. */
 extern int dirty_background_ratio;
diff --git a/mm/page-writeback.c b/mm/page-writeback.c
index e630188..77a0bc4 100644
--- a/mm/page-writeback.c
+++ b/mm/page-writeback.c
@@ -803,6 +803,15 @@ int test_set_page_writeback(struct page 
 EXPORT_SYMBOL(test_set_page_writeback);
 
 /*
+ * Wakes up tasks that are being throttled due to writeback congestion
+ */
+void writeback_congestion_end(void)
+{
+	blk_congestion_end(WRITE);
+}
+EXPORT_SYMBOL(writeback_congestion_end);
+
+/*
  * Return true if any of the pages in the mapping are marged with the
  * passed tag.
  */

  parent reply	other threads:[~2006-08-30 21:06 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-29 18:05 [PATCH 00/19] BLOCK: Permit block layer to be disabled [try #6] David Howells
2006-08-29 18:05 ` [PATCH 01/19] BLOCK: Move functions out of buffer code " David Howells
2006-08-29 18:05 ` [PATCH 02/19] BLOCK: Remove duplicate declaration of exit_io_context() " David Howells
2006-08-29 18:05 ` [PATCH 03/19] BLOCK: Stop fallback_migrate_page() from using page_has_buffers() " David Howells
2006-08-29 18:06 ` [PATCH 04/19] BLOCK: Separate the bounce buffering code from the highmem code " David Howells
2006-08-29 18:06 ` [PATCH 05/19] BLOCK: Don't call block_sync_page() from AFS " David Howells
2006-08-29 18:06 ` [PATCH 06/19] BLOCK: Move extern declarations out of fs/*.c into header files " David Howells
2006-08-29 18:06 ` [PATCH 07/19] BLOCK: Remove dependence on existence of blockdev_superblock " David Howells
2006-08-29 18:06 ` [PATCH 08/19] BLOCK: Dissociate generic_writepages() from mpage stuff " David Howells
2006-08-29 18:06 ` [PATCH 09/19] BLOCK: Move __invalidate_device() to block_dev.c " David Howells
2006-08-29 18:06 ` [PATCH 10/19] BLOCK: Move the loop device ioctl compat stuff to the loop driver " David Howells
2006-08-29 18:06 ` [PATCH 11/19] BLOCK: Move common FS-specific ioctls to linux/fs.h " David Howells
2006-08-29 18:06 ` [PATCH 12/19] BLOCK: Move the ReiserFS device ioctl compat stuff to the ReiserFS driver " David Howells
2006-08-29 18:06 ` [PATCH 13/19] BLOCK: Move the Ext2 device ioctl compat stuff to the Ext2 " David Howells
2006-08-29 18:06 ` [PATCH 14/19] BLOCK: Move the Ext3 device ioctl compat stuff to the Ext3 " David Howells
2006-08-29 18:06 ` [PATCH 15/19] BLOCK: Move the msdos device ioctl compat stuff to the msdos " David Howells
2006-08-29 18:06 ` [PATCH 16/19] BLOCK: Remove no-longer necessary linux/mpage.h inclusions " David Howells
2006-08-29 18:06 ` [PATCH 17/19] BLOCK: Remove no-longer necessary linux/buffer_head.h " David Howells
2006-08-29 18:06 ` [PATCH 18/19] BLOCK: Make USB storage depend on SCSI rather than selecting it " David Howells
2006-08-29 18:53   ` Michael Buesch
2006-08-29 21:12   ` Stefan Richter
2006-08-30  8:25     ` David Howells
2006-08-30  8:43       ` Stefan Richter
2006-08-30 12:49         ` Dave Kleikamp
2006-08-30 13:02           ` David Howells
2006-08-30 13:10             ` Dave Kleikamp
2006-08-29 18:06 ` [PATCH 19/19] BLOCK: Make it possible to disable the block layer " David Howells
2006-08-30 19:44   ` Andrew Morton
2006-08-30 20:13     ` David Howells
2006-08-30 20:24     ` Jens Axboe
2006-08-30 21:06     ` Trond Myklebust [this message]
2006-08-30 21:20       ` Andrew Morton
2006-08-30 12:06 ` [PATCH 00/19] BLOCK: Permit block layer to be disabled " Jens Axboe
2006-08-30 20:07   ` David Howells

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1156971999.5787.12.camel@localhost \
    --to=trond.myklebust@fys.uio.no \
    --cc=akpm@osdl.org \
    --cc=axboe@kernel.dk \
    --cc=dhowells@redhat.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.