Re: __alloc_pages ()

From: Alexander Nyberg
Date: Mon Jun 20 2005 - 08:58:40 EST


mån 2005-06-20 klockan 17:23 +0530 skrev Parveen Verma, Noida:
> Hi,
>
> I have found that while allocating (mostly it is done) the pages in
> __alloc_pages(), after successfully allocating the page the
> zone_statistics() function is called.
>
> static void zone_statistics(struct zonelist *zonelist, struct zone *z)
> {
> #ifdef CONFIG_NUMA
> .....
> #endif
> }
> The whole body of this function is enclosed b/w #ifdef ... #endif.
> This function is called each time and does nothing if we don't have a NUMA
> machine.
> Can we put the call for this b/w #ifdef ... #endif?
> Although the gcc -O3 option does not generate a function call if the
> function body is nil.

I'd say gcc should optimize this out as is already, but now that it
doesn't, if you just make zone_statistics() inline the call will go away
with -O2

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