From mboxrd@z Thu Jan 1 00:00:00 1970 From: Artem Bityutskiy Subject: Re: [PATCH, RFC] simplify writeback thread creation Date: Thu, 08 Jul 2010 18:23:52 +0300 Message-ID: <1278602632.9953.4.camel@localhost> References: <20100707225242.GA28802@lst.de> <4C35C292.9020507@kernel.dk> <1278598877.20321.34.camel@localhost> <4C35E7D5.8020809@kernel.dk> Reply-To: dedekind1@gmail.com Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Christoph Hellwig , linux-fsdevel@vger.kernel.org To: Jens Axboe Return-path: Received: from smtp.nokia.com ([192.100.122.233]:42703 "EHLO mgw-mx06.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753969Ab0GHP2J (ORCPT ); Thu, 8 Jul 2010 11:28:09 -0400 In-Reply-To: <4C35E7D5.8020809@kernel.dk> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Thu, 2010-07-08 at 16:59 +0200, Jens Axboe wrote: > > How about not starting any thread at all at the bdi registration ti= me, > > and start a bdi thread only when something for this bdi becomes dir= ty > > (__mark_inode_dirty()) or a bdi work is queued (bdi_queue_work())? = If we > > do this, then the tasks can also die by the 5min timeout, and will = be > > forked again when dirt/bdi works arrives? > >=20 > > I guess it is a bit challenging to start a task in __mark_inode_dir= ty(), > > whis is supposed to be fast and non-sleeping, but we can just submi= t a > > work which will start the task. >=20 > That work would have to reside on the stack, and __mark_inode_dirty() > block on the thread startup. We can't always do that. We can have a pre-defined bdi->wb->task_start_work or something like that. --=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