Messages in this thread |  | | | Date | Mon, 04 Oct 2004 11:38:32 +0900 | | From | Hiroyuki KAMEZAWA <> | | Subject | Re: [RFC] memory defragmentation to satisfy high order allocations |
| |
how about inserting this if-sentense ?
-- Kame
Marcelo Tosatti wrote: > +int coalesce_memory(unsigned int order, struct zone *zone) > +{ <snip>
> + 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<nr_pages; 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<nr_pages; > + 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/
|  |