search for: pte_offset_map_lock

Displaying 20 results from an estimated 23 matches for "pte_offset_map_lock".

2007 Apr 18
0
[PATCH 3/9] 00mm3 lazy mmu mode hooks.patch
...progress += 8; } while (dst_pte++, src_pte++, addr += PAGE_SIZE, addr != end); + arch_leave_lazy_mmu_mode(); spin_unlock(src_ptl); pte_unmap_nested(src_pte - 1); add_mm_rss(dst_mm, rss[0], rss[1]); @@ -628,6 +630,7 @@ static unsigned long zap_pte_range(struc int anon_rss = 0; pte = pte_offset_map_lock(mm, pmd, addr, &ptl); + arch_enter_lazy_mmu_mode(); do { pte_t ptent = *pte; if (pte_none(ptent)) { @@ -694,6 +697,7 @@ static unsigned long zap_pte_range(struc } while (pte++, addr += PAGE_SIZE, (addr != end && *zap_work > 0)); add_mm_rss(mm, file_rss, anon_rss); + arc...
2006 Mar 14
12
[RFC] VMI for Xen?
I''m sure everyone has seen the drop of VMI patches for Linux at this point, but just in case, the link is included below. I''ve read this version of the VMI spec and have made my way through most of the patches. While I wasn''t really that impressed with the first spec wrt Xen, the second version seems to be much more palatable. Specifically, the code inlining and
2008 Feb 01
0
[PATCH] linux/x86: make xen_change_pte_range() compatible with CONFIG_HIGHPTE
...============================================================= --- head-2008-01-28.orig/arch/i386/mm/hypervisor.c 2007-10-19 17:18:37.000000000 +0200 +++ head-2008-01-28/arch/i386/mm/hypervisor.c 2008-01-31 17:38:56.000000000 +0100 @@ -569,7 +569,9 @@ int xen_change_pte_range(struct mm_struc pte = pte_offset_map_lock(mm, pmd, addr, &ptl); do { if (pte_present(*pte)) { - u[i].ptr = virt_to_machine(pte) | MMU_PT_UPDATE_PRESERVE_AD; + u[i].ptr = (__pmd_val(*pmd) & PHYSICAL_PAGE_MASK) + | ((unsigned long)pte & ~PAGE_MASK) + | MMU_PT_UPDATE_PRESERVE_AD; u[i].val = __pte_val(pte_m...
2007 Apr 18
0
[patch 6/9] Guest page hinting: writable page table entries.
...pte_at(mm, address, page_table, pte); page_add_anon_rmap(page, vma, address); @@ -2117,6 +2120,7 @@ static int do_anonymous_page(struct mm_s entry = mk_pte(page, vma->vm_page_prot); entry = maybe_mkwrite(pte_mkdirty(entry), vma); + page_check_writable(page, entry); page_table = pte_offset_map_lock(mm, pmd, address, &ptl); if (!pte_none(*page_table)) @@ -2268,6 +2272,7 @@ retry: entry = mk_pte(new_page, vma->vm_page_prot); if (write_access) entry = maybe_mkwrite(pte_mkdirty(entry), vma); + page_check_writable(new_page, entry); set_pte_at(mm, address, page_table, entry)...
2007 Apr 18
0
[patch 6/9] Guest page hinting: writable page table entries.
...pte_at(mm, address, page_table, pte); page_add_anon_rmap(page, vma, address); @@ -2117,6 +2120,7 @@ static int do_anonymous_page(struct mm_s entry = mk_pte(page, vma->vm_page_prot); entry = maybe_mkwrite(pte_mkdirty(entry), vma); + page_check_writable(page, entry); page_table = pte_offset_map_lock(mm, pmd, address, &ptl); if (!pte_none(*page_table)) @@ -2268,6 +2272,7 @@ retry: entry = mk_pte(new_page, vma->vm_page_prot); if (write_access) entry = maybe_mkwrite(pte_mkdirty(entry), vma); + page_check_writable(new_page, entry); set_pte_at(mm, address, page_table, entry)...
2020 Jun 19
0
[PATCH 13/16] mm: support THP migration to device private memory
...if (ret) + return migrate_vma_collect_skip(start, end, walk); + if (pmd_none(*pmdp)) + return migrate_vma_collect_hole(start, end, -1, walk); } - if (unlikely(pmd_bad(*pmdp))) + if (unlikely(pmd_bad(pmd) || pmd_devmap(pmd))) return migrate_vma_collect_skip(start, end, walk); ptep = pte_offset_map_lock(mm, pmdp, addr, &ptl); @@ -2310,8 +2352,7 @@ static int migrate_vma_collect_pmd(pmd_t *pmdp, mpfn |= pte_write(pte) ? MIGRATE_PFN_WRITE : 0; } - /* FIXME support THP */ - if (!page || !page->mapping || PageTransCompound(page)) { + if (!page || !page->mapping) { mpfn = 0;...
2007 Apr 18
0
[patch 7/9] Guest page hinting: minor fault optimization.
...2.6-patched/mm/memory.c --- linux-2.6/mm/memory.c 2006-09-01 12:50:25.000000000 +0200 +++ linux-2.6-patched/mm/memory.c 2006-09-01 12:50:25.000000000 +0200 @@ -2039,7 +2039,8 @@ static int do_swap_page(struct mm_struct * Back out if somebody else already faulted in this pte. */ page_table = pte_offset_map_lock(mm, pmd, address, &ptl); - if (unlikely(!pte_same(*page_table, orig_pte))) + if (unlikely(!pte_same(*page_table, orig_pte) || + (page_host_discards() && PageDiscarded(page)))) goto out_nomap; if (unlikely(!PageUptodate(page))) { @@ -2267,7 +2268,8 @@ retry: * handle that...
2007 Apr 18
0
[patch 7/9] Guest page hinting: minor fault optimization.
...2.6-patched/mm/memory.c --- linux-2.6/mm/memory.c 2006-09-01 12:50:25.000000000 +0200 +++ linux-2.6-patched/mm/memory.c 2006-09-01 12:50:25.000000000 +0200 @@ -2039,7 +2039,8 @@ static int do_swap_page(struct mm_struct * Back out if somebody else already faulted in this pte. */ page_table = pte_offset_map_lock(mm, pmd, address, &ptl); - if (unlikely(!pte_same(*page_table, orig_pte))) + if (unlikely(!pte_same(*page_table, orig_pte) || + (page_host_discards() && PageDiscarded(page)))) goto out_nomap; if (unlikely(!PageUptodate(page))) { @@ -2267,7 +2268,8 @@ retry: * handle that...
2007 Apr 18
15
[PATCH 0 of 13] Basic infrastructure patches for a paravirtualized kernel
[ REPOST: Apologies to anyone who has seen this before. It didn't make it onto any of the lists it should have. -J ] Hi Andrew, This series of patches lays the basic ground work for the paravirtualized kernel patches coming later on. I think this lot is ready for the rough-and-tumble world of the -mm tree. For the most part, these patches do nothing or very little. The patches should
2007 Apr 18
15
[PATCH 0 of 13] Basic infrastructure patches for a paravirtualized kernel
[ REPOST: Apologies to anyone who has seen this before. It didn't make it onto any of the lists it should have. -J ] Hi Andrew, This series of patches lays the basic ground work for the paravirtualized kernel patches coming later on. I think this lot is ready for the rough-and-tumble world of the -mm tree. For the most part, these patches do nothing or very little. The patches should
2006 Jul 25
18
[PATCH] turn off writable page tables
At OLS I gave a talk on some of the Xen scalability inhibitors, and one of these was writable page tables. We went over why the feature does not scale, but just as important, we found that the uniprocessor case does not provide any advantage either. These tests were done on x86_64, so I wanted to run the 1-way test on 32 bit to show the same problem. So, I have run with writable PTs and
2020 Jun 21
2
[PATCH 13/16] mm: support THP migration to device private memory
...skip(start, end, walk); > + if (pmd_none(*pmdp)) > + return migrate_vma_collect_hole(start, end, -1, walk); > } > > - if (unlikely(pmd_bad(*pmdp))) > + if (unlikely(pmd_bad(pmd) || pmd_devmap(pmd))) > return migrate_vma_collect_skip(start, end, walk); > > ptep = pte_offset_map_lock(mm, pmdp, addr, &ptl); > @@ -2310,8 +2352,7 @@ static int migrate_vma_collect_pmd(pmd_t *pmdp, > mpfn |= pte_write(pte) ? MIGRATE_PFN_WRITE : 0; > } > > - /* FIXME support THP */ > - if (!page || !page->mapping || PageTransCompound(page)) { > + if (!page || !pa...
2020 Nov 06
0
[PATCH v3 3/6] mm: support THP migration to device private memory
...sent(*pmdp)) { + int ret = migrate_vma_handle_pmd(pmdp, start, end, walk); + + if (!ret) + return 0; + if (ret == -EAGAIN) + goto again; } - if (unlikely(pmd_bad(*pmdp))) + if (unlikely(pmd_bad(*pmdp) || pmd_devmap(*pmdp))) return migrate_vma_collect_skip(start, end, walk); ptep = pte_offset_map_lock(mm, pmdp, addr, &ptl); @@ -2404,8 +2488,7 @@ static int migrate_vma_collect_pmd(pmd_t *pmdp, mpfn |= pte_write(pte) ? MIGRATE_PFN_WRITE : 0; } - /* FIXME support THP */ - if (!page || !page->mapping || PageTransCompound(page)) { + if (!page || !page->mapping) { mpfn = 0;...
2019 Aug 09
6
[RFC PATCH v6 71/92] mm: add support for remote mapping
...un_start; + unsigned long mmun_end; + pte_t *ptep; + spinlock_t *ptl; + swp_entry_t entry; + int result = 0; + + mmun_start = map_hva; + mmun_end = map_hva + PAGE_SIZE; + mmu_notifier_range_init(&range, map_mm, mmun_start, mmun_end); + mmu_notifier_invalidate_range_start(&range); + + ptep = pte_offset_map_lock(map_mm, map_pmd, map_hva, &ptl); + + /* remove reverse mapping - the caller needs to hold the pte lock */ + if (likely(map_page != NULL)) { + page_remove_rmap(map_page, false); + + /* the zero_page is not anonymous */ + if (!is_zero_pfn(pte_pfn(*ptep))) + dec_mm_counter(map_mm, MM_ANONPAGE...
2007 Jun 28
6
[patch 0/6] resend: guest page hinting version 5.
Greetings, after Carsten pitched CMM2 on the kvm mini summit here is a repost of version 5 of the guest page hinting patches. The code is still the same but has been adapted to the latest git level. -- blue skies, Martin. "Reality continues to ruin my life." - Calvin.
2007 Jun 28
6
[patch 0/6] resend: guest page hinting version 5.
Greetings, after Carsten pitched CMM2 on the kvm mini summit here is a repost of version 5 of the guest page hinting patches. The code is still the same but has been adapted to the latest git level. -- blue skies, Martin. "Reality continues to ruin my life." - Calvin.
2007 May 11
6
[patch 0/6] [rfc] guest page hinting version 5
After way to many months here is the fifth version of the guest page hinting patches. Compared to version four a few improvements have been added: - Avoid page_host_discards() calls outside of page-states.h - The discard list is now implemented via the page_free_discarded hook and architecture specific code. - PG_state_change page flag has been replaced with architecture specficic
2007 May 11
6
[patch 0/6] [rfc] guest page hinting version 5
After way to many months here is the fifth version of the guest page hinting patches. Compared to version four a few improvements have been added: - Avoid page_host_discards() calls outside of page-states.h - The discard list is now implemented via the page_free_discarded hook and architecture specific code. - PG_state_change page flag has been replaced with architecture specficic
2020 Jun 19
22
[PATCH 00/16] mm/hmm/nouveau: THP mapping and migration
These patches apply to linux-5.8.0-rc1. Patches 1-3 should probably go into 5.8, the others can be queued for 5.9. Patches 4-6 improve the HMM self tests. Patch 7-8 prepare nouveau for the meat of this series which adds support and testing for compound page mapping of system memory (patches 9-11) and compound page migration to device private memory (patches 12-16). Since these changes are split
2020 Nov 06
12
[PATCH v3 0/6] mm/hmm/nouveau: add THP migration to migrate_vma_*
This series adds support for transparent huge page migration to migrate_vma_*() and adds nouveau SVM and HMM selftests as consumers. Earlier versions were posted previously [1] and [2]. The patches apply cleanly to the linux-mm 5.10.0-rc2 tree. There are a lot of other THP patches being posted. I don't think there are any semantic conflicts but there may be some merge conflicts depending on