Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp959481imm; Wed, 6 Jun 2018 08:23:56 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKyFXUlqVlbwe7YVzsKk4QnpkNqXbY9nyOZ4RHmV6oyWVDxxEaJe5yYlMwRvV2Ze0IXS79Z X-Received: by 2002:a17:902:a989:: with SMTP id bh9-v6mr3715163plb.245.1528298636595; Wed, 06 Jun 2018 08:23:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528298636; cv=none; d=google.com; s=arc-20160816; b=wfodbTPhE/VpQg28nd8ndxtRRsONfL3iYm72BiZC5WZVhs529lZ/DaO1wBa+SSuxW2 asyBTPqj31RPRv+TXAiJFIXa50Da+5Yq9y8ldE9utD25bON76W9LUZtK6EyVjWf2o4ue jGOrBWbs5Y5Kfw6zCMKwKQNtsgSy/tNeLzhCDubWsUvk8cGtc+sab2Os4TpPhZSdx4od O4MY+bshYFwGWLlz+nXr3VQZwfCweGEZvhmkKuh7dVUOmxp/D7d359rn5cKdVPWM5fj/ VEcloolCf2GEkRpA4Xq+P/19XbMK3rYRiBI2q+ebviW4sUFy3o01vKkDYulAZ626jJ2g w0ng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=yCouoFX15UfzGdjy5yLuhVsjjk/BxdMs9pdCR08ASv8=; b=y3T2F4OlEgyXYlDhFNkMLSqZzpO3bNpnZdPwhg026nNgsfoAUpQoW9BNcMXx5CmhQj WVQHaqNPHudH1+gsjlGheyY3GB3RArmsxGI2sm8g8TNpZCvFvmp6pSdJ9HpPOwISNAmW EG9KvyVLHBLF/eYe8jws558LPF8KiRU0HBvGJP75tSImpS1vZKwCa81h5VgeZfROo8UR zWV2rn8FbvKO76BJCR4IUX1kFSP/uqARJLzF9TPIDaJvnxEjxyphU7QkRitQwp2WFGye +PjSw/qz4x+4n/pP0px8dKpT5S31tkSMiY2C1nI5i59/U9zt8ISsAJl4VmUaPkZgby26 FxaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=Lm4+gAbX; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 18-v6si11774014pfv.135.2018.06.06.08.23.41; Wed, 06 Jun 2018 08:23:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=Lm4+gAbX; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932143AbeFFPW6 (ORCPT + 99 others); Wed, 6 Jun 2018 11:22:58 -0400 Received: from merlin.infradead.org ([205.233.59.134]:34058 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932068AbeFFPW5 (ORCPT ); Wed, 6 Jun 2018 11:22:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=yCouoFX15UfzGdjy5yLuhVsjjk/BxdMs9pdCR08ASv8=; b=Lm4+gAbXa1Ht3glrJMKdH6qjQ NEKefUSG4678Lqo5BJWGtR60FkBGBmvswIZjjEWA2wkzhAK2cZ4ND5Ji07QktyB8L3QoS/DABe/BN i3Cu0jeUTRdc/U6+M8RklfqlnuolNPby1dOJd4SgaPVv6LiSXY5ACD11KMzjKao1NqyAo4WcWZCxm X7MMP2lMPtZKo6inmD1UI09OmOURQQEeOr9JykEsjMIldS13w6ngabIUon3OzR/yo9KLMfMyxC88q 9zO8HSiwK22nfFQfsepPU1GbgxNjc5wHEuYcq8XzAwKB/jUcwOJUQT6+oosXRM8fftl75SQUtuZZz ghE076/mA==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1fQaGt-0007iK-5J; Wed, 06 Jun 2018 15:22:47 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 2F386201EA7A4; Wed, 6 Jun 2018 17:22:45 +0200 (CEST) Date: Wed, 6 Jun 2018 17:22:45 +0200 From: Peter Zijlstra 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 Subject: Re: [PATCH v1] kthread/smpboot: Serialize kthread parking against wakeup 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 Content-Disposition: inline In-Reply-To: <20180606135115.GA4609@redhat.com> User-Agent: Mutt/1.9.5 (2018-04-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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.