From: Christoph Hellwig Subject: Re: [rfc][patch 2/3] fs: sync_sb_inodes fix Date: Tue, 11 Nov 2008 13:25:41 -0500 Message-ID: <20081111182541.GD25049@infradead.org> References: <20081110132205.GA7183@wotan.suse.de> <20081110132308.GC7183@wotan.suse.de> <20081110134133.GA7425@infradead.org> <20081110151047.GA16924@wotan.suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Christoph Hellwig , linux-fsdevel@vger.kernel.org, Andrew Morton To: Nick Piggin Return-path: Received: from bombadil.infradead.org ([18.85.46.34]:34586 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752192AbYKKSZm (ORCPT ); Tue, 11 Nov 2008 13:25:42 -0500 Content-Disposition: inline In-Reply-To: <20081110151047.GA16924@wotan.suse.de> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Mon, Nov 10, 2008 at 04:10:47PM +0100, Nick Piggin wrote: > Static branch hint instruction could indeed turn off dynamic prediction > so in that cause it would always mispredict even if the workload was > continually going the other way. It's not just turning them off. In many cpu microarchitectures a wrong static prediction means an pipeline stall that's much worse than a dynamic mispredict because that information is interpreted much deeper in the pipeline. Please just don't use likely/unlikely unless really nessecary. > However, I think you have to consider frequency, and also relative > importance of each case. This is going to be taken on sys_sync, and > sys_umount. And not taken for pdflush writeout. Yes. So dynamic branch prediction will get this perfectly right on any reasonable CPU. > > > + /* see dquot.c comment */ > > > > Not an exactly useful comment :) > > /* see fs/dquot.c:add_dquot_ref() comment */ ? > > Thanks, I will repost with these changes after waiting for more feedback. Please just copy the comment over. Looking somewhere else to follow a comment is not very nice (and this is the more important file compared to dquot.c anyway :))