* [PATCH] Staging: android: replace oomkilladj with oom_adj
@ 2009-06-18 17:02 Alexander Beregalov
2009-06-18 17:10 ` David Rientjes
0 siblings, 1 reply; 2+ messages in thread
From: Alexander Beregalov @ 2009-06-18 17:02 UTC (permalink / raw)
To: gregkh, linux-kernel; +Cc: rientjes, Alexander Beregalov
Commit 2ff05b2b (oom: move oom_adj value from task_struct to mm_struct)
changed it.
Fix build.
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
---
drivers/staging/android/lowmemorykiller.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/staging/android/lowmemorykiller.c b/drivers/staging/android/lowmemorykiller.c
index fe72240..e34dc38 100644
--- a/drivers/staging/android/lowmemorykiller.c
+++ b/drivers/staging/android/lowmemorykiller.c
@@ -103,7 +103,7 @@ static int lowmem_shrink(int nr_to_scan, gfp_t gfp_mask)
task_unlock(p);
continue;
}
- oom_adj = p->oomkilladj;
+ oom_adj = p->mm->oom_adj;
if (oom_adj < min_adj) {
task_unlock(p);
continue;
--
1.6.3.1
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] Staging: android: replace oomkilladj with oom_adj
2009-06-18 17:02 [PATCH] Staging: android: replace oomkilladj with oom_adj Alexander Beregalov
@ 2009-06-18 17:10 ` David Rientjes
0 siblings, 0 replies; 2+ messages in thread
From: David Rientjes @ 2009-06-18 17:10 UTC (permalink / raw)
To: Alexander Beregalov; +Cc: Greg Kroah-Hartman, Andrew Morton, linux-kernel
On Thu, 18 Jun 2009, Alexander Beregalov wrote:
> Commit 2ff05b2b (oom: move oom_adj value from task_struct to mm_struct)
> changed it.
> Fix build.
>
Andrew had already sent this fix to Greg, thanks.
I'm about to merge "oom: move oom_adj value from task_struct to
mm_struct", and this fixup is needed to repair linux-next's
drivers/staging/android/lowmemorykiller.c.
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
drivers/staging/android/lowmemorykiller.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff -puN drivers/staging/android/lowmemorykiller.c~oom-move-oom_adj-value-from-task_struct-to-mm_struct-fix drivers/staging/android/lowmemorykiller.c
--- a/drivers/staging/android/lowmemorykiller.c~oom-move-oom_adj-value-from-task_struct-to-mm_struct-fix
+++ a/drivers/staging/android/lowmemorykiller.c
@@ -96,19 +96,21 @@ static int lowmem_shrink(int nr_to_scan,
read_lock(&tasklist_lock);
for_each_process(p) {
+ struct mm_struct *mm;
int oom_adj;
task_lock(p);
- if (!p->mm) {
+ mm = p->mm;
+ if (!mm) {
task_unlock(p);
continue;
}
- oom_adj = p->oomkilladj;
+ oom_adj = mm->oom_adj;
if (oom_adj < min_adj) {
task_unlock(p);
continue;
}
- tasksize = get_mm_rss(p->mm);
+ tasksize = get_mm_rss(mm);
task_unlock(p);
if (tasksize <= 0)
continue;
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-06-18 17:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-18 17:02 [PATCH] Staging: android: replace oomkilladj with oom_adj Alexander Beregalov
2009-06-18 17:10 ` David Rientjes
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®