mm-hugetlb-convert-hugetlbfs-to-use-split-pmd-lock.patch removed from -mm tree
Subsystems (8)
[email protected]
maintainerSubject: [merged] mm-hugetlb-convert-hugetlbfs-to-use-split-pmd-lock.patch removed from -mm tree
To: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected]
From: [email protected]
Date: Fri, 15 Nov 2013 12:07:31 -0800
The patch titled
Subject: mm, hugetlb: convert hugetlbfs to use split pmd lock
has been removed from the -mm tree. Its filename was
mm-hugetlb-convert-hugetlbfs-to-use-split-pmd-lock.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: "Kirill A. Shutemov" <[email protected]>
Subject: mm, hugetlb: convert hugetlbfs to use split pmd lock
Hugetlb supports multiple page sizes. We use split lock only for PMD level, but not for PUD.
---
fs/proc/meminfo.c | 2 include/linux/hugetlb.h | 26 ++++++++ include/linux/swapops.h | 7 +- mm/hugetlb.c | 110 ++++++++++++++++++++++---------------- mm/mempolicy.c | 5 + mm/migrate.c | 7 +- mm/rmap.c | 2 7 files changed, 105 insertions(+), 54 deletions(-)
fs/proc/meminfo.c renamed from fs/proc/meminfo.c~mm-hugetlb-convert-hugetlbfs-to-use-split-pmd-lock +1 -1
@@ -1,8 +1,8 @@#include <linux/fs.h> -#include <linux/hugetlb.h> #include <linux/init.h> #include <linux/kernel.h> #include <linux/mm.h> +#include <linux/hugetlb.h> #include <linux/mman.h> #include <linux/mmzone.h> #include <linux/proc_fs.h>
include/linux/hugetlb.h renamed from include/linux/hugetlb.h~mm-hugetlb-convert-hugetlbfs-to-use-split-pmd-lock +26 -0
@@ -392,6 +392,15 @@ static inline int hugepage_migration_supreturn pmd_huge_support () && (huge_page_shift (h) ==PMD_SHIFT ); } +static inline spinlock_t *huge_pte_lockptr (struct hstate *h, +struct mm_struct *mm,pte_t *pte) +{ +if (huge_page_size (h) ==PMD_SIZE ) +return pmd_lockptr (mm, (pmd_t *) pte); +VM_BUG_ON (huge_page_size (h) ==PAGE_SIZE ); +return &mm->page_table_lock; +} +#else /* CONFIG_HUGETLB_PAGE */ struct hstate {};#define alloc_huge_page_node (h, nid) NULL
@@ -401,6 +410,7 @@ struct hstate {};#define hstate_sizelog (s) NULL#define hstate_vma (v) NULL#define hstate_inode (i) NULL +#define page_hstate (page) NULL#define huge_page_size (h) PAGE_SIZE#define huge_page_mask (h) PAGE_MASK#define vma_kernel_pagesize (v) PAGE_SIZE
@@ -421,6 +431,22 @@ static inline pgoff_t basepage_index(str#define dissolve_free_huge_pages (s, e) do {} while (0)#define pmd_huge_support () 0#define hugepage_migration_support (h) 0 + +static inline spinlock_t *huge_pte_lockptr (struct hstate *h, +struct mm_struct *mm,pte_t *pte) +{ +return &mm->page_table_lock; +}#endif /* CONFIG_HUGETLB_PAGE */ +static inline spinlock_t *huge_pte_lock (struct hstate *h, +struct mm_struct *mm,pte_t *pte) +{ +spinlock_t *ptl; + + ptl =huge_pte_lockptr (h, mm, pte); +spin_lock (ptl); +return ptl; +} +#endif /* _LINUX_HUGETLB_H */
include/linux/swapops.h renamed from include/linux/swapops.h~mm-hugetlb-convert-hugetlbfs-to-use-split-pmd-lock +4 -3
@@ -139,7 +139,8 @@ static inline void make_migration_entry_extern void migration_entry_wait (struct mm_struct *mm,pmd_t *pmd,unsigned long address); -extern void migration_entry_wait_huge (struct mm_struct *mm,pte_t *pte); +extern void migration_entry_wait_huge (struct vm_area_struct *vma, +struct mm_struct *mm,pte_t *pte);#else #define make_migration_entry (page, write) swp_entry(0, 0)
@@ -151,8 +152,8 @@ static inline int is_migration_entry(swpstatic inline void make_migration_entry_read (swp_entry_t *entryp) { }static inline void migration_entry_wait (struct mm_struct *mm,pmd_t *pmd,unsigned long address) { } -static inline void migration_entry_wait_huge (struct mm_struct *mm, -pte_t *pte) { } +static inline void migration_entry_wait_huge (struct vm_area_struct *vma, +struct mm_struct *mm,pte_t *pte) { }static inline int is_write_migration_entry (swp_entry_t entry) {return 0 ;
mm/hugetlb.c renamed from mm/hugetlb.c~mm-hugetlb-convert-hugetlbfs-to-use-split-pmd-lock +66 -44
359 lines not on this page · raw message
mm/mempolicy.c renamed from mm/mempolicy.c~mm-hugetlb-convert-hugetlbfs-to-use-split-pmd-lock +3 -2
@@ -525,8 +525,9 @@ static void queue_pages_hugetlb_pmd_rang#ifdef CONFIG_HUGETLB_PAGE int nid;struct page *page; +spinlock_t *ptl; -spin_lock (&vma->vm_mm->page_table_lock); + ptl =huge_pte_lock (hstate_vma (vma), vma->vm_mm, (pte_t *)pmd); page =pte_page (huge_ptep_get ((pte_t *)pmd)); nid =page_to_nid (page);if (node_isset (nid, *nodes) == !!(flags &MPOL_MF_INVERT ))
@@ -536,7 +537,7 @@ static void queue_pages_hugetlb_pmd_rang (flags & MPOL_MF_MOVE && page_mapcount(page) == 1))isolate_huge_page (page, private); unlock: -spin_unlock (&vma->vm_mm->page_table_lock); +spin_unlock (ptl);#else BUG ();#endif
mm/migrate.c renamed from mm/migrate.c~mm-hugetlb-convert-hugetlbfs-to-use-split-pmd-lock +4 -3
@@ -130,7 +130,7 @@ static int remove_migration_pte(struct p ptep =huge_pte_offset (mm, addr);if (!ptep) goto out; - ptl = &mm->page_table_lock; + ptl =huge_pte_lockptr (hstate_vma (vma), mm, ptep); }else { pmd =mm_find_pmd (mm, addr);if (!pmd)
@@ -249,9 +249,10 @@ void migration_entry_wait(struct mm_stru__migration_entry_wait (mm, ptep, ptl); } -void migration_entry_wait_huge (struct mm_struct *mm,pte_t *pte) +void migration_entry_wait_huge (struct vm_area_struct *vma, +struct mm_struct *mm,pte_t *pte) { -spinlock_t *ptl = &(mm)->page_table_lock; +spinlock_t *ptl =huge_pte_lockptr (hstate_vma (vma), mm, pte);__migration_entry_wait (mm, pte, ptl); }
mm/rmap.c renamed from mm/rmap.c~mm-hugetlb-convert-hugetlbfs-to-use-split-pmd-lock +1 -1
@@ -601,7 +601,7 @@ pte_t *__page_check_address(struct pageif (unlikely (PageHuge (page))) { pte =huge_pte_offset (mm, address); - ptl = &mm->page_table_lock; + ptl =huge_pte_lockptr (page_hstate (page), mm, pte); goto check; }
_
Patches currently in -mm which might be from [email protected] are
origin.patch x86-mm-get-aslr-work-for-hugetlb-mappings.patch mm-drop-actor-argument-of-do_generic_file_read-fix.patch