Re: [PATCH -mm] mm: Unify pte_to_pgoff and pgoff_to_pte helpers

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

 



* Cyrill Gorcunov <gorcunov@xxxxxxxxx> wrote:

> On Wed, Aug 14, 2013 at 01:08:56AM -0700, Andrew Morton wrote:
> > > 
> > > > Can it be written in C with types and proper variable names and such
> > > > radical stuff?
> > > 
> > > Could you elaborate? You mean inline helper or macro with type checks?
> > 
> > /*
> >  * description goes here
> >  */
> > static inline pteval_t pte_bfop(pteval_t val, int rightshift, ...)
> > {
> > 	...
> > }
> > 
> > So much better!  We really should only implement code in a macro if it
> > *has* to be done as a macro and I don't think that's the case here?
> 
> Well, I'll have to check if it really doesn't generate additional 
> instructions in generated code, since it's hotpath. I'll ping back once 
> things are done.

An __always_inline should never do that.

Thanks,

	Ingo

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