Re: [PATCH 6/7] hugetlb: hugepage migration core

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Andi Kleen
Date: Monday, July 5, 2010 - 2:59 am

On Fri, Jul 02, 2010 at 02:47:25PM +0900, Naoya Horiguchi wrote:

Why is this a break and not a continue? Couldn't you have small and large
pages in the same list?

There's more code that handles LRU in this file. Do they all handle huge pages
correctly?

I also noticed we do not always lock all sub pages in the huge page. Now if
IO happens it will lock on subpages, not the head page. But this code
handles all subpages as a unit. Could this cause locking problems?
Perhaps it would be safer to lock all sub pages always? Or would 
need  to audit other page users to make sure they always lock on the head
and do the same here.

Hmm page reference counts may have the same issue?


I think I would prefer a proper if else over a goto here.

The lookup should probably just call a helper to make this function more readable
(like lookup_address(), unfortunately that's x86 specific right now)



Better reuse copy_huge_page() instead of open coding.


-Andi
-- 
ak@linux.intel.com -- Speaking for myself only.
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 6/7] hugetlb: hugepage migration core, Naoya Horiguchi, (Thu Jul 1, 10:47 pm)
Re: [PATCH 6/7] hugetlb: hugepage migration core, Andi Kleen, (Mon Jul 5, 2:59 am)
Re: [PATCH 6/7] hugetlb: hugepage migration core, Naoya Horiguchi, (Mon Jul 5, 8:33 pm)
Re: [PATCH 6/7] hugetlb: hugepage migration core, Andi Kleen, (Tue Jul 6, 12:13 am)
Re: [PATCH 6/7] hugetlb: hugepage migration core, Christoph Lameter, (Tue Jul 6, 9:00 am)
Re: [PATCH 6/7] hugetlb: hugepage migration core, Christoph Lameter, (Tue Jul 6, 9:02 am)
Re: [PATCH 6/7] hugetlb: hugepage migration core, Naoya Horiguchi, (Tue Jul 6, 11:05 pm)
Re: [PATCH 6/7] hugetlb: hugepage migration core, Naoya Horiguchi, (Tue Jul 6, 11:44 pm)