writeback: simplify the write back thread queue

Previous thread: ALSA: hda - Add Macbook 5,2 quirk by Linux Kernel Mailing List on Thursday, July 8, 2010 - 8:59 am. (1 message)

Next thread: RDMA/cxgb4: Don't call abort_connection() for active connect failures by Linux Kernel Mailing List on Thursday, July 8, 2010 - 12:59 pm. (1 message)
From: Linux Kernel Mailing List
Date: Thursday, July 8, 2010 - 8:59 am

Gitweb:     http://git.kernel.org/linus/83ba7b071f30f7c01f72518ad72d5cd203c27502
Commit:     83ba7b071f30f7c01f72518ad72d5cd203c27502
Parent:     edadfb10ba35da7253541e4155aa92eff758ebe6
Author:     Christoph Hellwig <hch@lst.de>
AuthorDate: Tue Jul 6 08:59:53 2010 +0200
Committer:  Jens Axboe <jaxboe@fusionio.com>
CommitDate: Tue Jul 6 08:59:53 2010 +0200

    writeback: simplify the write back thread queue
    
    First remove items from work_list as soon as we start working on them.  This
    means we don't have to track any pending or visited state and can get
    rid of all the RCU magic freeing the work items - we can simply free
    them once the operation has finished.  Second use a real completion for
    tracking synchronous requests - if the caller sets the completion pointer
    we complete it, otherwise use it as a boolean indicator that we can free
    the work item directly.  Third unify struct wb_writeback_args and struct
    bdi_work into a single data structure, wb_writeback_work.  Previous we
    set all parameters into a struct wb_writeback_args, copied it into
    struct bdi_work, copied it again on the stack to use it there.  Instead
    of just allocate one structure dynamically or on the stack and use it
    all the way through the stack.
    
    Signed-off-by: Christoph Hellwig <hch@lst.de>
    Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
---
 fs/fs-writeback.c           |  253 ++++++++++++-------------------------------
 include/linux/backing-dev.h |    2 -
 mm/backing-dev.c            |   14 +--
 3 files changed, 72 insertions(+), 197 deletions(-)

diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
index 8cc06d5..d5be169 100644
--- a/fs/fs-writeback.c
+++ b/fs/fs-writeback.c
@@ -38,43 +38,18 @@ int nr_pdflush_threads;
 /*
  * Passed into wb_writeback(), essentially a subset of writeback_control
  */
-struct wb_writeback_args {
+struct wb_writeback_work {
 	long nr_pages;
 	struct super_block *sb;
 	enum writeback_sync_modes ...
Previous thread: ALSA: hda - Add Macbook 5,2 quirk by Linux Kernel Mailing List on Thursday, July 8, 2010 - 8:59 am. (1 message)

Next thread: RDMA/cxgb4: Don't call abort_connection() for active connect failures by Linux Kernel Mailing List on Thursday, July 8, 2010 - 12:59 pm. (1 message)