From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from d03relay04.boulder.ibm.com (d03relay04.boulder.ibm.com [9.17.195.106]) by e31.co.us.ibm.com (8.13.8/8.13.8) with ESMTP id l8ONNmBP008610 for ; Mon, 24 Sep 2007 19:23:48 -0400 Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by d03relay04.boulder.ibm.com (8.13.8/8.13.8/NCO v8.5) with ESMTP id l8ONNmbE421004 for ; Mon, 24 Sep 2007 17:23:48 -0600 Received: from d03av02.boulder.ibm.com (loopback [127.0.0.1]) by d03av02.boulder.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id l8ONNlOt029203 for ; Mon, 24 Sep 2007 17:23:48 -0600 Date: Mon, 24 Sep 2007 16:23:46 -0700 From: Nishanth Aravamudan Subject: Re: [PATCH 3/4] hugetlb: interleave dequeueing of huge pages Message-ID: <20070924232346.GE26104@us.ibm.com> References: <20070906182134.GA7779@us.ibm.com> <20070906182430.GB7779@us.ibm.com> <20070906182704.GC7779@us.ibm.com> <1189796638.5315.50.camel@localhost> <1189800591.5315.69.camel@localhost> <1189801980.5315.87.camel@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1189801980.5315.87.camel@localhost> Sender: owner-linux-mm@kvack.org Return-Path: To: Lee Schermerhorn Cc: Christoph Lameter , wli@holomorphy.com, agl@us.ibm.com, linux-mm@kvack.org List-ID: On 14.09.2007 [16:33:00 -0400], Lee Schermerhorn wrote: > On Fri, 2007-09-14 at 13:16 -0700, Christoph Lameter wrote: > > On Fri, 14 Sep 2007, Lee Schermerhorn wrote: > > > > > Yeah, I mistyped... But, nid IS private to that function. This is a > > > valid use of static. But, perhaps it could use a comment to call > > > attention to it. > > > > I think its best to move nis outside of the function and give it a longer > > name that is distinctive from names we use for local variables. F.e. > > > > last_allocated_node > > > > ? > > I do like to see variables' [and functions'] visibility kept within > the minimum necessary scope, and moving it outside of the function > violates this. Nothing else in the source file needs it. But, If > Nish agrees, I guess I don't feel that strongly about it. I like the > suggested name, tho' I've changed the name, but I don't see how moving the scope helps. I guess I could it make it globally static -- as opposed to local to the function -- and then it would be easier to dequeue based upon the global's value (something Lee asked for earlier). However, that would require locking to avoid races between two processes both echo'ing values into the sysctl? I guess it's not a serious race with the sanity check that Andrew has in there, it just means sometimes a node might get skipped in the interleaving... Thanks, Nish -- Nishanth Aravamudan IBM Linux Technology Center -- 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