lkml.org 
[lkml]   [2008]   [Jul]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/1] mm: unify pmd_free() implementation
Linus Torvalds wrote:
>
> On Mon, 28 Jul 2008, Andrea Righi wrote:
>> Move multiple definitions of pmd_free() from different include/asm-* into
>> mm/util.c.
>
> But this is horrible, because it forces a totally unnecessary function
> call for that empty function.
>
> Yeah, the function will be cheap, but the call itself will not be (it's a
> C language barrier and basically disables optimizations around it, causing
> thigns like register spill/reload for no good reason).
>
> Linus

yep! clear.

Ok, in this case wouldn't be better at least to define pud_free() as:

static inline pud_free(struct mm_struct *mm, pmd_t *pmd)
{
}

in include/asm-generic/pgtable-nopmd.h, just to avoid the warning
on x86 without PAE?

Thanks for the explanation,
-Andrea


\
 
 \ /
  Last update: 2008-07-28 18:21    [W:1.306 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site