From: Waiman Long <longman@redhat.com>
To: Peter Zijlstra <peterz@infradead.org>, Ingo Molnar <mingo@redhat.com>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
Andrew Morton <akpm@linux-foundation.org>,
Phil Auld <pauld@redhat.com>
Subject: Re: [PATCH] sched/core: Don't use dying mm as active_mm for kernel threads
Date: Fri, 26 Jul 2019 21:58:11 -0400 [thread overview]
Message-ID: <b89697ed-a7f0-bb41-25ae-8e9727875d33@redhat.com> (raw)
In-Reply-To: <20190726234541.3771-1-longman@redhat.com>
On 7/26/19 7:45 PM, Waiman Long wrote:
> It was found that a dying mm_struct where the owning task has exited can
> stay on as active_mm of kernel threads as long as no other user tasks
> run on those CPUs that use it as active_mm. This prolongs the life time
> of dying mm holding up memory and other resources that cannot be freed.
>
> Fix that by forcing the kernel threads to use init_mm as the active_mm
> if the previous active_mm is dying.
>
> Signed-off-by: Waiman Long <longman@redhat.com>
> ---
> kernel/sched/core.c | 13 +++++++++++--
> mm/init-mm.c | 2 ++
> 2 files changed, 13 insertions(+), 2 deletions(-)
Sorry, I didn't realize that mm->owner depends on CONFIG_MEMCG. I will
need to refresh the patch and send out v2 when I am done testing.
Cheers,
Longman
next prev parent reply other threads:[~2019-07-27 1:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-26 23:45 [PATCH] sched/core: Don't use dying mm as active_mm for kernel threads Waiman Long
2019-07-27 1:58 ` Waiman Long [this message]
2019-07-28 4:04 ` kbuild test robot
2019-07-28 4:18 ` kbuild test robot
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=b89697ed-a7f0-bb41-25ae-8e9727875d33@redhat.com \
--to=longman@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mingo@redhat.com \
--cc=pauld@redhat.com \
--cc=peterz@infradead.org \
/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