lkml.org 
[lkml]   [2013]   [Mar]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] mm: speedup in __early_pfn_to_nid
On Thu, 21 Mar 2013, Ingo Molnar wrote:

> > Index: linux/mm/page_alloc.c
> > ===================================================================
> > --- linux.orig/mm/page_alloc.c 2013-03-18 10:52:11.510988843 -0500
> > +++ linux/mm/page_alloc.c 2013-03-18 10:52:14.214931348 -0500
> > @@ -4161,10 +4161,19 @@ int __meminit __early_pfn_to_nid(unsigne
> > {
> > unsigned long start_pfn, end_pfn;
> > int i, nid;
> > + static unsigned long last_start_pfn, last_end_pfn;
> > + static int last_nid;
>
> Please move these globals out of function local scope, to make it more
> apparent that they are not on-stack. I only noticed it in the second pass.
>

The way they're currently defined places these in meminit.data as
appropriate; if they are moved out, please make sure to annotate their
definitions with __meminitdata.


\
 
 \ /
  Last update: 2013-03-21 20:21    [W:0.112 / U:1.420 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site