Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1355639
| From | Lu Bing <albert.lubing@hisilicon.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] android: lmk: add swap pte pmd in tasksize |
| Date | 2016-03-11 08:30 +0100 |
| Message-ID | <rbpGi-2IW-11@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
From: l00215322 <albert.lubing@hisilicon.com> Many android devices have zram,so we should add "MM_SWAPENTS" in tasksize. Refer oom_kill.c,we add pte&pmd also. Reviewed-by: Chen Feng <puck.chen@hisilicon.com> Reviewed-by: Fu Jun <oliver.fu@hisilicon.com> Reviewed-by: Xu YiPing <xuyiping@hisilicon.com> Reviewed-by: Yu DongBin <yudongbin@hisilicon.com> Signed-off-by: Lu Bing <albert.lubing@hisilicon.com> --- drivers/staging/android/lowmemorykiller.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/staging/android/lowmemorykiller.c b/drivers/staging/android/lowmemorykiller.c index 8b5a4a8..0817d3b 100644 --- a/drivers/staging/android/lowmemorykiller.c +++ b/drivers/staging/android/lowmemorykiller.c @@ -139,7 +139,9 @@ static unsigned long lowmem_scan(struct shrinker *s, struct shrink_control *sc) task_unlock(p); continue; } - tasksize = get_mm_rss(p->mm); + tasksize = get_mm_rss(p->mm) + + get_mm_counter(p->mm, MM_SWAPENTS) + + atomic_long_read(&p->mm->nr_ptes) + mm_nr_pmds(p->mm); task_unlock(p); if (tasksize <= 0) continue; -- 1.8.3.2
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH] android: lmk: add swap pte pmd in tasksize Lu Bing <albert.lubing@hisilicon.com> - 2016-03-11 08:30 +0100
Re: [PATCH] android: lmk: add swap pte pmd in tasksize yalin wang <yalin.wang2010@gmail.com> - 2016-03-11 08:40 +0100
Re: [PATCH] android: lmk: add swap pte pmd in tasksize Chen Feng <puck.chen@hisilicon.com> - 2016-03-11 10:10 +0100
Re: [PATCH] android: lmk: add swap pte pmd in tasksize Greg KH <gregkh@linuxfoundation.org> - 2016-03-11 18:20 +0100
Re: [PATCH] android: lmk: add swap pte pmd in tasksize Chen Feng <puck.chen@hisilicon.com> - 2016-03-14 02:30 +0100
csiph-web