From: 朱辉 <zhuhui@xiaomi.com>
To: "Rik van Riel" <riel@redhat.com>, 朱辉 <zhuhui@xiaomi.com>,
"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
"rientjes@google.com" <rientjes@google.com>,
"vinayakm.list@gmail.com" <vinayakm.list@gmail.com>,
"weijie.yang@samsung.com" <weijie.yang@samsung.com>
Cc: "devel@driverdev.osuosl.org" <devel@driverdev.osuosl.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"teawater@gmail.com" <teawater@gmail.com>
Subject: Re: [PATCH] Fix the issue that lowmemkiller fell into a cycle that try to kill a task
Date: Tue, 14 Oct 2014 06:51:26 +0000 [thread overview]
Message-ID: <a42b1bc3882c4693ad8eadfa68659601@cnbox3.mioffice.cn> (raw)
In-Reply-To: <5422E474.4010001@redhat.com>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="gb2312", Size: 2057 bytes --]
2014 09 24 23:36, Rik van Riel:
> On 09/22/2014 10:57 PM, Hui Zhu wrote:
>> The cause of this issue is when free memroy size is low and a lot of task is
>> trying to shrink the memory, the task that is killed by lowmemkiller cannot get
>> CPU to exit itself.
>>
>> Fix this issue with change the scheduling policy to SCHED_FIFO if a task's flag
>> is TIF_MEMDIE in lowmemkiller.
>
> Is it actually true that the task that was killed by lowmemkiller
> cannot get CPU time?
I am so sorry that answer this mail late because I tried to do more test
around it.
But this issue is really hard to reproduce the issue. I got a special
app that can reproduce this issue easyly. But I still need retry a lot
of times to repdroduce this issue.
And I found that most of time, the task cannot be killed because it is
blocked by binder_lock.
It looks like there are something wrong with a task that get binder_lock
and it is blocked by another thing.
So I make a patch that change a binder_lock to binder_lock_killable to
handle this issue.(I will post it later)
It work sometime but I am not sure it is right.
And I just met one time, the kernel with the binder patch and without
the lowmemkiller SCHED_FIFO patch, a task that didn't blocked by a lock.
And different tasks call lowmemkiller tried to kill this task.
I think the root cause of this issue is killed task cannot get cpu.
But I just got this issue one time.
>
> It is also possible that the task is busy in the kernel, for example
> in the reclaim code, and is not breaking out of some loop fast enough,
> despite the TIF_MEMDIE flag being set.
>
> I suspect SCHED_FIFO simply papers over that kind of issue, by not
> letting anything else run until the task is gone, instead of fixing
> the root cause of the problem.
>
>
According to I introduction, I think lowmemkiller SCHED_FIFO patch maybe
can handle some issue.
Thanks,
Hui
ÿôèº{.nÇ+·®+%Ëÿ±éݶ\x17¥wÿº{.nÇ+·¥{±þG«éÿ{ayº\x1dÊÚë,j\a¢f£¢·hïêÿêçz_è®\x03(éÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?¨èÚ&£ø§~á¶iOæ¬z·vØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?I¥
prev parent reply other threads:[~2014-10-14 7:01 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-23 2:57 Hui Zhu
2014-09-23 4:17 ` Greg KH
2014-09-23 4:48 ` 朱辉
2014-09-23 8:00 ` Weijie Yang
2014-09-23 14:28 ` 朱辉
2014-09-23 22:24 ` David Rientjes
2014-09-24 15:34 ` Rik van Riel
2014-10-14 6:51 ` 朱辉 [this message]
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=a42b1bc3882c4693ad8eadfa68659601@cnbox3.mioffice.cn \
--to=zhuhui@xiaomi.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=riel@redhat.com \
--cc=rientjes@google.com \
--cc=teawater@gmail.com \
--cc=vinayakm.list@gmail.com \
--cc=weijie.yang@samsung.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®