X-Spam-Checker-Version: SpamAssassin 3.4.0-r929098 (2010-03-30) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham version=3.4.0-r929098 Received: from cuda.sgi.com (cuda1.sgi.com [192.48.157.11]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id q2ODmD6I029250 for ; Sat, 24 Mar 2012 08:48:14 -0500 X-ASG-Debug-ID: 1332596892-04bdf04aa045dc10001-NocioJ Received: from bombadil.infradead.org (173-166-109-252-newengland.hfc.comcastbusiness.net [173.166.109.252]) by cuda.sgi.com with ESMTP id eAKMlAK44vfjfZeQ (version=TLSv1 cipher=AES256-SHA bits=256 verify=NO) for ; Sat, 24 Mar 2012 06:48:12 -0700 (PDT) X-Barracuda-Envelope-From: BATV+ad309bf9b63c677c6a53+3135+infradead.org+hch@bombadil.srs.infradead.org X-Barracuda-Apparent-Source-IP: 173.166.109.252 Received: from hch by bombadil.infradead.org with local (Exim 4.76 #1 (Red Hat Linux)) id 1SBRKF-0001Dh-OH; Sat, 24 Mar 2012 13:48:11 +0000 Date: Sat, 24 Mar 2012 09:48:11 -0400 From: Christoph Hellwig To: Dave Chinner Cc: Christoph Hellwig , xfs@oss.sgi.com Subject: Re: [PATCH 3/4] xfs: allow assigning the tail lsn with the AIL lock held Message-ID: <20120324134811.GB4674@infradead.org> X-ASG-Orig-Subj: Re: [PATCH 3/4] xfs: allow assigning the tail lsn with the AIL lock held References: <20120316175541.258282540@bombadil.infradead.org> <20120316175636.373605151@bombadil.infradead.org> <20120321232956.GA5091@dastard> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120321232956.GA5091@dastard> User-Agent: Mutt/1.5.21 (2010-09-15) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html X-Barracuda-Connect: 173-166-109-252-newengland.hfc.comcastbusiness.net[173.166.109.252] X-Barracuda-Start-Time: 1332596892 X-Barracuda-Encrypted: AES256-SHA X-Barracuda-URL: http://192.48.157.11:80/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at sgi.com X-Barracuda-Spam-Score: 0.10 X-Barracuda-Spam-Status: No, SCORE=0.10 using per-user scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=1.3 tests=RDNS_DYNAMIC X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.92112 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.10 RDNS_DYNAMIC Delivered to trusted network by host with dynamic-looking rDNS On Thu, Mar 22, 2012 at 10:29:56AM +1100, Dave Chinner wrote: > On Fri, Mar 16, 2012 at 01:55:44PM -0400, Christoph Hellwig wrote: > > Provide a variant of xlog_assign_tail_lsn that has the AIL lock already > > held. By doing so we do an additional atomic_read + atomic_set under > > the lock, which comes down to two instructions. > > > > Switch xfs_trans_ail_update_bulk and xfs_trans_ail_delete_bulk to the > > new version to reduce the number of lock roundtrips, and prepare for > > a new addition that would require a third lock roundtrip in > > xfs_trans_ail_delete_bulk. > > What new addition is that? I don't see it in this patchset (maybe > I'm just blind), so maybe this isn't necessary in the commit > message? The check for an empty AIL before waking up thread thread waiting for it. I'll add it to the commit log.