Messages in this thread |  | | Date | Mon, 08 Sep 2008 11:50:23 +0800 | | From | Li Yu <> | | Subject | Re: [PATCH] VM: Implements the swap-out page-clustering technique |
| |
Hamid R. Jahanjou 写道: > From: Hamid R. Jahanjou > > Implements the idea of swap-out page clustering from *BSD for > Linux. Each time a candidate page is to be swapped out, > virtually-nearby pages are scanned to find eligible pages to be > swapped out too as a cluster. This technique increases the likelihood of > bringing in related data on a page fault and decreases swap space > fragmentation in the long run. Currently, Linux searches only > physically-nearby pages which is not optimal since, over time, physically- > adjacent pages may become unrelated. > > The code can be statically tuned. No benchmarks. I'm not sure whether > the added complexity is acceptable. > > Signed-off-by: Hamid R. Jahanjou <hamid.jahanjou@gmail.com> > [snip a lot of code here] > + > + for(vm_address = cursor_vma->vm_start; > + vm_address < cursor_vma->vm_end && ci->nr_collected < ci->cluster_size; > + vm_address += PAGE_SIZE) > + { > + cursor_page = virt_to_page(vm_address); >
I do not think that the virt_to_page() can work well on userland virtual address space. And the linear searching for whole address space of a vma is not good idea too, really.
> + if (!page_allowed_in_cluster(cursor_page, ci)) > + continue; > >
-- 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/
|  |