From mboxrd@z Thu Jan 1 00:00:00 1970 From: Artem Bityutskiy Subject: Re: [RFC][PATCH 10/16] writeback: simplify bdi code a little Date: Tue, 20 Jul 2010 13:34:40 +0300 Message-ID: <1279622080.16462.106.camel@localhost> References: <1279284312-2411-1-git-send-email-dedekind1@gmail.com> <1279284312-2411-11-git-send-email-dedekind1@gmail.com> <20100718065613.GI23811@infradead.org> Reply-To: dedekind1@gmail.com Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Jens Axboe , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org To: Christoph Hellwig Return-path: Received: from smtp.nokia.com ([192.100.122.233]:52886 "EHLO mgw-mx06.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752894Ab0GTKlP (ORCPT ); Tue, 20 Jul 2010 06:41:15 -0400 In-Reply-To: <20100718065613.GI23811@infradead.org> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Sun, 2010-07-18 at 02:56 -0400, Christoph Hellwig wrote: > Looks correct, but I would do this slightly different. Add a new > bdi_writeback_start_thread helper, and then call it from the list > walk as long as there are bdis that need a thread. Only break > out of the loop once nothing needs to be done and then sleep. Well, in order to have small and reviewable patches, I'd like to keep m= y path as it is. Indeed, my patch now does one simple thing - removes the 'pending_list' variable, and then some other stuff as a result. I can do what you suggest on top then, but I do not really see the elegance of what you suggest: to start the thread, we have to drop the 'bdi_lock', which means we would then have to re-start list walking fro= m the beginning, which is not nicer than what we have now. --=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