[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190729153825.GI31398@hirez.programming.kicks-ass.net>
Date: Mon, 29 Jul 2019 17:38:25 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Waiman Long <longman@...hat.com>
Cc: Ingo Molnar <mingo@...hat.com>, linux-kernel@...r.kernel.org,
linux-mm@...ck.org, Andrew Morton <akpm@...ux-foundation.org>,
Phil Auld <pauld@...hat.com>,
Will Deacon <will.deacon@...nel.org>,
Rik van Riel <riel@...riel.com>,
Andy Lutomirski <luto@...nel.org>
Subject: Re: [PATCH v2] sched/core: Don't use dying mm as active_mm of
kthreads
On Mon, Jul 29, 2019 at 11:22:16AM -0400, Waiman Long wrote:
> On 7/29/19 10:27 AM, Peter Zijlstra wrote:
> > Also; why then not key off that owner tracking to free the resources
> > (and leave the struct mm around) and avoid touching this scheduling
> > hot-path ?
>
> The resources are pinned by the reference count. Making a special case
> will certainly mess up the existing code.
>
> It is actually a problem for systems that are mostly idle. Only the
> kernel->kernel case needs to be updated. If the CPUs isn't busy running
> user tasks, a little bit more overhead shouldn't really hurt IMHO.
But when you cannot find a new owner; you can start to strip mm_struct.
That is, what's stopping you from freeing swap reservations when that
happens?
That is; I think the moment mm_users drops to 0, you can destroy the
actual addres space. But you have to keep mm_struct around until
mm_count goes to 0.
This is going on the comments with mmget() and mmgrab(); they forever
confuse me.
Powered by blists - more mailing lists