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 15:55:31 +0300 Message-ID: <4A51F443.8070402@gmail.com> References: <1245926523-21959-1-git-send-email-jens.axboe@oracle.com> <1245926523-21959-3-git-send-email-jens.axboe@oracle.com> 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.105.134]:50471 "EHLO mgw-mx09.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753420AbZGFM4k (ORCPT ); Mon, 6 Jul 2009 08:56:40 -0400 In-Reply-To: <1245926523-21959-3-git-send-email-jens.axboe@oracle.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Jens Axboe wrote: > +/* > + * kupdated() used to do this. We cannot do it from the bdi_forker_t= ask() > + * or we risk deadlocking on ->s_umount. The longer term solution wo= uld be > + * to implement sync_supers_bdi() or similar and simply do it from t= he > + * bdi writeback tasks individually. > + */ > +static int bdi_sync_supers(void *unused) > +{ > + set_user_nice(current, 0); > + > + while (!kthread_should_stop()) { > + set_current_state(TASK_INTERRUPTIBLE); > + schedule(); > + > + /* > + * Do this periodically, like kupdated() did before. > + */ > + sync_supers(); > + } > + > + return 0; 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). 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? I've just started looking at your work, so I do not have good overall picture of what's going on, so apologies in advance if I missed something. --=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