diff options
author | Steven Rostedt <rostedt@goodmis.org> | 2016-07-14 17:55:21 -0400 |
---|---|---|
committer | Sasha Levin <alexander.levin@verizon.com> | 2016-07-20 11:35:52 -0400 |
commit | 52c84a95dc6af6c9e856c6a0f7745fd19afccd4e (patch) | |
tree | 741de7e72d6e23606abdc7c181373523b44e2ca1 /mm/swap.c | |
parent | da3e7add10e11c1ed81b11e95213fc3aace2aedd (diff) | |
download | linux-stable-52c84a95dc6af6c9e856c6a0f7745fd19afccd4e.tar.gz linux-stable-52c84a95dc6af6c9e856c6a0f7745fd19afccd4e.tar.bz2 linux-stable-52c84a95dc6af6c9e856c6a0f7745fd19afccd4e.zip |
4.1.28 Fix bad backport of 8f182270dfec "mm/swap.c: flush lru pvecs on compound page arrival"
When I pulled in 4.1.28 into my stable 4.1-rt tree and ran the tests,
it crashed with a severe OOM killing everything. I then tested 4.1.28
without -rt and it had the same issue. I did a bisect between 4.1.27
and 4.1.28 and found that the bug started at:
commit 8f182270dfec "mm/swap.c: flush lru pvecs on compound page
arrival"
Looking at that patch and what's in mainline, I see that there's a
mismatch in one of the hunks:
Mainline:
@@ -391,9 +391,8 @@ static void __lru_cache_add(struct page *page)
struct pagevec *pvec = &get_cpu_var(lru_add_pvec);
get_page(page);
- if (!pagevec_space(pvec))
+ if (!pagevec_add(pvec, page) || PageCompound(page))
__pagevec_lru_add(pvec);
- pagevec_add(pvec, page);
put_cpu_var(lru_add_pvec);
}
Stable 4.1.28:
@@ -631,9 +631,8 @@ static void __lru_cache_add(struct page *page)
struct pagevec *pvec = &get_cpu_var(lru_add_pvec);
page_cache_get(page);
- if (!pagevec_space(pvec))
+ if (!pagevec_space(pvec) || PageCompound(page))
__pagevec_lru_add(pvec);
- pagevec_add(pvec, page);
put_cpu_var(lru_add_pvec);
}
Where mainline replace pagevec_space() with pagevec_add, and stable did
not.
Fixing this makes the OOM go away.
Note, 3.18 has the same bug.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Diffstat (limited to 'mm/swap.c')
-rw-r--r-- | mm/swap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/swap.c b/mm/swap.c index 9ccec11ed3fb..e657ba642e5e 100644 --- a/mm/swap.c +++ b/mm/swap.c @@ -623,7 +623,7 @@ static void __lru_cache_add(struct page *page) struct pagevec *pvec = &get_cpu_var(lru_add_pvec); page_cache_get(page); - if (!pagevec_space(pvec) || PageCompound(page)) + if (!pagevec_add(pvec, page) || PageCompound(page)) __pagevec_lru_add(pvec); put_cpu_var(lru_add_pvec); } |