From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Fri, 14 Sep 2007 12:42:12 -0700 (PDT) From: Christoph Lameter Subject: Re: [PATCH 3/4] hugetlb: interleave dequeueing of huge pages In-Reply-To: <1189796638.5315.50.camel@localhost> Message-ID: References: <20070906182134.GA7779@us.ibm.com> <20070906182430.GB7779@us.ibm.com> <20070906182704.GC7779@us.ibm.com> <1189796638.5315.50.camel@localhost> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mm@kvack.org Return-Path: To: Lee Schermerhorn Cc: Nishanth Aravamudan , wli@holomorphy.com, agl@us.ibm.com, linux-mm@kvack.org List-ID: On Fri, 14 Sep 2007, Lee Schermerhorn wrote: > On Fri, 2007-09-14 at 11:54 -0700, Christoph Lameter wrote: > > On Thu, 6 Sep 2007, Nishanth Aravamudan wrote: > > > > > +static struct page *dequeue_huge_page(void) > > > +{ > > > + static int nid = -1; > > > + struct page *page = NULL; > > > + int start_nid; > > > + int next_nid; > > > + > > > + if (nid < 0) > > > + nid = first_node(node_states[N_HIGH_MEMORY]); > > > + start_nid = nid; > > > > nid is -1 so the tests are useless. > > > start_nid is a [private] static variable. It is initialized to -1 at > boot, and thereafter loops around nodes on each call, as huge pages are > allocated. It is only == -1 on the very first call to this function. I > think it has worked like this since hugetlbfs was added. Ahh not start_nid but nid is a static variable that is initialized to -1. Could we move that out of dequeue_huge_page? Its confusing. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org