From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Zijlstra Subject: Re: [PATCH v1] kthread/smpboot: Serialize kthread parking against wakeup Date: Wed, 6 Jun 2018 17:22:45 +0200 Message-ID: <20180606152245.GH12180@hirez.programming.kicks-ass.net> References: <830d7225-af90-a55a-991a-bb2023d538f1@codeaurora.org> <55221a5b-dd52-3359-f582-86830dd9f205@codeaurora.org> <20180605150841.GA24053@redhat.com> <20180605152212.GY12180@hirez.programming.kicks-ass.net> <20180605154053.GB12235@hirez.programming.kicks-ass.net> <20180605163515.GB24053@redhat.com> <20180605201316.GZ12198@hirez.programming.kicks-ass.net> <20180606135115.GA4609@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20180606135115.GA4609@redhat.com> Sender: linux-kernel-owner@vger.kernel.org To: Oleg Nesterov Cc: "Kohli, Gaurav" , tglx@linutronix.de, mpe@ellerman.id.au, mingo@kernel.org, bigeasy@linutronix.de, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Neeraj Upadhyay , Will Deacon List-Id: linux-arm-msm@vger.kernel.org On Wed, Jun 06, 2018 at 03:51:16PM +0200, Oleg Nesterov wrote: > On 06/05, Peter Zijlstra wrote: > > > > Also, I think we still need TASK_PARKED as a special state for that. > > I think it would be nice to kill the TASK_PARKED state altogether. But I don't > know how. I'll try to look at this code later, but I am not sure I will find a > way to cleanup it... So the nice thing about having TASK_PARKED is that it guarantees no spurious wakeups. You know the thread will not wake up while it's CPU is gone. We could possibly re-purpose TASK_STOPPED (because kernel threads don't do that) but that seems dodgy at best.