From mboxrd@z Thu Jan 1 00:00:00 1970 From: Artem Bityutskiy Subject: Re: [PATCH 1/3] writeback: simplify the write back thread queue Date: Sun, 20 Jun 2010 11:40:58 +0300 Message-ID: <1277023258.2503.27.camel@localhost.localdomain> References: <20100619210756.GA29875@lst.de> Reply-To: dedekind1@gmail.com Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: axboe@kernel.dk, linux-fsdevel@vger.kernel.org To: Christoph Hellwig Return-path: Received: from mail-fx0-f46.google.com ([209.85.161.46]:48840 "EHLO mail-fx0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755680Ab0FTIlF (ORCPT ); Sun, 20 Jun 2010 04:41:05 -0400 Received: by fxm10 with SMTP id 10so1302339fxm.19 for ; Sun, 20 Jun 2010 01:41:02 -0700 (PDT) In-Reply-To: <20100619210756.GA29875@lst.de> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Sat, 2010-06-19 at 23:07 +0200, Christoph Hellwig wrote: > First remove items from work_list as soon as we start working on them= =2E 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 f= or > tracking synchronous requests - if the caller sets the completion poi= nter > we complete it, otherwise use it as a boolean indicator that we can f= ree > the work item directly. Third unify struct wb_writeback_args and str= uct > bdi_work into a single data structure, wb_writeback_work. Previous w= e > 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. Inste= ad > of just allocate one structure dynamically or on the stack and use it > all the way through the stack. >=20 > Signed-off-by: Christoph Hellwig Christoph, thanks for simplifying this. I wonder also, why do we need the bdi_pending_list - for me it looks redundant. Also, do we need the forker task? It hurts because it wakes up every 5 sec jut to check whether it has to fork something and to waste the battery energy. Do we really need to bdi threads to kill themselves after 5 minutes of inactivity? I'm going to work on optimizing the forker per-bdi threads wake-ups. Bu= t for the forker - it seems it is better to just get rid of it completely= =2E Jens, what do you think? --=20 Best Regards, Artem Bityutskiy (=D0=90=D1=80=D1=82=D1=91=D0=BC =D0=91=D0=B8=D1=82=D1=8E= =D1=86=D0=BA=D0=B8=D0=B9) -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel= " in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html