Re: [PATCH v4 3/3] memcg: avoid THP split in task migration

From: KAMEZAWA Hiroyuki
Date: Tue Mar 13 2012 - 01:49:10 EST


On Mon, 12 Mar 2012 18:30:56 -0400
Naoya Horiguchi <n-horiguchi@xxxxxxxxxxxxx> wrote:

> Currently we can't do task migration among memory cgroups without THP split,
> which means processes heavily using THP experience large overhead in task
> migration. This patch introduces the code for moving charge of THP and makes
> THP more valuable.
>
> Changes from v3:
> - use enum mc_target_type and MC_TARGET_* explicitly
> - replace lengthy name is_target_thp_for_mc() with get_mctgt_type_thp()
> - drop cond_resched()
> - drop mapcount check of page sharing (Hugh and KAMEZAWA-san are preparing
> patches to change the behavior of moving charge of shared pages, so this
> patch keeps up with the change to avoid potential conflict.)
>
> Changes from v2:
> - add move_anon() and mapcount check
>
> Changes from v1:
> - rename is_target_huge_pmd_for_mc() to is_target_thp_for_mc()
> - remove pmd_present() check (it's buggy when pmd_trans_huge(pmd) is true)
> - is_target_thp_for_mc() calls get_page() only when checks are passed
> - unlock page table lock if !mc.precharge
> - compare return value of is_target_thp_for_mc() explicitly to MC_TARGET_TYPE
> - clean up &walk->mm->page_table_lock to &vma->vm_mm->page_table_lock
> - add comment about why race with split_huge_page() does not happen
>
> Signed-off-by: Naoya Horiguchi <n-horiguchi@xxxxxxxxxxxxx>
> Acked-by: Hillf Danton <dhillf@xxxxxxxxx>

Thank you.

Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx>


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/