mm, thp: remove infrastructure for handling splitting PMDs
With new refcounting we don't need to mark PMDs splitting. Let's drop code to handle this. Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Tested-by: Sasha Levin <sasha.levin@oracle.com> Tested-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Acked-by: Vlastimil Babka <vbabka@suse.cz> Acked-by: Jerome Marchand <jmarchan@redhat.com> Cc: Andrea Arcangeli <aarcange@redhat.com> Cc: Hugh Dickins <hughd@google.com> Cc: Dave Hansen <dave.hansen@intel.com> Cc: Mel Gorman <mgorman@suse.de> Cc: Rik van Riel <riel@redhat.com> Cc: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com> Cc: Steve Capper <steve.capper@linaro.org> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Michal Hocko <mhocko@suse.cz> Cc: Christoph Lameter <cl@linux.com> Cc: David Rientjes <rientjes@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:

committed by
Linus Torvalds

parent
1f19617d77
commit
4b471e8898
@@ -4675,7 +4675,7 @@ static int mem_cgroup_count_precharge_pte_range(pmd_t *pmd,
|
||||
pte_t *pte;
|
||||
spinlock_t *ptl;
|
||||
|
||||
if (pmd_trans_huge_lock(pmd, vma, &ptl) == 1) {
|
||||
if (pmd_trans_huge_lock(pmd, vma, &ptl)) {
|
||||
if (get_mctgt_type_thp(vma, addr, *pmd, NULL) == MC_TARGET_PAGE)
|
||||
mc.precharge += HPAGE_PMD_NR;
|
||||
spin_unlock(ptl);
|
||||
@@ -4863,16 +4863,7 @@ static int mem_cgroup_move_charge_pte_range(pmd_t *pmd,
|
||||
union mc_target target;
|
||||
struct page *page;
|
||||
|
||||
/*
|
||||
* No race with splitting thp happens because:
|
||||
* - if pmd_trans_huge_lock() returns 1, the relevant thp is not
|
||||
* under splitting, which means there's no concurrent thp split,
|
||||
* - if another thread runs into split_huge_page() just after we
|
||||
* entered this if-block, the thread must wait for page table lock
|
||||
* to be unlocked in __split_huge_page_splitting(), where the main
|
||||
* part of thp split is not executed yet.
|
||||
*/
|
||||
if (pmd_trans_huge_lock(pmd, vma, &ptl) == 1) {
|
||||
if (pmd_trans_huge_lock(pmd, vma, &ptl)) {
|
||||
if (mc.precharge < HPAGE_PMD_NR) {
|
||||
spin_unlock(ptl);
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user