Re: [rfc][patch 2/3] fs: sync_sb_inodes fix

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Nov 11, 2008 at 01:25:41PM -0500, Christoph Hellwig wrote:
> 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.

Which ones? AFAIK, dynamic branch prediction happens no later than
instruction decode, and can be earlier even than instruction fetch.


> Please just don't use likely/unlikely unless really nessecary.

Sure. It isn't really necessary here.


> > 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.

Or, it will not have a relevant entry in the branch predictor, and short
forward jumps tend to default to unlikely, so it might miss every time.
Anyway... I won't argue any more :) I've gotten rid of it. 

 
> > > > +			/* 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 :))

OK.


--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux