From: Andrew Morton <akpm@linux-foundation.org>
To: David Rientjes <rientjes@google.com>
Cc: Randy Dunlap <randy.dunlap@oracle.com>,
linux-kernel@vger.kernel.org, Greg KH <gregkh@suse.de>
Subject: Re: mmotm 2009-06-02-16-11 uploaded (staging)
Date: Tue, 2 Jun 2009 21:56:37 -0700 [thread overview]
Message-ID: <20090602215637.c582d66f.akpm@linux-foundation.org> (raw)
In-Reply-To: <alpine.DEB.2.00.0906022132490.26434@chino.kir.corp.google.com>
On Tue, 2 Jun 2009 21:45:15 -0700 (PDT) David Rientjes <rientjes@google.com> wrote:
> On Tue, 2 Jun 2009, Randy Dunlap wrote:
>
> > drivers/staging/android/lowmemorykiller.c:106: error: 'struct task_struct' has no member named 'oomkilladj'
> >
>
> Thanks Randy.
>
> This is due to oom-move-oom_adj-value-from-task_struct-to-mm_struct.patch
> which was merged in mmotm early this morning.
>
> I had previously fixed this in an earlier version of the patch series, but
> people didn't agree that an oom killer change should touch staging files
> even though the Android lowmemorykiller is in both mmotm and git HEAD.
> See http://marc.info/?l=linux-kernel&m=124200164711314.
>
> I'm still a little curious about why it was decided like that since it
> seems to be the simplest way to avoid these failures, which leave you with
> a broken build, and an unnecessary burden on maintainers to magically fix
> them up later (which I guess is now?).
>
> So when I moved oomkilladj from struct task_struct to struct mm_struct and
> renamed it to something more appropriate, I still think I should have been
> able to change drivers/staging/android/lowmemorykiller.c for those
> reasons and avoid all of this hassle.
>
> Anyway, here's a patch that should work and will hopefully now be
> accepted. I know Greg is the maintainer for the staging tree and we're
> talking about mmotm, but I don't know how else to do it anymore.
I think there's been a miscommunication somewhere. Fixing the fallout
from a kernel-core change within the same patch is the correct thing to
do.
> diff --git a/drivers/staging/android/lowmemorykiller.c b/drivers/staging/android/lowmemorykiller.c
> --- a/drivers/staging/android/lowmemorykiller.c
> +++ b/drivers/staging/android/lowmemorykiller.c
> @@ -96,19 +96,21 @@ static int lowmem_shrink(int nr_to_scan, gfp_t gfp_mask)
>
> 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;
Thanks.
next prev parent reply other threads:[~2009-06-03 4:56 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-02 23:11 mmotm 2009-06-02-16-11 uploaded akpm
2009-06-03 3:54 ` mmotm 2009-06-02-16-11 uploaded (readahead) Randy Dunlap
2009-06-03 20:47 ` Andrew Morton
2009-06-04 1:25 ` KOSAKI Motohiro
2009-06-04 1:59 ` Wu Fengguang
2009-06-09 3:59 ` Jens Axboe
2009-06-09 4:38 ` Andrew Morton
2009-06-09 4:46 ` Jens Axboe
2009-06-09 4:51 ` Wu Fengguang
2009-06-09 11:01 ` Vladislav Bolkhovitin
2009-06-03 4:12 ` mmotm 2009-06-02-16-11 uploaded (staging) Randy Dunlap
2009-06-03 4:45 ` David Rientjes
2009-06-03 4:55 ` Greg KH
2009-06-03 4:56 ` Andrew Morton [this message]
2009-06-03 15:07 ` Randy Dunlap
2009-06-03 4:46 ` Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090602215637.c582d66f.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=randy.dunlap@oracle.com \
--cc=rientjes@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox