Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3234884imm; Tue, 29 May 2018 03:42:14 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKVFK9L+0rbGST8O8kf60mRWrJtCNwyvEoEix3lmCudduv7EHu9PCa4hZui8oWuLCWaS4gK X-Received: by 2002:a62:4f4f:: with SMTP id d76-v6mr5649620pfb.188.1527590534019; Tue, 29 May 2018 03:42:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527590533; cv=none; d=google.com; s=arc-20160816; b=qN9iUbiSGfzGJGr+GAlHEBJdxoKy0kBtVF7qzfKpKWYSnJtuJ+1bUfNYcvSr2C6vbp BUf2AHR+s6ZxY4EwgfE4+mkRjxwtZNyL4+gfvw9U+vQPtAyNDcOX4gxZkonAfWDjTQvx dGPi71z3I+EqCwg6EwWDmuFjOXADPyXDRVIARNiwqYuECcLMQsbE2bsyfoPlcUMZNwfi Wh9qG1iVlhxdiRCMPTVB93JevgfFfKS47fyUltp5vYsqjl4pha44eDKt05hoTPkdTIzj ymY9I4Lmdl5Rkp+nebxT/N4PUH1pAJPFFaFQmk4LIGqb8+t2++BL2g1C0n4Ac19fL2mm w2LQ== 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=1od3J3ia0FbyTTT8NXioNWcXzciu19B24Rp3zGkA0Ek=; b=CDGndSYdkb4LK1puXHihfQqk0kRlnCOp+tFoJ3IGzNFi9wyAxN0IM9qIRIh+TefJu0 h1ToglzThN6qI+CZjDXKP3ytrwU5zPBFbD1/H4Zx6A+9imd+WXgKtE5bJX6v9j0Cx4iR YcmbI+lxhSfNHgsC6p5BZOCRIk7U6XGzLplrmYmV2zRXrE5Mr1lp228MXGQAzB/Me+Nh WOPzc8GHTA8QWTuL4zdwYsJEfQt2HvAkxfxfOsvYcehRmmow5AdpwZ8USYBlEQLC+GmK OWZu2ZFig/m6tKvDanTDky5eU0tl4F95sMROxII7We+vwSX64mVviFOB7u8mgszMi11K 60vQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=0K/ihZmL; 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 m11-v6si10934437pga.530.2018.05.29.03.41.59; Tue, 29 May 2018 03:42:13 -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=0K/ihZmL; 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 S932854AbeE2KlH (ORCPT + 99 others); Tue, 29 May 2018 06:41:07 -0400 Received: from merlin.infradead.org ([205.233.59.134]:33510 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932629AbeE2KlC (ORCPT ); Tue, 29 May 2018 06:41:02 -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=1od3J3ia0FbyTTT8NXioNWcXzciu19B24Rp3zGkA0Ek=; b=0K/ihZmLwULn4tN02kYD11Z8C sahxSqwwfjPyvO5uJYom5X65qMZ2HQLV9z5eOkC2RSBI7gbbodOW3xAHZ5yo+MyA1zskdUbvx847O 8dAd9jl1zEwxDyjH5CCYamR/4RXrYlQaMfyWip5fe5eCQLe5gjXV3t4dgvPMXUZAdxc3bvwBvR7bG A5Ws7bEgy4jpUrVLXwFPy7USraTk4XzAYTHdxTKwVFo6sJq+QThAPrIUCifhiLT35jRZbA7XlU0pz x+tRT9psluwVQmif6BbcU4nvC4Wwe4UbgOloCe4JOQizBejNjFYQqc3PveJ+JKiKQ0YoYG8+MVLLW leaU0Hrqw==; 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 1fNc3h-0007LF-NJ; Tue, 29 May 2018 10:40:54 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 90DED2029F869; Tue, 29 May 2018 12:40:50 +0200 (CEST) Date: Tue, 29 May 2018 12:40:50 +0200 From: Peter Zijlstra To: Paul Burton Cc: linux-kernel@vger.kernel.org, Thomas Gleixner , Ingo Molnar Subject: Re: [PATCH 2/2] sched: Warn if we fail to migrate a task Message-ID: <20180529104050.GY12180@hirez.programming.kicks-ass.net> References: <20180526154648.11635-1-paul.burton@mips.com> <20180526154648.11635-3-paul.burton@mips.com> <20180528150656.GF12217@hirez.programming.kicks-ass.net> <20180528155932.rcyipmxc5kshjvsy@pburton-laptop> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180528155932.rcyipmxc5kshjvsy@pburton-laptop> 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 Mon, May 28, 2018 at 08:59:32AM -0700, Paul Burton wrote: > I agree userspace shouldn't need to care about this but in my case > (using the test program I linked from the previous patch) this triggers > whilst the CPU is being brought online, not taken offline. That means > migrate_tasks() is not involved, and we actually just return from here > back out from a sched_setaffinity syscall & continue running the user > task on a CPU that is no longer present in the task's cpus_allowed. > > I can't think of a good qualifier to limit the warning to only trigger > in that scenario though, so in reality perhaps we're best to just trust > that with patch 1 applied the problem will go away. Yeah, I'm struggling too.. re-taking task_rq_lock and testing if task_cpu(p) is inside it's own cpus_allowed (which at that time might be different from new_mask) might be the best we can do, but it is fairly expensive for a sanity check.