Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1321728
| From | "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: mm: another VM_BUG_ON_PAGE(PageTail(page)) |
| Date | 2016-01-29 13:40 +0100 |
| Message-ID | <qWgvg-2ZK-9@gated-at.bofh.it> (permalink) |
| References | <qVRZV-1Z8-29@gated-at.bofh.it> <qVSsW-2cx-23@gated-at.bofh.it> <qVSsW-2cx-29@gated-at.bofh.it> <qVTfj-2Oh-3@gated-at.bofh.it> <qWea6-1ao-15@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From e20cd50a8f612dbc720d31d269e748215607a0b8 Mon Sep 17 00:00:00 2001
From: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Date: Fri, 29 Jan 2016 14:55:40 +0300
Subject: [PATCH 1/2] mm: fix bogus VM_BUG_ON_PAGE() in isolate_lru_page()
We don't care if there's a tail pages which is not on LRU. We are not
going to isolate them anyway.
Testcase:
#include <fcntl.h>
#include <unistd.h>
#include <stdio.h>
#include <sys/mman.h>
#include <numaif.h>
#define SIZE 0x2000
int foo;
int main()
{
int fd;
char *p;
unsigned long mask = 2;
fd = open("/dev/sg0", O_RDWR);
p = mmap(NULL, SIZE, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0);
/* Faultin pages */
foo = p[0] + p[0x1000];
mbind(p, SIZE, MPOL_BIND, &mask, 4, MPOL_MF_MOVE | MPOL_MF_STRICT);
return 0;
}
MPOL_MF_STRICT makes queue_pages_test_walk() ignore !vma_megratable()
and we try to queue such pages for migration. It's good question why we
ignore !vma_megratable() for MPOL_MF_STRICT, but it's subject for a
separate patch.
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Reported-by: Dmitry Vyukov <dvyukov@google.com>
Fixes: bb5b8589767a ("mm: make sure isolate_lru_page() is never called for tail page")
---
mm/vmscan.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/vmscan.c b/mm/vmscan.c
index eb3dd37ccd7c..492fbe73420b 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -1443,7 +1443,7 @@ int isolate_lru_page(struct page *page)
int ret = -EBUSY;
VM_BUG_ON_PAGE(!page_count(page), page);
- VM_BUG_ON_PAGE(PageTail(page), page);
+ VM_BUG_ON_PAGE(PageLRU(page) && PageTail(page), page);
if (PageLRU(page)) {
struct zone *zone = page_zone(page);
--
2.7.0.rc3
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
mm: another VM_BUG_ON_PAGE(PageTail(page)) Dmitry Vyukov <dvyukov@google.com> - 2016-01-28 11:30 +0100
Re: mm: another VM_BUG_ON_PAGE(PageTail(page)) "Kirill A. Shutemov" <kirill@shutemov.name> - 2016-01-28 12:00 +0100
Re: mm: another VM_BUG_ON_PAGE(PageTail(page)) "Kirill A. Shutemov" <kirill@shutemov.name> - 2016-01-28 12:50 +0100
Re: mm: another VM_BUG_ON_PAGE(PageTail(page)) Dmitry Vyukov <dvyukov@google.com> - 2016-01-29 11:10 +0100
Re: mm: another VM_BUG_ON_PAGE(PageTail(page)) "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> - 2016-01-29 13:40 +0100
Re: mm: another VM_BUG_ON_PAGE(PageTail(page)) Dmitry Vyukov <dvyukov@google.com> - 2016-02-01 11:50 +0100
Re: mm: another VM_BUG_ON_PAGE(PageTail(page)) "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> - 2016-01-29 13:40 +0100
csiph-web