From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail138.messagelabs.com (mail138.messagelabs.com [216.82.249.35]) by kanga.kvack.org (Postfix) with ESMTP id CBFAC6B0087 for ; Wed, 22 Dec 2010 20:14:27 -0500 (EST) Received: from kpbe13.cbf.corp.google.com (kpbe13.cbf.corp.google.com [172.25.105.77]) by smtp-out.google.com with ESMTP id oBN1EN5Z025038 for ; Wed, 22 Dec 2010 17:14:23 -0800 Received: from pvc30 (pvc30.prod.google.com [10.241.209.158]) by kpbe13.cbf.corp.google.com with ESMTP id oBN1DoBo027686 for ; Wed, 22 Dec 2010 17:14:22 -0800 Received: by pvc30 with SMTP id 30so1276894pvc.14 for ; Wed, 22 Dec 2010 17:14:17 -0800 (PST) Date: Wed, 22 Dec 2010 17:14:13 -0800 (PST) From: David Rientjes Subject: Re: [2/7, v9] NUMA Hotplug Emulator: Add numa=possible option In-Reply-To: <20101222162717.289cfe01.akpm@linux-foundation.org> Message-ID: References: <20101210073119.156388875@intel.com> <20101210073242.357094158@intel.com> <20101222162717.289cfe01.akpm@linux-foundation.org> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="531368966-1419668146-1293066855=:26427" Sender: owner-linux-mm@kvack.org To: Andrew Morton Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Haicheng Li , lethal@linux-sh.org, Andi Kleen , shaohui.zheng@linux.intel.com, dave@linux.vnet.ibm.com, Greg KH List-ID: This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --531368966-1419668146-1293066855=:26427 Content-Type: TEXT/PLAIN; charset=UTF-8 Content-Transfer-Encoding: 8BIT On Wed, 22 Dec 2010, Andrew Morton wrote: > > @@ -646,6 +647,15 @@ void __init initmem_init(unsigned long start_pfn, unsigned long last_pfn, > > numa_set_node(i, 0); > > memblock_x86_register_active_regions(0, start_pfn, last_pfn); > > setup_node_bootmem(0, start_pfn << PAGE_SHIFT, last_pfn << PAGE_SHIFT); > > +out: __maybe_unused > > hm, I didn't know you could do that with labels. > > Does it work? > Yeah, it's equivalent to __attribute__((unused)) and according to the gcc manual section 6.30: In GNU C, an attribute specifier list may appear after the colon following a label, other than a case or default label. The only attribute it makes sense to use after a label is unused. This feature is intended for code generated by programs which contains labels that may be unused but which is compiled with a??-Walla??. It would not normally be appropriate to use in it human-written code, though it could be useful in cases where the code that jumps to the label is contained within an #ifdef conditional. I used it because I knew I wouldn't get away with putting a label inside an #ifdef :) > > + for (i = 0; i < numa_possible_nodes; i++) { > > + int nid; > > + > > + nid = first_unset_node(node_possible_map); > > + if (nid == MAX_NUMNODES) > > + break; > > + node_set(nid, node_possible_map); > > + } > > } > > > > unsigned long __init numa_free_all_bootmem(void) --531368966-1419668146-1293066855=:26427-- -- 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/ . Fight unfair telecom policy in Canada: sign http://dissolvethecrtc.ca/ Don't email: email@kvack.org