From: "Zhang, Tianfei" <tianfei.zhang@intel.com>
To: David Rientjes <rientjes@google.com>
Cc: "gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
"mhocko@suse.com" <mhocko@suse.com>,
"arve@android.com" <arve@android.com>,
"anton.vorontsov@linaro.org" <anton.vorontsov@linaro.org>,
"kirill.shutemov@linux.intel.com"
<kirill.shutemov@linux.intel.com>,
"riandrews@android.com" <riandrews@android.com>,
"devel@driverdev.osuosl.org" <devel@driverdev.osuosl.org>,
"Wu, Fengguang" <fengguang.wu@intel.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH RESEND v2 1/1] fix a dead loop when in heavy low memory
Date: Tue, 29 Dec 2015 04:58:11 +0000 [thread overview]
Message-ID: <BA6F50564D52C24884F9840E07E32DEC2A971B2D@CDSMSX102.ccr.corp.intel.com> (raw)
In-Reply-To: <alpine.DEB.2.10.1512271715260.11689@chino.kir.corp.google.com>
> However, it appears that the same process, dTi-lm, is still chosen for oom kill
> because lowmem_deathpending_timeout has expired.
>
> So this looks like a problem if the constantly chosen process cannot exit.
> It would have been helpful to have the stack of pid 27289 in the log to see
> where it was stuck. But I think it may be unrelated to
> lowmem_deathpending_timeout itself. We'd be better off selecting a
> different process to kill with something like this:
>
> 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
> @@ -128,11 +128,15 @@ static unsigned long lowmem_scan(struct shrinker
> *s, struct shrink_control *sc)
> if (!p)
> continue;
>
> - if (test_tsk_thread_flag(p, TIF_MEMDIE) &&
> - time_before_eq(jiffies, lowmem_deathpending_timeout)) {
> - task_unlock(p);
> - rcu_read_unlock();
> - return 0;
> + if (test_tsk_thread_flag(p, TIF_MEMDIE)) {
> + if (time_before_eq(jiffies,
> + lowmem_deathpending_timeout)) {
> + task_unlock(p);
> + rcu_read_unlock();
> + return 0;
> + }
> + /* Need to select a different process to kill */
> + continue;
> }
> oom_score_adj = p->signal->oom_score_adj;
> if (oom_score_adj < min_score_adj) {
>
> But we need more information. Please make sure that
> lowmem_debug_level is 1, try to get a complete kernel log, and if possible
> please try to capture the stack of the process that can't exit (use
> /proc/<pid>/stack) before trying the above patch.
Hi Rientjes:
I re-test the monkey stress test on your patches, it seems better than current mainline code.
The kernel log is a little big, more than 10 MB. I send to you directly.
Best
tianfei
next prev parent reply other threads:[~2015-12-29 4:58 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-27 9:14 Figo Zhang
2015-12-27 3:58 ` Greg KH
2015-12-27 6:47 ` Zhang, Tianfei
2015-12-28 1:27 ` David Rientjes
2015-12-29 4:58 ` Zhang, Tianfei [this message]
-- strict thread matches above, loose matches on Subject: below --
2015-12-27 8:34 Figo.zhang
2015-12-27 0:55 ` Greg KH
2015-12-27 8:18 Figo.zhang
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=BA6F50564D52C24884F9840E07E32DEC2A971B2D@CDSMSX102.ccr.corp.intel.com \
--to=tianfei.zhang@intel.com \
--cc=anton.vorontsov@linaro.org \
--cc=arve@android.com \
--cc=devel@driverdev.osuosl.org \
--cc=fengguang.wu@intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mhocko@suse.com \
--cc=riandrews@android.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
all inboxes | Powered by JetHome®