Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759142Ab0GVJAk (ORCPT ); Thu, 22 Jul 2010 05:00:40 -0400 Received: from bombadil.infradead.org ([18.85.46.34]:41012 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754649Ab0GVJAh (ORCPT ); Thu, 22 Jul 2010 05:00:37 -0400 Date: Thu, 22 Jul 2010 05:00:23 -0400 From: Christoph Hellwig To: Dave Chinner Cc: Artem Bityutskiy , Dave Chinner , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Jens Axboe Subject: Re: [PATCHv2 11/11] writeback: prevent unnecessary bdi threads wakeups Message-ID: <20100722090023.GA7692@infradead.org> References: <1279704706-1267-1-git-send-email-dedekind1@gmail.com> <1279704706-1267-12-git-send-email-dedekind1@gmail.com> <1279712741.2306.36.camel@localhost> <20100722004155.GZ32635@dastard> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100722004155.GZ32635@dastard> User-Agent: Mutt/1.5.20 (2009-08-17) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 948 Lines: 30 On Thu, Jul 22, 2010 at 10:41:55AM +1000, Dave Chinner wrote: > if (wakeup_bdi) { > trace_writeback_wakeup(bdi) > spin_lock(&bdi->wb_lock); > if (!bdi->wb.task) {{ > trace_writeback_wakeup_nothread(bdi); > wake_up_process(default_backing_dev_info.wb.task); > } else > wake_up_process(bdi->wb.task); > spin_unlock(&bdi->wb_lock); That gives us duplicate traces for the first case, what about: if (wakeup_bdi) { spin_lock(&bdi->wb_lock); if (bdi->wb.task) { trace_writeback_wake_thread(bdi); wake_up_process(bdi->wb.task); } else { trace_writeback_wake_forker_thread(bdi); wake_up_process(default_backing_dev_info.wb.task); } spin_unlock(&bdi->wb_lock); } -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/