From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jens Axboe Subject: Re: [PATCH 1/3] writeback: simplify the write back thread queue Date: Mon, 21 Jun 2010 09:47:05 +0200 Message-ID: <4C1F18F9.4070206@kernel.dk> References: <20100619210756.GA29875@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: linux-fsdevel@vger.kernel.org To: Christoph Hellwig Return-path: Received: from 0122700014.0.fullrate.dk ([95.166.99.235]:48513 "EHLO kernel.dk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752168Ab0FUHrI (ORCPT ); Mon, 21 Jun 2010 03:47:08 -0400 In-Reply-To: <20100619210756.GA29875@lst.de> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On 2010-06-19 23:07, Christoph Hellwig wrote: > 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. I'm fine with this, we can always bring back support for > 1 writeback thread per bdi when the need arises. -- Jens Axboe