lkml.org 
[lkml]   [2013]   [Aug]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH -mm] mm: Unify pte_to_pgoff and pgoff_to_pte helpers

* Cyrill Gorcunov <gorcunov@gmail.com> 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


\
 
 \ /
  Last update: 2013-08-14 13:01    [W:2.730 / U:1.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site