Re: [PATCH] mempool: add unlikely and likely hints

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

 




On Fri, 7 Mar 2014, David Rientjes wrote:

> On Fri, 7 Mar 2014, Mikulas Patocka wrote:
> 
> > > What observable performance benefit have you seen with this patch and 
> > > with what architecture?  Could we include some data in the changelog?
> > 
> > None - you usually don't get observable performance benefit from 
> > microoptimizations like this.
> > 
> > It may be that the cache line that the patch saves aliases some other 
> > important cache lines and then, the patch saves two cache line refills. 
> > Or, the saved cache line doesn't alias anything important and then the 
> > patch doesn't have any effect at all. It's not worth spending many days or 
> > weeks trying to recreate a situation when the code cache is used in such a 
> > way that the patch would help.
> 
> Not sure there's any benefit of merging the patch, then.

That's right, no one can be sure. The patch maybe helps and maybe has no 
effect (it can't hurt) - so there is no reason not to merge it.

If you measured the effect of microoptimizations like this, you spend 
excessive amount of time doing it and in the end you either improve 
performance a little bit or not. If you apply the patch blindly without 
measuring, you either improve performance a little bit or not. So - trying 
to prove that it helps doesn't have any positive effect at all.

If the patch could hurt performance, it would be reasonable to do some 
measurement to prove that it doesn't. But this one can't hurt.

Mikulas

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]