From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Zijlstra Subject: Re: [PATCH 20/45] NFS: introduce writeback wait queue Date: Wed, 07 Oct 2009 11:15:36 +0200 Message-ID: <1254906936.26976.227.camel@twins> References: <20091007073818.318088777@intel.com> <20091007074903.749770316@intel.com> <1254905600.26976.218.camel@twins> <20091007090722.GA5646@localhost> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Cc: Andrew Morton , Theodore Tso , Christoph Hellwig , Dave Chinner , Chris Mason , "Li, Shaohua" , Myklebust Trond , "jens.axboe@oracle.com" , Jan Kara , Nick Piggin , "linux-fsdevel@vger.kernel.org" To: Wu Fengguang Return-path: Received: from viefep14-int.chello.at ([62.179.121.34]:60247 "EHLO viefep14-int.chello.at" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750725AbZJGJMs (ORCPT ); Wed, 7 Oct 2009 05:12:48 -0400 In-Reply-To: <20091007090722.GA5646@localhost> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Wed, 2009-10-07 at 17:07 +0800, Wu Fengguang wrote: > > > wakeup implies a full memory barrier. > > If so, this smp_mb__after_clear_bit() line is also not necessary? > > void clear_bdi_congested(struct backing_dev_info *bdi, int sync) > { > //... > clear_bit(bit, &bdi->state); > smp_mb__after_clear_bit(); > if (waitqueue_active(wqh)) > wake_up(wqh); Depends on if the barrier is needed even when the wakeup doesn't happen I guess ;-)