Re: [PATCH 17 of 66] add pmd mangling generic functions

From: Andrea Arcangeli
Date: Thu Nov 25 2010 - 12:36:34 EST


On Thu, Nov 18, 2010 at 09:32:36AM -0800, Linus Torvalds wrote:
> I dunno. Those macros are _way_ too big and heavy to be macros or
> inline functions. Why aren't pmdp_splitting_flush() etc just
> functions?

That's because ptep_clear_flush and everything else in that file named
with ptep_* and doing expensive tlb flushes was a macro.

>
> There is no performance advantage to inlining them - the TLB flush is
> going to be expensive enough that there's no point in avoiding a
> function call. And that header file really does end up being _really_
> ugly.

I agree but to me it looks like your compliant applies to the current
include/asm-generic/pgtable.h. My changes that simply mirrors closely
the style of that file to avoid altering coding style just for the new
stuff. That is compact code that I'm not even sure if anybody is
using, most certainly x86 isn't using that code so the .text bloat
isn't a practical concern.

Do you like me to do a cleanup of the asm-generic/pgtable.h and move
the tlb flushes to lib/pgtable.c? (ideally the pgtable.o file should
be empty after the preprocessor runs on x86*)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/