From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx185.postini.com [74.125.245.185]) by kanga.kvack.org (Postfix) with SMTP id 0BAB56B0031 for ; Fri, 12 Jul 2013 23:08:56 -0400 (EDT) Received: by mail-ie0-f169.google.com with SMTP id 10so21999640ied.14 for ; Fri, 12 Jul 2013 20:08:56 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20130712074558.GP18798@sgi.com> References: <1373594635-131067-1-git-send-email-holt@sgi.com> <1373594635-131067-3-git-send-email-holt@sgi.com> <20130712074558.GP18798@sgi.com> Date: Fri, 12 Jul 2013 20:08:56 -0700 Message-ID: Subject: Re: [RFC 2/4] Have __free_pages_memory() free in larger chunks. From: Yinghai Lu Content-Type: text/plain; charset=ISO-8859-1 Sender: owner-linux-mm@kvack.org List-ID: To: Robin Holt Cc: "H. Peter Anvin" , Ingo Molnar , Nate Zimmer , Linux Kernel , Linux MM , Rob Landley , Mike Travis , Daniel J Blueman , Andrew Morton , Greg KH , Mel Gorman On Fri, Jul 12, 2013 at 12:45 AM, Robin Holt wrote: > At the very least, I think we could change to: > static void __init __free_pages_memory(unsigned long start, unsigned long end) > { > int order; > > while (start < end) { > order = ffs(start); > > while (start + (1UL << order) > end) > order--; > > __free_pages_bootmem(start, order); > > start += (1UL << order); > } > } should work, but need to make sure order < MAX_ORDER. Yinghai -- 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