lkml.org 
[lkml]   [2005]   [Jun]   [21]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
From"Parveen Verma, Noida" <>
SubjectRE: __alloc_pages ()
DateTue, 21 Jun 2005 10:54:00 +0530
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

I checked with gcc 4.0.0 in FC4, the gcc optimizes it without making inline
and with -O1 option too.

Now the main point is how can we incorporate this change in main Linux
kernel.

-- 
Praveen Verma
(Hare Rama Hare Krishna)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-06-21 05:40    [W:2.391 / U:0.130 seconds]
©2003-2008 Jasper Spaans