[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <53961338.4050309@intel.com>
Date: Mon, 09 Jun 2014 13:04:08 -0700
From: Dave Hansen <dave.hansen@...el.com>
To: Naoya Horiguchi <n-horiguchi@...jp.nec.com>, linux-mm@...ck.org
CC: Andrew Morton <akpm@...ux-foundation.org>,
Hugh Dickins <hughd@...gle.com>,
"Kirill A. Shutemov" <kirill@...temov.name>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 6/7] mm/pagewalk: move pmd_trans_huge_lock() from callbacks
to common code
On 06/06/2014 03:58 PM, Naoya Horiguchi wrote:
> @@ -6723,14 +6723,9 @@ static int mem_cgroup_count_precharge_pmd(pmd_t *pmd,
> struct mm_walk *walk)
> {
> struct vm_area_struct *vma = walk->vma;
> - spinlock_t *ptl;
>
> - if (pmd_trans_huge_lock(pmd, vma, &ptl) == 1) {
> - if (get_mctgt_type_thp(vma, addr, *pmd, NULL) == MC_TARGET_PAGE)
> - mc.precharge += HPAGE_PMD_NR;
> - spin_unlock(ptl);
> - } else
> - skip->control = PTWALK_DOWN;
> + if (get_mctgt_type_thp(vma, addr, *pmd, NULL) == MC_TARGET_PAGE)
> + mc.precharge += HPAGE_PMD_NR;
> return 0;
> }
I guess my series did two things:
1. move page table walking to the walk_page_range() code
2. make new walk handler that can take arbitrarily-sizes ptes
This does (1) quite nicely and has some nice code savings. I still
think (2) has some value, and like my approach, but this is definitely a
step in the right direction.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists