search for: find_pmd

Displaying 5 results from an estimated 5 matches for "find_pmd".

2020 Nov 06
0
[PATCH v3 3/6] mm: support THP migration to device private memory
...pte (split pte mapping). - */ - if (PageCompound(page)) - return false; - /* Page from ZONE_DEVICE have one extra reference */ if (is_zone_device_page(page)) { /* @@ -2833,13 +2908,191 @@ int migrate_vma_setup(struct migrate_vma *args) } EXPORT_SYMBOL(migrate_vma_setup); +static pmd_t *find_pmd(struct mm_struct *mm, unsigned long addr) +{ + pgd_t *pgdp; + p4d_t *p4dp; + pud_t *pudp; + + pgdp = pgd_offset(mm, addr); + p4dp = p4d_alloc(mm, pgdp, addr); + if (!p4dp) + return NULL; + pudp = pud_alloc(mm, p4dp, addr); + if (!pudp) + return NULL; + return pmd_alloc(mm, pudp, addr); +} + +#ifd...
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
2020 Sep 02
10
[PATCH v2 0/7] 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. An earlier version was posted previously [1]. This version now supports splitting a THP midway in the migration process which led to a number of changes. The patches apply cleanly to the current linux-mm tree. Since there are a couple of patches in linux-mm from Dan
2007 Apr 18
1
[RFC/PATCH LGUEST X86_64 03/13] lguest64 core
...H_PUD(gpud); + struct lguest_pud *pudir; + + list_for_each_entry(pudir, &linfo->pud_hash[idx], list) + if (pudir->gpud == gpud) + break; + + if (pudir == list_entry(&linfo->pud_hash[idx], struct lguest_pud, list)) + return NULL; + + return pudir; +} + +static struct lguest_pmd *find_pmd(struct lguest_guest_info *linfo, u64 gpmd) +{ + unsigned idx = HASH_PMD(gpmd); + struct lguest_pmd *pmdir; + + list_for_each_entry(pmdir, &linfo->pmd_hash[idx], list) + if (pmdir->gpmd == gpmd) + break; + + if (pmdir == list_entry(&linfo->pmd_hash[idx], struct lguest_pmd, list))...
2007 Apr 18
1
[RFC/PATCH LGUEST X86_64 03/13] lguest64 core
...H_PUD(gpud); + struct lguest_pud *pudir; + + list_for_each_entry(pudir, &linfo->pud_hash[idx], list) + if (pudir->gpud == gpud) + break; + + if (pudir == list_entry(&linfo->pud_hash[idx], struct lguest_pud, list)) + return NULL; + + return pudir; +} + +static struct lguest_pmd *find_pmd(struct lguest_guest_info *linfo, u64 gpmd) +{ + unsigned idx = HASH_PMD(gpmd); + struct lguest_pmd *pmdir; + + list_for_each_entry(pmdir, &linfo->pmd_hash[idx], list) + if (pmdir->gpmd == gpmd) + break; + + if (pmdir == list_entry(&linfo->pmd_hash[idx], struct lguest_pmd, list))...