[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87sefcxg8r.ffs@tglx>
Date: Tue, 21 Oct 2025 20:27:16 +0200
From: Thomas Gleixner <tglx@...utronix.de>
To: Peter Zijlstra <peterz@...radead.org>
Cc: LKML <linux-kernel@...r.kernel.org>, Gabriele Monaco
<gmonaco@...hat.com>, Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
Michael Jeanson <mjeanson@...icios.com>, Jens Axboe <axboe@...nel.dk>,
"Paul E. McKenney" <paulmck@...nel.org>, "Gautham R. Shenoy"
<gautham.shenoy@....com>, Florian Weimer <fweimer@...hat.com>, Tim Chen
<tim.c.chen@...el.com>, TCMalloc Team <tcmalloc-eng@...gle.com>
Subject: Re: [patch 16/19] sched/mmcid: Provide CID ownership mode fixup
functions
On Mon, Oct 20 2025 at 11:27, Peter Zijlstra wrote:
> On Wed, Oct 15, 2025 at 07:29:54PM +0200, Thomas Gleixner wrote:
>
>> +static bool mm_cid_fixup_task_to_cpu(struct task_struct *t, struct mm_struct *mm)
>> +{
>> + /* Remote access to mm::mm_cid::pcpu requires rq_lock */
>> + guard(task_rq_lock)(t);
>> + if (t->mm != mm)
>> + return false;
>
> I'm slightly confused about this one; I'm assuming it is a double check
> of mm for the VM_CLONE case below, once before lock once after. Except,
> none of the scheduler locks actually serialize t->mm ...
>
> IIRC the only way to actually change ->mm is exec(), and that is under
> task_lock().
Right. That's also where the task removed itself from CID
management. Let me look at that again.
Powered by blists - more mailing lists