From mboxrd@z Thu Jan 1 00:00:00 1970 From: Artem Bityutskiy Subject: Re: [PATCH 02/10] writeback: switch to per-bdi threads for flushing data Date: Mon, 06 Jul 2009 16:26:28 +0300 Message-ID: <4A51FB84.3020400@gmail.com> References: <1245926523-21959-1-git-send-email-jens.axboe@oracle.com> <1245926523-21959-3-git-send-email-jens.axboe@oracle.com> <4A51F443.8070402@gmail.com> <20090706131313.GR23611@kernel.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, chris.mason@oracle.com, david@fromorbit.com, hch@infradead.org, akpm@linux-foundation.org, jack@suse.cz, yanmin_zhang@linux.intel.com, richard@rsk.demon.co.uk, damien.wyart@free.fr, fweisbec@gmail.com, Alan.Brunelle@hp.com To: Jens Axboe Return-path: Received: from smtp.nokia.com ([192.100.122.230]:51555 "EHLO mgw-mx03.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753245AbZGFN1d (ORCPT ); Mon, 6 Jul 2009 09:27:33 -0400 In-Reply-To: <20090706131313.GR23611@kernel.dk> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Jens Axboe wrote: >> ATM we have one timer for both data and super-block synchronization. >> With per-bdi write-back we have: >> >> 1. one timer for super blocks >> 2. many per-bdi timers for data (schedule_timeout() is essentially >> using timers). >=20 > That is correct. Note that these exit when they have been idle for a > while, for embedded and such you could make it more aggressive by > exiting quicker. The sync_supers should be directly fixable by your > sb_dirty() stuff. >=20 > So I don't think it's a huge change from what we currently have. >=20 >> This is not nice, because each timer is an additional source of >> power-savings killers. I mean, it is more power management (PM) >> friendly to have less timers and disturb CPU less, make CPU wake >> up from retention less frequently. >> >> I do not challange the per-bdi idea at all, but is it possible to >> think about a more PM-friendly desing and have one source of >> periodic write-back, not many. I mean, could there be one timer >> which periodically syncs supers and wakes up the BDI write-back >> tasks? >=20 > You could replace the schedule_timeout() by a schedule(), and instead > have a single timer running that would scan the bdi_list and issue th= e > kupdated() timed writeback that is the reason it uses schedule_timeou= t() > now. Explicitly issued work will manually wake up the per-bdi thread(= s). > That single timer could easily handle waking up bdi_sync_supers() as > well. Right. May be the way you decomposed stuff will actually make it easier to to optimize periodic write-back and teach it not to wake up if there is no dirt. And we could as well use rang hrtimers to optimize events grouping. I'll keep looking at this. --=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