[PATCH v4 1/8] staging: zcache: introduce zero-filled pages handler

2013-03-19 Thread Wanpeng Li
Introduce zero-filled pages handler to capture and handle zero pages. Acked-by: Dan Magenheimer Signed-off-by: Wanpeng Li --- drivers/staging/zcache/zcache-main.c | 26 ++ 1 files changed, 26 insertions(+), 0 deletions(-) diff --git a/drivers/staging/zcache/zcache

[PATCH v4 2/8] staging: zcache: zero-filled pages awareness

2013-03-19 Thread Wanpeng Li
, we fill the page frame with zero. Acked-by: Dan Magenheimer Reviewed-by: Konrad Rzeszutek Wilk Signed-off-by: Wanpeng Li --- drivers/staging/zcache/zcache-main.c | 80 - 1 files changed, 68 insertions(+), 12 deletions(-) diff --git a/drivers/staging/zcache

[PATCH v4 0/8] staging: zcache: Support zero-filled pages more efficiently

2013-03-19 Thread Wanpeng Li
- zcache_[eph|pers]_zbytes) * 100 / (zcache_[eph|pers]_pageframes * PAGE_SIZE) - memory zcache occupy = zcache_[eph|pers]_zbytes Result: without zero-filled awareness: - fragmentation level: 98% - memory zcache occupy: 238MB with zero-filled awareness: - fragmentation level: 0% - memory zcache occu

[PATCH v4 8/8] staging: zcache: clean TODO list

2013-03-19 Thread Wanpeng Li
Cleanup TODO list since support zero-filled pages more efficiently has already done by this patchset. Acked-by: Dan Magenheimer Signed-off-by: Wanpeng Li --- drivers/staging/zcache/TODO |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/drivers/staging/zcache/TODO b

[PATCH v4 5/8] staging: zcache: fix zcache writeback in debugfs

2013-03-19 Thread Wanpeng Li
ttenback_pages seperately, however, corresponding .val = &zcache_zcache_outstanding_writeback_pages and .val = &zcache_zcache_writtenback_pages, which are not correct. Signed-off-by: Wanpeng Li --- drivers/staging/zcache/debug.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)

[PATCH v4 7/8] staging: zcache: introduce zero-filled page stat count

2013-03-19 Thread Wanpeng Li
Introduce zero-filled page statistics to monitor the number of zero-filled pages. Acked-by: Dan Magenheimer Signed-off-by: Wanpeng Li --- drivers/staging/zcache/debug.h | 15 +++ drivers/staging/zcache/zcache-main.c |5 + 2 files changed, 20 insertions(+), 0

[PATCH v4 3/8] staging: zcache: handle zcache_[eph|pers]_zpages for zero-filled page

2013-03-19 Thread Wanpeng Li
frames for storage. So the zpages counter should be increased but the pageframes counter should not. [Dan Magenheimer : patch description] Acked-by: Dan Magenheimer Reviewed-by: Konrad Rzeszutek Wilk Signed-off-by: Wanpeng Li --- drivers/staging/zcache/zcache-main.c |7 ++- 1 files

[PATCH v4 6/8] staging: zcache: fix static variables defined in debug.h but used in mutiple C files

2013-03-19 Thread Wanpeng Li
eated as shared variables. Signed-off-by: Wanpeng Li --- drivers/staging/zcache/debug.h | 62 +- drivers/staging/zcache/zcache-main.c | 31 + 2 files changed, 62 insertions(+), 31 deletions(-) diff --git a/drivers/staging/zcache/debug.h b/

[PATCH v4 4/8] staging: zcache: fix pers_pageframes|_max aren't exported in debugfs

2013-03-19 Thread Wanpeng Li
Before commit 9c0ad59ef ("zcache/debug: Use an array to initialize/use debugfs attributes"), pers_pageframes|_max are exported in debugfs, but this commit forgot use array export pers_pageframes|_max. This patch add pers_pageframes|_max back. Signed-off-by: Wanpeng Li --- drive

[PATCH v6 1/3] staging: zcache: fix static variables defined in debug.h but used in mutiple C files

2013-04-03 Thread Wanpeng Li
t be treated as shared variables. Signed-off-by: Wanpeng Li --- drivers/staging/zcache/debug.c | 32 drivers/staging/zcache/debug.h | 62 2 files changed, 63 insertions(+), 31 deletions(-) diff --git a/drivers/staging/zcache/debug.c b/

[PATCH v2 3/3] staging: zcache: clean TODO list

2013-04-03 Thread Wanpeng Li
Cleanup TODO list since support zero-filled pages more efficiently has already done by this patchset. Acked-by: Dan Magenheimer Signed-off-by: Wanpeng Li --- drivers/staging/zcache/TODO |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/drivers/staging/zcache/TODO b

[PATCH part2 v6 0/3] staging: zcache: Support zero-filled pages more efficiently

2013-04-03 Thread Wanpeng Li
areness: - fragmentation level: 98% - memory zcache occupy: 238MB with zero-filled awareness: - fragmentation level: 0% - memory zcache occupy: 0MB Wanpeng Li (3): staging: zcache: fix static variables defined in debug.h but used in mutiple C files staging: zcache: introduce zero-filled page

[PATCH v6 2/3] staging: zcache: introduce zero-filled page stat count

2013-04-03 Thread Wanpeng Li
Introduce zero-filled page statistics to monitor the number of zero-filled pages. Acked-by: Dan Magenheimer Signed-off-by: Wanpeng Li --- drivers/staging/zcache/debug.c |3 +++ drivers/staging/zcache/debug.h | 17 + drivers/staging/zcache/zcache-main.c |4

[PATCH 5/6] mm/hugetlb: remove redundant hugetlb_prefault

2013-04-04 Thread Wanpeng Li
hugetlb_prefault is not used by any users. This patch remove redundant hugetlb_prefault. Signed-off-by: Wanpeng Li --- include/linux/hugetlb.h |2 -- 1 file changed, 2 deletions(-) diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index b7e4106..813b265 100644 --- a/include

[PATCH 4/6] mm/hugetlb: use already exist huge_page_order() instead of h->order

2013-04-04 Thread Wanpeng Li
Use already exist interface huge_page_order() instead of h->order to get huge page order. Signed-off-by: Wanpeng Li --- mm/hugetlb.c | 36 +++- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 328f140..0cae

[PATCH 3/6] mm/hugetlb: enable gigantic hugetlb page pools shrinking

2013-04-04 Thread Wanpeng Li
Enable gigantic hugetlb page pools shrinking. Signed-off-by: Wanpeng Li --- mm/hugetlb.c |7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/mm/hugetlb.c b/mm/hugetlb.c index eeaf6f2..328f140 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -1416,7 +1416,8 @@ static

[PATCH 2/6] mm/hugetlb: update_and_free_page gigantic pages awareness

2013-04-04 Thread Wanpeng Li
order >= MAX_ORDER pages can't be freed to buddy system directly, this patch destroy the gigantic hugetlb page to normal order-0 pages and free them one by one. Signed-off-by: Wanpeng Li --- mm/hugetlb.c| 39 +-- mm/internal.h |

[PATCH 6/6] mm/hugetlb: use already exist interface huge_page_shift

2013-04-04 Thread Wanpeng Li
Use already exist interface huge_page_shift instead of h->order + PAGE_SHIFT. Signed-off-by: Wanpeng Li --- mm/hugetlb.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 0cae950..750ed8a 100644 --- a/mm/hugetlb.c +++ b/mm/hugetl

[PATCH 1/6] mm/hugetlb: introduce new sysctl knob which control gigantic page pools shrinking

2013-04-04 Thread Wanpeng Li
m any more. Signed-off-by: Wanpeng Li --- Documentation/sysctl/vm.txt | 13 + include/linux/hugetlb.h |3 +++ kernel/sysctl.c |7 +++ mm/hugetlb.c|9 + 4 files changed, 32 insertions(+) diff --git a/Documentation/sysct

[PATCH 0/6] mm/hugetlb: gigantic hugetlb page pools shrink supporting

2013-04-04 Thread Wanpeng Li
35972 Swap: 35999 0 35999 Wanpeng Li (6): introduce new sysctl knob which control gigantic page pools shrinking update_and_free_page gigantic pages awareness enable gigantic hugetlb page pools shrinking use already exist huge_page_order() instead of h->order re

[PATCH 1/4] zcache: introduce zero-filled pages handler

2013-03-13 Thread Wanpeng Li
Introduce zero-filled pages handler to capture and handle zero pages. Signed-off-by: Wanpeng Li --- drivers/staging/zcache/zcache-main.c | 26 ++ 1 files changed, 26 insertions(+), 0 deletions(-) diff --git a/drivers/staging/zcache/zcache-main.c b/drivers/staging

[PATCH 3/4] zcache: introduce zero-filled pages stat count

2013-03-13 Thread Wanpeng Li
Introduce zero-filled page statistics to monitor the number of zero-filled pages. Signed-off-by: Wanpeng Li --- drivers/staging/zcache/zcache-main.c |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/drivers/staging/zcache/zcache-main.c b/drivers/staging/zcache

[PATCH 2/4] zcache: zero-filled pages awareness

2013-03-13 Thread Wanpeng Li
, we fill the page frame with zero. Signed-off-by: Wanpeng Li --- drivers/staging/zcache/tmem.c|4 +- drivers/staging/zcache/tmem.h|5 ++ drivers/staging/zcache/zcache-main.c | 87 ++ 3 files changed, 85 insertions(+), 11 deletions(-) diff

[PATCH 4/4] zcache: add pageframes count once compress zero-filled pages twice

2013-03-13 Thread Wanpeng Li
Since zbudpage consist of two zpages, two zero-filled pages compression contribute to one [eph|pers]pageframe count accumulated. Signed-off-by: Wanpeng Li --- drivers/staging/zcache/zcache-main.c | 25 +++-- 1 files changed, 23 insertions(+), 2 deletions(-) diff --git a

[PATCH] zram: fix zram_bvec_read duplicate dump failure message and stat accumulation

2013-03-13 Thread Wanpeng Li
When zram decompress fails, the code unnecessarily dumps failure messages and does stat accumulation in function zram_decompress_page(), this work is already done in function zram_decompress_page, the patch skips the redundant work. Signed-off-by: Wanpeng Li --- drivers/staging/zram/zram_drv.c

[PATCH 0/4] zcache: Support zero-filled pages more efficiently

2013-03-13 Thread Wanpeng Li
illed awareness: - fragmentation level: 0% - memory zcache occupy: 0MB Wanpeng Li (4): introduce zero-filled pages handler zero-filled pages awareness introduce zero-filled pages stat count add pageframes count once compress zero-filled pages twice drivers/staging/zcache/tmem.c|4 +-

[PATCH] mm/hugetlb: fix total hugetlbfs pages count when memory overcommit accouting

2013-03-13 Thread Wanpeng Li
case: boot: hugepagesz=1G hugepages=1 before patch: egrep 'CommitLimit' /proc/meminfo CommitLimit: 55434168 kB after patch: egrep 'CommitLimit' /proc/meminfo CommitLimit: 54909880 kB Signed-off-by: Wanpeng Li --- mm/hugetlb.c | 7 +-- 1 file changed, 5 insertions(+), 2

[PATCH v2 0/4] zcache: Support zero-filled pages more efficiently

2013-03-14 Thread Wanpeng Li
|pers]_zbytes) * 100 / (zcache_[eph|pers]_pageframes * PAGE_SIZE) - memory zcache occupy = zcache_[eph|pers]_zbytes Result: without zero-filled awareness: - fragmentation level: 98% - memory zcache occupy: 238MB with zero-filled awareness: - fragmentation level: 0% - memory zcache occupy: 0MB Wanp

[PATCH v2 4/4] clean TODO list

2013-03-14 Thread Wanpeng Li
Cleanup TODO list since support zero-filled pages more efficiently has already done by this patchset. Acked-by: Dan Magenheimer Signed-off-by: Wanpeng Li --- drivers/staging/zcache/TODO |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/drivers/staging/zcache/TODO b

[PATCH v2 3/4] introduce zero-filled page stat count

2013-03-14 Thread Wanpeng Li
Introduce zero-filled page statistics to monitor the number of zero-filled pages. Acked-by: Dan Magenheimer Signed-off-by: Wanpeng Li --- drivers/staging/zcache/zcache-main.c |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/drivers/staging/zcache/zcache-main.c b

[PATCH v2 2/4] zero-filled pages awareness

2013-03-14 Thread Wanpeng Li
, we fill the page frame with zero. Acked-by: Dan Magenheimer Signed-off-by: Wanpeng Li --- drivers/staging/zcache/zcache-main.c | 86 +++-- 1 files changed, 80 insertions(+), 6 deletions(-) diff --git a/drivers/staging/zcache/zcache-main.c b/drivers/staging/zcache

[PATCH v2 1/4] introduce zero filled pages handler

2013-03-14 Thread Wanpeng Li
Introduce zero-filled pages handler to capture and handle zero pages. Acked-by: Dan Magenheimer Signed-off-by: Wanpeng Li --- drivers/staging/zcache/zcache-main.c | 26 ++ 1 files changed, 26 insertions(+), 0 deletions(-) diff --git a/drivers/staging/zcache/zcache

[PATCH v2] mm/hugetlb: fix total hugetlbfs pages count when memory overcommit accouting

2013-03-14 Thread Wanpeng Li
esz=1G hugepages=1 before patch: egrep 'CommitLimit' /proc/meminfo CommitLimit: 55434168 kB after patch: egrep 'CommitLimit' /proc/meminfo CommitLimit: 54909880 kB Signed-off-by: Wanpeng Li --- mm/hugetlb.c | 7 +-- 1 file changed, 5 insertions(+), 2 deleti

[PATCH v3] mm/hugetlb: fix total hugetlbfs pages count when memory overcommit accouting

2013-03-14 Thread Wanpeng Li
tio is 50 before patch: egrep 'CommitLimit' /proc/meminfo CommitLimit: 55434168 kB after patch: egrep 'CommitLimit' /proc/meminfo CommitLimit: 54909880 kB Signed-off-by: Wanpeng Li --- mm/hugetlb.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git

[PATCH v3 1/5] introduce zero filled pages handler

2013-03-14 Thread Wanpeng Li
Introduce zero-filled pages handler to capture and handle zero pages. Acked-by: Dan Magenheimer Signed-off-by: Wanpeng Li --- drivers/staging/zcache/zcache-main.c | 26 ++ 1 files changed, 26 insertions(+), 0 deletions(-) diff --git a/drivers/staging/zcache/zcache

[PATCH v3 5/5] clean TODO list

2013-03-14 Thread Wanpeng Li
Cleanup TODO list since support zero-filled pages more efficiently has already done by this patchset. Acked-by: Dan Magenheimer Signed-off-by: Wanpeng Li --- drivers/staging/zcache/TODO |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/drivers/staging/zcache/TODO b

[PATCH v3 4/5] introduce zero-filled page stat count

2013-03-14 Thread Wanpeng Li
Introduce zero-filled page statistics to monitor the number of zero-filled pages. Acked-by: Dan Magenheimer Signed-off-by: Wanpeng Li --- drivers/staging/zcache/zcache-main.c |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/drivers/staging/zcache/zcache-main.c b

[PATCH v3 3/5] handle zcache_[eph|pers]_zpages for zero-filled page

2013-03-14 Thread Wanpeng Li
frames for storage. So the zpages counter should be increased but the pageframes counter should not. [Dan Magenheimer : patch description] Acked-by: Dan Magenheimer Signed-off-by: Wanpeng Li --- drivers/staging/zcache/zcache-main.c |7 ++- 1 files changed, 6 insertions(+), 1 deletion

[PATCH v3 2/5] zero-filled pages awareness

2013-03-14 Thread Wanpeng Li
, we fill the page frame with zero. Acked-by: Dan Magenheimer Signed-off-by: Wanpeng Li --- drivers/staging/zcache/zcache-main.c | 81 +++--- 1 files changed, 75 insertions(+), 6 deletions(-) diff --git a/drivers/staging/zcache/zcache-main.c b/drivers/staging/zcache

[PATCH v3 0/5] zcache: Support zero-filled pages more efficiently

2013-03-14 Thread Wanpeng Li
zcache_[eph|pers]_zbytes Result: without zero-filled awareness: - fragmentation level: 98% - memory zcache occupy: 238MB with zero-filled awareness: - fragmentation level: 0% - memory zcache occupy: 0MB Wanpeng Li (5): introduce zero-filled pages handler zero-filled pages awareness handle zcache

[PATCH v3 6/8] mm/hwpoison: drop forward reference declarations __soft_offline_page()

2013-08-25 Thread Wanpeng Li
Drop forward reference declarations __soft_offline_page. Reviewed-by: Naoya Horiguchi Signed-off-by: Wanpeng Li --- mm/memory-failure.c | 128 ++-- 1 file changed, 63 insertions(+), 65 deletions(-) diff --git a/mm/memory-failure.c b/mm/memory

[PATCH v3 3/8] mm/hwpoison: fix race against poison thp

2013-08-25 Thread Wanpeng Li
ck page if (!PageHWPoison(p)) unlock page and return hwpoison_user_mappings if (PageTransHuge(hpage)) split_huge_page(hpage); Suggested-by: Naoya Horiguchi Signed-off-by: Wanpeng Li --- mm/memory-failure.c | 10 ++ 1 file changed, 10 insertions(+) di

[PATCH v3 5/8] mm/hwpoison: don't set migration type twice to avoid hold heavy contend zone->lock

2013-08-25 Thread Wanpeng Li
s MIGRATE_ISOLATE. There are other two parts can change MIGRATE_ISOLATE except hwpoison. One is memory hoplug, however, we hold lock_memory_hotplug() which avoid race. The second is CMA which umovable page allocation requst can't fallback to. So it's safe here. Signed-off-by: Wanpeng L

[PATCH v3 8/8] mm/hwpoison: fix memory failure still hold reference count after unpoison empty zero page

2013-08-25 Thread Wanpeng Li
ory [ 117.256163] MCE: Page was already unpoisoned 0x19d0 [ 117.256167] pfn 0x19d0, page count = 1 after unpoison memory [ 117.917772] MCE: Page was already unpoisoned 0x19d0 [ 117.91] pfn 0x19d0, page count = 1 after unpoison memory Signed-off-by: Wanpeng Li --- mm/memory-failure.c

[PATCH v3 7/8] mm/hwpoison: add '#' to madvise_hwpoison

2013-08-25 Thread Wanpeng Li
n LRU page recovery: Ignored Reviewed-by: Naoya Horiguchi Signed-off-by: Wanpeng Li --- mm/madvise.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/madvise.c b/mm/madvise.c index 95795df..588bb19 100644 --- a/mm/madvise.c +++ b/mm/madvise.c @@ -353,14 +353,14 @@

[PATCH v3 2/8] mm/hwpoison: don't need to hold compound lock for hugetlbfs page

2013-08-25 Thread Wanpeng Li
bpage will be poisoned. There is unnecessary to hold compound lock for hugetlbfs page. This patch replace compound_trans_order by compond_order in the place where the page is hugetlbfs page. Reviewed-by: Naoya Horiguchi Signed-off-by: Wanpeng Li --- include/linux/mm.h | 14 -- mm/mem

[PATCH v3 1/8] mm/hwpoison: fix lose PG_dirty flag for errors on mlocked pages

2013-08-25 Thread Wanpeng Li
lure for page 91cdd3 at 7f9f5b0e6000 [ 163.603852] MCE 0x91cdd3: dirty mlocked LRU page recovery: Recovered [ 163.610305] MCE 0x91cdd3: dirty mlocked LRU page still referenced by 1 users Reviewed-by: Naoya Horiguchi Signed-off-by: Wanpeng Li --- mm/memory-failure.c | 3 +++ 1 file changed, 3 inserti

[PATCH v3 4/8] mm/hwpoison: replacing atomic_long_sub() with atomic_long_dec()

2013-08-25 Thread Wanpeng Li
Repalce atomic_long_sub() with atomic_long_dec() since the page is normal page instead of hugetlbfs page or thp. Reviewed-by: Naoya Horiguchi Signed-off-by: Wanpeng Li --- mm/memory-failure.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/memory-failure.c b/mm/memory

[PATCH v4 2/10] mm/hwpoison: don't need to hold compound lock for hugetlbfs page

2013-08-26 Thread Wanpeng Li
bpage will be poisoned. There is unnecessary to hold compound lock for hugetlbfs page. This patch replace compound_trans_order by compond_order in the place where the page is hugetlbfs page. Reviewed-by: Naoya Horiguchi Signed-off-by: Wanpeng Li --- include/linux/mm.h | 14 -- mm/mem

[PATCH v4 8/10] mm/hwpoison: fix memory failure still hold reference count after unpoison empty zero page

2013-08-26 Thread Wanpeng Li
ory [ 117.256163] MCE: Page was already unpoisoned 0x19d0 [ 117.256167] pfn 0x19d0, page count = 1 after unpoison memory [ 117.917772] MCE: Page was already unpoisoned 0x19d0 [ 117.91] pfn 0x19d0, page count = 1 after unpoison memory Signed-off-by: Wanpeng Li --- mm/memory-failure.c

[PATCH v4 6/10] mm/hwpoison: drop forward reference declarations __soft_offline_page()

2013-08-26 Thread Wanpeng Li
Drop forward reference declarations __soft_offline_page. Reviewed-by: Naoya Horiguchi Signed-off-by: Wanpeng Li --- mm/memory-failure.c | 128 ++-- 1 file changed, 63 insertions(+), 65 deletions(-) diff --git a/mm/memory-failure.c b/mm/memory

[PATCH v4 10/10] mm/hwpoison: fix bug triggered by unpoison empty zero page

2013-08-26 Thread Wanpeng Li
buddy system which is not correct since empty zero page has PG_reserved flag. This patch fix it by don't reduce the page reference count under 1 against empty zero page. Signed-off-by: Wanpeng Li --- mm/memory-failure.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

[PATCH v4 5/10] mm/hwpoison: don't set migration type twice to avoid hold heavy contend zone->lock

2013-08-26 Thread Wanpeng Li
s MIGRATE_ISOLATE. There are other two parts can change MIGRATE_ISOLATE except hwpoison. One is memory hoplug, however, we hold lock_memory_hotplug() which avoid race. The second is CMA which umovable page allocation requst can't fallback to. So it's safe here. Signed-off-by: Wanpeng L

[PATCH v4 3/10] mm/hwpoison: fix race against poison thp

2013-08-26 Thread Wanpeng Li
turn hwpoison_user_mappings if (PageTransHuge(hpage)) split_huge_page(hpage); Suggested-by: Naoya Horiguchi Signed-off-by: Wanpeng Li --- mm/memory-failure.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/mm/memory-failure.c b/mm/memory-failure.c ind

[PATCH v4 9/10] mm/hwpoison: change permission of corrupt-pfn/unpoison-pfn to 0400

2013-08-26 Thread Wanpeng Li
n-pfn: Permission denied This patch change the permission of corrupt-pfn/unpoison-pfn to 0400. Signed-off-by: Wanpeng Li --- mm/hwpoison-inject.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/hwpoison-inject.c b/mm/hwpoison-inject.c index 3a61efc..8b77bfd 100644 --- a/mm/hwp

[PATCH v4 7/10] mm/hwpoison: add '#' to madvise_hwpoison

2013-08-26 Thread Wanpeng Li
n LRU page recovery: Ignored Reviewed-by: Naoya Horiguchi Signed-off-by: Wanpeng Li --- mm/madvise.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/madvise.c b/mm/madvise.c index 95795df..588bb19 100644 --- a/mm/madvise.c +++ b/mm/madvise.c @@ -353,14 +353,14 @@

[PATCH v4 1/10] mm/hwpoison: fix lose PG_dirty flag for errors on mlocked pages

2013-08-26 Thread Wanpeng Li
lure for page 91cdd3 at 7f9f5b0e6000 [ 163.603852] MCE 0x91cdd3: dirty mlocked LRU page recovery: Recovered [ 163.610305] MCE 0x91cdd3: dirty mlocked LRU page still referenced by 1 users Reviewed-by: Naoya Horiguchi Signed-off-by: Wanpeng Li --- mm/memory-failure.c | 3 +++ 1 file changed, 3 inserti

[PATCH v4 4/10] mm/hwpoison: replacing atomic_long_sub() with atomic_long_dec()

2013-08-26 Thread Wanpeng Li
Repalce atomic_long_sub() with atomic_long_dec() since the page is normal page instead of hugetlbfs page or thp. Reviewed-by: Naoya Horiguchi Signed-off-by: Wanpeng Li --- mm/memory-failure.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/memory-failure.c b/mm/memory

[PATCH 3/3] mm/hwpoison: fix bug triggered by unpoison empty zero page

2013-08-26 Thread Wanpeng Li
which is not correct since empty zero page has PG_reserved flag. This patch fix it by don't reduce the page reference count under 1 against empty zero page. Signed-off-by: Wanpeng Li --- mm/memory-failure.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/memory-fail

[PATCH 1/3] mm/hwpoison: fix memory failure still hold reference count after unpoison empty zero page

2013-08-26 Thread Wanpeng Li
failure for page 0x19d0 at 0xb77da000 [ 93.076224] MCE 0x19d0: already hardware poisoned [ 93.076225] pfn 0x19d0, page count = 3 after memory failure Suggested-by: Naoya Horiguchi Signed-off-by: Wanpeng Li --- mm/madvise.c | 4 1 file changed, 4 insertions(+) diff --git a/mm/madvise.c b/mm

[PATCH 2/3] mm/hwpoison: change permission of corrupt-pfn/unpoison-pfn to 0200

2013-08-26 Thread Wanpeng Li
ssion denied This patch change the permission of corrupt-pfn/unpoison-pfn to 0200. Reviewed-by: Naoya Horiguchi Signed-off-by: Wanpeng Li --- mm/hwpoison-inject.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/hwpoison-inject.c b/mm/hwpoison-inject.c index 3a

[PATCH v2 1/3] mm/hwpoison: fix bug triggered by unpoison empty zero page

2013-08-26 Thread Wanpeng Li
the last page reference count and free empty zero page to buddy system which is not correct since empty zero page has PG_reserved flag. This patch fix it by ignore empty zero page for madvise_hwpoison directly. Suggested-by: Naoya Horiguchi Signed-off-by: Wanpeng Li --- mm/madvise.c|

[PATCH v2 2/3] mm/hwpoison: change permission of corrupt-pfn/unpoison-pfn to 0200

2013-08-26 Thread Wanpeng Li
ssion denied This patch change the permission of corrupt-pfn/unpoison-pfn to 0200. Reviewed-by: Naoya Horiguchi Signed-off-by: Wanpeng Li --- mm/hwpoison-inject.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/hwpoison-inject.c b/mm/hwpoison-inject.c index 3a

[PATCH v2 3/3] mm/hwpoison: fix return value of madvise_hwpoison

2013-08-26 Thread Wanpeng Li
The return value outside for loop is always zero which means madvise_hwpoison return success, however, this is not truth for soft_offline_page w/ failure return value. Signed-off-by: Wanpeng Li --- mm/madvise.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/madvise.c b

[RESEND PATCH v5 2/4] mm/vmalloc: revert "mm/vmalloc.c: emit the failure message before return"

2013-09-14 Thread Wanpeng Li
d-off-by: Wanpeng Li --- mm/vmalloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/vmalloc.c b/mm/vmalloc.c index d78d117..e3ec8b4 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -1635,7 +1635,7 @@ void *__vmalloc_node_range(unsigned long size, unsigned lo

[RESEND PATCH v5 3/4] mm/vmalloc: revert "mm/vmalloc.c: check VM_UNINITIALIZED flag in s_show instead of show_numa_info"

2013-09-14 Thread Wanpeng Li
tch move the check just before show_numa_info in order that some messages still can be dumped via /proc/vmallocinfo. This patch revert commit d157a558 (mm/vmalloc.c: check VM_UNINITIALIZED flag in s_show instead of show_numa_info); Reviewed-by: Zhang Yanfei Signed-off-by: Wanpeng Li ---

[RESEND PATCH v5 1/4] mm/vmalloc: don't set area->caller twice

2013-09-14 Thread Wanpeng Li
Changelog: *v1 -> v2: rebase against mmotm tree The caller address has already been set in set_vmalloc_vm(), there's no need to set it again in __vmalloc_area_node. Reviewed-by: Zhang Yanfei Signed-off-by: Wanpeng Li --- mm/vmalloc.c | 1 - 1 file changed, 1 deletion(-) diff --

[RESEND PATCH v5 4/4] mm/vmalloc: fix show vmap_area information race with vmap_area tear down

2013-09-14 Thread Wanpeng Li
ce they are not possible for !VM_VM_AREA case. Suggested-by: Joonsoo Kim Signed-off-by: Wanpeng Li --- mm/vmalloc.c | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/mm/vmalloc.c b/mm/vmalloc.c index 5368b17..9b75028 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c

[RESEND PATCH v2 1/4] mm/hwpoison: fix traverse hugetlbfs page to avoid printk flood

2013-09-14 Thread Wanpeng Li
iewed-by: Naoya Horiguchi Signed-off-by: Wanpeng Li --- mm/madvise.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mm/madvise.c b/mm/madvise.c index 6975bc8..539eeb9 100644 --- a/mm/madvise.c +++ b/mm/madvise.c @@ -343,10 +343,11 @@ static long madvise_remove(struct vm_a

[RESEND PATCH v2 4/4] mm/hwpoison: fix the lack of one reference count against poisoned page

2013-09-14 Thread Wanpeng Li
patch: [ 94.710860] Injecting memory failure at pfn 215b68 [ 94.710885] MCE 0x215b68: dirty LRU page recovery: Recovered Reviewed-by: Naoya Horiguchi Signed-off-by: Wanpeng Li --- mm/hwpoison-inject.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mm/hwpoison

[RESEND PATCH v2 3/4] mm/hwpoison: fix false report 2nd try page recovery

2013-09-14 Thread Wanpeng Li
200010 [ 346.332189] MCE 0x200010: free buddy, 2nd try page recovery: Delayed After patch: [ 297.742600] Injecting memory failure at pfn 200010 [ 297.742941] MCE 0x200010: free buddy page recovery: Delayed Reviewed-by: Naoya Horiguchi Signed-off-by: Wanpeng Li --- mm/memory-failure.c |6

[RESEND PATCH v2 2/4] mm/hwpoison: fix miss catch transparent huge page

2013-09-14 Thread Wanpeng Li
ecovery: Delayed [ 105.722303] MCE: Software-unpoisoned page 0x23a000 Reviewed-by: Naoya Horiguchi Signed-off-by: Wanpeng Li --- mm/memory-failure.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/memory-failure.c b/mm/memory-failure.c index e28ee77..b114570 100644 --- a/mm/memory

[PATCH v6 2/2] mm/vmalloc: drop "caller" argument of __vmalloc_area_node()

2013-09-17 Thread Wanpeng Li
__vmalloc_area_node() no longer need "caller" argument. It can use area->caller instead. This patch drop "caller" argument of __vmalloc_area_node(). Signed-off-by: Wanpeng Li --- mm/vmalloc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mm/v

[PATCH v6 1/2] mm/vmalloc: fix show vmap_area information race with vmap_area tear down

2013-09-17 Thread Wanpeng Li
ZY_FREE | VM_LAZY_FREEING) check since they are not possible for !VM_VM_AREA case. Suggested-by: Joonsoo Kim Acked-by: KOSAKI Motohiro Signed-off-by: Wanpeng Li --- mm/vmalloc.c | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/mm/vmalloc.c b/mm/vmalloc.c in

[PATCH v3 1/4] mm/hwpoison: fix traverse hugetlbfs page to avoid printk flood

2013-09-17 Thread Wanpeng Li
Naoya Horiguchi Acked-by: Andi Kleen Signed-off-by: Wanpeng Li --- mm/madvise.c |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/mm/madvise.c b/mm/madvise.c index 6975bc8..539eeb9 100644 --- a/mm/madvise.c +++ b/mm/madvise.c @@ -343,10 +343,11 @@ static long madvis

[PATCH v3 3/4] mm/hwpoison: fix false report 2nd try page recovery

2013-09-17 Thread Wanpeng Li
200010 [ 346.332189] MCE 0x200010: free buddy, 2nd try page recovery: Delayed After patch: [ 297.742600] Injecting memory failure at pfn 200010 [ 297.742941] MCE 0x200010: free buddy page recovery: Delayed Reviewed-by: Naoya Horiguchi Acked-by: Andi Kleen Signed-off-by: Wanpeng Li --- mm/memory

[PATCH v3 4/4] mm/hwpoison: fix the lack of one reference count against poisoned page

2013-09-17 Thread Wanpeng Li
: [ 94.710860] Injecting memory failure at pfn 215b68 [ 94.710885] MCE 0x215b68: dirty LRU page recovery: Recovered Reviewed-by: Naoya Horiguchi Acked-by: Andi Kleen Signed-off-by: Wanpeng Li --- mm/hwpoison-inject.c |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff

[PATCH v3 2/4] mm/hwpoison: fix miss catch transparent huge page

2013-09-17 Thread Wanpeng Li
ecovery: Delayed [ 105.722303] MCE: Software-unpoisoned page 0x23a000 Reviewed-by: Naoya Horiguchi Acked-by: Andi Kleen Signed-off-by: Wanpeng Li --- mm/memory-failure.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/mm/memory-failure.c b/mm/memory-failure.c index e28ee77..ed41

[PATCH 3/4] mm/hwpoison: fix false report 2nd try page recovery

2013-09-02 Thread Wanpeng Li
200010 [ 346.332189] MCE 0x200010: free buddy, 2nd try page recovery: Delayed After patch: [ 297.742600] Injecting memory failure at pfn 200010 [ 297.742941] MCE 0x200010: free buddy page recovery: Delayed Signed-off-by: Wanpeng Li --- mm/memory-failure.c |6 -- 1 files changed, 4

[PATCH 4/4] mm/hwpoison: fix the lack of one reference count against poisoned page

2013-09-02 Thread Wanpeng Li
patch: [ 94.710860] Injecting memory failure at pfn 215b68 [ 94.710885] MCE 0x215b68: dirty LRU page recovery: Recovered Signed-off-by: Wanpeng Li --- mm/hwpoison-inject.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mm/hwpoison-inject.c b/mm/hwpoison-inject.c

[PATCH 2/4] mm/hwpoison: fix miss catch transparent huge page

2013-09-02 Thread Wanpeng Li
3a200: huge page recovery: Delayed [ 140.355100] MCE: Memory failure is now running on 0x23a200 After patch: [ 94.290793] Injecting memory failure at pfn 23a000 [ 94.290800] MCE 0x23a000: huge page recovery: Delayed [ 105.722303] MCE: Software-unpoisoned page 0x23a000 Signed-off-by: Wanpe

[PATCH 1/4] mm/hwpoison: fix traverse hugetlbfs page to avoid printk flood

2013-09-02 Thread Wanpeng Li
Signed-off-by: Wanpeng Li --- mm/madvise.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mm/madvise.c b/mm/madvise.c index 6975bc8..539eeb9 100644 --- a/mm/madvise.c +++ b/mm/madvise.c @@ -343,10 +343,11 @@ static long madvise_remove(struct vm_area_struct *vma,

[PATCH 3/3] mm/vmalloc: move VM_UNINITIALIZED just before show_numa_info

2013-09-02 Thread Wanpeng Li
that some messages still can be dumped via /proc/vmallocinfo. Signed-off-by: Wanpeng Li --- mm/vmalloc.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/mm/vmalloc.c b/mm/vmalloc.c index e3ec8b4..c4720cd 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -2590,11 +2590,6

[PATCH 1/3] mm/vmalloc: don't set area->caller twice

2013-09-02 Thread Wanpeng Li
The caller address has already been set in set_vmalloc_vm(), there's no need to set it again in __vmalloc_area_node. Signed-off-by: Wanpeng Li --- mm/vmalloc.c | 1 - 1 file changed, 1 deletion(-) diff --git a/mm/vmalloc.c b/mm/vmalloc.c index 1074543..d78d117 100644 --- a/mm/vmalloc.c

[PATCH 2/3] mm/vmalloc: don't warning vmalloc allocation failure twice

2013-09-02 Thread Wanpeng Li
Don't warning twice in __vmalloc_area_node and __vmalloc_node_range if __vmalloc_area_node allocation failure. Signed-off-by: Wanpeng Li --- mm/vmalloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/vmalloc.c b/mm/vmalloc.c index ee41cc6..e324d38 100644 ---

[PATCH v2 3/4] mm/hwpoison: fix false report 2nd try page recovery

2013-09-02 Thread Wanpeng Li
200010 [ 346.332189] MCE 0x200010: free buddy, 2nd try page recovery: Delayed After patch: [ 297.742600] Injecting memory failure at pfn 200010 [ 297.742941] MCE 0x200010: free buddy page recovery: Delayed Reviewed-by: Naoya Horiguchi Signed-off-by: Wanpeng Li --- mm/memory-failure.c |6

[PATCH v2 4/4] mm/hwpoison: fix the lack of one reference count against poisoned page

2013-09-02 Thread Wanpeng Li
patch: [ 94.710860] Injecting memory failure at pfn 215b68 [ 94.710885] MCE 0x215b68: dirty LRU page recovery: Recovered Reviewed-by: Naoya Horiguchi Signed-off-by: Wanpeng Li --- mm/hwpoison-inject.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mm/hwpoison

[PATCH v2 1/4] mm/hwpoison: fix traverse hugetlbfs page to avoid printk flood

2013-09-02 Thread Wanpeng Li
iewed-by: Naoya Horiguchi Signed-off-by: Wanpeng Li --- mm/madvise.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mm/madvise.c b/mm/madvise.c index 6975bc8..539eeb9 100644 --- a/mm/madvise.c +++ b/mm/madvise.c @@ -343,10 +343,11 @@ static long madvise_remove(struct vm_a

[PATCH v2 2/4] mm/hwpoison: fix miss catch transparent huge page

2013-09-02 Thread Wanpeng Li
ecovery: Delayed [ 105.722303] MCE: Software-unpoisoned page 0x23a000 Signed-off-by: Wanpeng Li --- mm/memory-failure.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/memory-failure.c b/mm/memory-failure.c index e28ee77..b114570 100644 --- a/mm/memory-failure.c +++ b/mm/

[PATCH v2 2/3] mm/vmalloc: don't warning vmalloc allocation failure twice

2013-09-02 Thread Wanpeng Li
Don't warning twice in __vmalloc_area_node and __vmalloc_node_range if __vmalloc_area_node allocation failure. Signed-off-by: Wanpeng Li --- mm/vmalloc.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/mm/vmalloc.c b/mm/vmalloc.c index d78d117..e3ec8b4 100644 ---

[PATCH v2 1/3] mm/vmalloc: don't set area->caller twice

2013-09-02 Thread Wanpeng Li
Changelog: * rebase against mmotm tree The caller address has already been set in set_vmalloc_vm(), there's no need to set it again in __vmalloc_area_node. Signed-off-by: Wanpeng Li --- mm/vmalloc.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/mm/vmalloc.c

[PATCH v2 3/3] mm/vmalloc: move VM_UNINITIALIZED just before show_numa_info

2013-09-02 Thread Wanpeng Li
some messages still can be dumped via /proc/vmallocinfo. Signed-off-by: Wanpeng Li --- mm/vmalloc.c | 10 +- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/mm/vmalloc.c b/mm/vmalloc.c index e3ec8b4..c4720cd 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -2590,11 +2590,6

[PATCH v3 2/3] mm/vmalloc: revert "mm/vmalloc.c: emit the failure message before return"

2013-09-02 Thread Wanpeng Li
Changelog: *v2 -> v3: revert commit 46c001a2 directly Don't warning twice in __vmalloc_area_node and __vmalloc_node_range if __vmalloc_area_node allocation failure. This patch revert commit 46c001a2 (mm/vmalloc.c: emit the failure message before return). Signed-off-by: Wanpeng Li

[PATCH v3 3/3] mm/vmalloc: revert "mm/vmalloc.c: check VM_UNINITIALIZED flag in s_show instead of show_numa_info"

2013-09-02 Thread Wanpeng Li
tch move the check just before show_numa_info in order that some messages still can be dumped via /proc/vmallocinfo. This patch revert commit d157a558 (mm/vmalloc.c: check VM_UNINITIALIZED flag in s_show instead of show_numa_info); Signed-off-by: Wanpeng Li --- mm/vmalloc.c | 10 +- 1 f

[PATCH v3 1/3] mm/vmalloc: don't set area->caller twice

2013-09-02 Thread Wanpeng Li
Changelog: *v1 -> v2: rebase against mmotm tree The caller address has already been set in set_vmalloc_vm(), there's no need to set it again in __vmalloc_area_node. Reviewed-by: Zhang Yanfei Signed-off-by: Wanpeng Li --- mm/vmalloc.c | 1 - 1 file changed, 1 deletion(-) diff --

[PATCH v4 4/4] mm/vmalloc: don't assume vmap_area w/o VM_VM_AREA flag is vm_map_ram allocation

2013-09-03 Thread Wanpeng Li
va->flags |= VM_LAZY_FREE The assumption is introduced by commit: d4033afd(mm, vmalloc: iterate vmap_area_list, instead of vmlist, in vmallocinfo()). This patch fix it by drop the assumption and keep not dump vm_map_ram allocation information as the logic before that

[PATCH v4 2/4] mm/vmalloc: revert "mm/vmalloc.c: emit the failure message before return"

2013-09-03 Thread Wanpeng Li
Changelog: *v2 -> v3: revert commit 46c001a2 directly Don't warning twice in __vmalloc_area_node and __vmalloc_node_range if __vmalloc_area_node allocation failure. This patch revert commit 46c001a2 (mm/vmalloc.c: emit the failure message before return). Signed-off-by: Wanpeng Li

[PATCH v4 3/4] mm/vmalloc: revert "mm/vmalloc.c: check VM_UNINITIALIZED flag in s_show instead of show_numa_info"

2013-09-03 Thread Wanpeng Li
tch move the check just before show_numa_info in order that some messages still can be dumped via /proc/vmallocinfo. This patch revert commit d157a558 (mm/vmalloc.c: check VM_UNINITIALIZED flag in s_show instead of show_numa_info); Signed-off-by: Wanpeng Li --- mm/vmalloc.c | 10 +- 1 f

[PATCH v4 1/4] mm/vmalloc: don't set area->caller twice

2013-09-03 Thread Wanpeng Li
Changelog: *v1 -> v2: rebase against mmotm tree The caller address has already been set in set_vmalloc_vm(), there's no need to set it again in __vmalloc_area_node. Reviewed-by: Zhang Yanfei Signed-off-by: Wanpeng Li --- mm/vmalloc.c | 1 - 1 file changed, 1 deletion(-) diff --

[PATCH v5 2/4] mm/vmalloc: revert "mm/vmalloc.c: emit the failure message before return"

2013-09-03 Thread Wanpeng Li
d-off-by: Wanpeng Li --- mm/vmalloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/vmalloc.c b/mm/vmalloc.c index d78d117..e3ec8b4 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -1635,7 +1635,7 @@ void *__vmalloc_node_range(unsigned long size, unsigned lo

  1   2   3   4   5   6   7   8   9   10   >