Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S268331AbUJDCdJ (ORCPT ); Sun, 3 Oct 2004 22:33:09 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S268334AbUJDCdJ (ORCPT ); Sun, 3 Oct 2004 22:33:09 -0400 Received: from fgwmail5.fujitsu.co.jp ([192.51.44.35]:1690 "EHLO fgwmail5.fujitsu.co.jp") by vger.kernel.org with ESMTP id S268331AbUJDCdD (ORCPT ); Sun, 3 Oct 2004 22:33:03 -0400 Date: Mon, 04 Oct 2004 11:38:32 +0900 From: Hiroyuki KAMEZAWA Subject: Re: [RFC] memory defragmentation to satisfy high order allocations In-reply-to: <20041001182221.GA3191@logos.cnet> To: Marcelo Tosatti Cc: linux-mm@kvack.org, akpm@osdl.org, Nick Piggin , arjanv@redhat.com, linux-kernel@vger.kernel.org Message-id: <4160B7A8.7010607@jp.fujitsu.com> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii; format=flowed Content-transfer-encoding: 7bit X-Accept-Language: en-us, en User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6) Gecko/20040113 References: <20041001182221.GA3191@logos.cnet> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1299 Lines: 56 how about inserting this if-sentense ? -- Kame Marcelo Tosatti wrote: > +int coalesce_memory(unsigned int order, struct zone *zone) > +{ > + while (entry != &area->free_list) { > + int ret; > + page = list_entry(entry, struct page, lru); > + entry = entry->next; > + + if (((page_to_pfn(page) - zone->zone_start_pfn) & (1 << toorder)) { > + pwalk = page; > + > + /* Look backwards */ > + > + for (walkcount = 1; walkcount + } > + + } else { > +forward: > + > + pwalk = page; > + > + /* Look forward, skipping the page frames from this > + high order page we are looking at */ > + > + for (walkcount = (1UL << torder); walkcount + walkcount++) { > + pwalk = page+walkcount; > + > + ret = can_move_page(pwalk); > + > + if (ret) > + nr_freed_pages++; > + else > + goto loopey; > + > + if (nr_freed_pages == nr_pages) > + goto success; > + } > + + } - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/