Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1616937 > unrolled thread
| Started by | Punit Agrawal <punit.agrawal@arm.com> |
|---|---|
| First post | 2017-04-05 15:50 +0200 |
| Last post | 2017-04-06 03:30 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH v2 6/9] mm: rmap: Use correct helper when poisoning hugepages Punit Agrawal <punit.agrawal@arm.com> - 2017-04-05 15:50 +0200
Re: [PATCH v2 6/9] mm: rmap: Use correct helper when poisoning hugepages kbuild test robot <lkp@intel.com> - 2017-04-06 03:30 +0200
| From | Punit Agrawal <punit.agrawal@arm.com> |
|---|---|
| Date | 2017-04-05 15:50 +0200 |
| Subject | [PATCH v2 6/9] mm: rmap: Use correct helper when poisoning hugepages |
| Message-ID | <tsTtU-3hW-33@gated-at.bofh.it> |
Using set_pte_at() does not do the right thing when putting down
HWPOISON swap entries for hugepages on architectures that support
contiguous ptes.
Fix this problem by using set_huge_swap_pte_at() which was introduced to
fix exactly this problem.
Signed-off-by: Punit Agrawal <punit.agrawal@arm.com>
Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
---
mm/rmap.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/mm/rmap.c b/mm/rmap.c
index f6838015810f..e07c7912a166 100644
--- a/mm/rmap.c
+++ b/mm/rmap.c
@@ -1386,15 +1386,19 @@ static int try_to_unmap_one(struct page *page, struct vm_area_struct *vma,
update_hiwater_rss(mm);
if (PageHWPoison(page) && !(flags & TTU_IGNORE_HWPOISON)) {
+ pteval = swp_entry_to_pte(make_hwpoison_entry(subpage));
if (PageHuge(page)) {
int nr = 1 << compound_order(page);
hugetlb_count_sub(nr, mm);
+ set_huge_swap_pte_at(mm, address,
+ pvmw.pte, pteval,
+ vma_mmu_pagesize(vma));
} else {
dec_mm_counter(mm, mm_counter(page));
+ set_pte_at(mm, address, pvmw.pte, pteval);
}
- pteval = swp_entry_to_pte(make_hwpoison_entry(subpage));
- set_pte_at(mm, address, pvmw.pte, pteval);
+
} else if (pte_unused(pteval)) {
/*
* The guest indicated that the page content is of no
--
2.11.0
[toc] | [next] | [standalone]
| From | kbuild test robot <lkp@intel.com> |
|---|---|
| Date | 2017-04-06 03:30 +0200 |
| Subject | Re: [PATCH v2 6/9] mm: rmap: Use correct helper when poisoning hugepages |
| Message-ID | <tt4pj-1LZ-1@gated-at.bofh.it> |
| In reply to | #1616937 |
[Multipart message — attachments visible in raw view] — view raw
Hi Punit,
[auto build test ERROR on arm64/for-next/core]
[also build test ERROR on v4.11-rc5 next-20170405]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Punit-Agrawal/Support-swap-entries-for-contiguous-pte-hugepages/20170406-090327
base: https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-next/core
config: i386-tinyconfig (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
# save the attached .config to linux build tree
make ARCH=i386
All errors (new ones prefixed by >>):
mm/rmap.c: In function 'try_to_unmap_one':
>> mm/rmap.c:1393:5: error: implicit declaration of function 'set_huge_swap_pte_at' [-Werror=implicit-function-declaration]
set_huge_swap_pte_at(mm, address,
^~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/set_huge_swap_pte_at +1393 mm/rmap.c
1387
1388 if (PageHWPoison(page) && !(flags & TTU_IGNORE_HWPOISON)) {
1389 pteval = swp_entry_to_pte(make_hwpoison_entry(subpage));
1390 if (PageHuge(page)) {
1391 int nr = 1 << compound_order(page);
1392 hugetlb_count_sub(nr, mm);
> 1393 set_huge_swap_pte_at(mm, address,
1394 pvmw.pte, pteval,
1395 vma_mmu_pagesize(vma));
1396 } else {
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web