Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2481197imm; Mon, 28 May 2018 08:55:08 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoiRcpZRUISXSUbmlYe7Qv/obHwH7FBP9gSIgDKqsQXXQKeTMD1i2MUxmV6AVf705WaS0Nm X-Received: by 2002:a62:6c3:: with SMTP id 186-v6mr13877401pfg.151.1527522907951; Mon, 28 May 2018 08:55:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527522907; cv=none; d=google.com; s=arc-20160816; b=Tn+a5HrYnK0g6pvTjexjy2oav/d/vSKtvDJYbEt+vJx2mrord1A8DAxPF/b3lUZmJU oXAe93OlD2PRS8PbN8l5gjrjjl/8nGyPJim+NRPkAKAkViH3Km/obi6CFXcTfl1HeAuC lrRFpsq2hSbKoXgpZw3PjuZxnlNGvpScYvqFW6jJH9Cj3nTX88JoiS4lS3DfsO0rO1gE FUtZbZLdmGkS3/jEYfCy8zgugONqHbwRjPsv6JMby4456omthZFjU1lpDeW6AtnQ/1be gVmyiCyazbKj6r6rrXZHw2NwUA4rVT/6PTqnlq0q/h6vnYQ7D/e54lWXc/aAjjh+PKDt rJfw== 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=MILkkyA9eIH9WlWhYYxHx56WH1Jb4u4bUrXas7OKg4M=; b=eQ1WeRh3Wnh7vZnsoLrA/rUoLXNK1MELwZVoxSjkBJNV9HiOU++BNfxWQcVzk7yBD3 qK+hgS40QRH+38qJIz1QRvNaXrN7tKrCmZih3RrAh3H/Km8HGjZ1lW0mBROeM9Cz9o+J TAYJix7FVK0QvnEYqDjM2/cxjGWh3Hx5WXZLZO2K/Njt2zAbUdek91B9706sihmFeG+v srOLtv6vIcsMJ8hW190yRKV7kC+O2vDYy/z0qj+Ua6R1Oy+zej4oTmOaFgjHQLZpjZ2q c6KnhI+nkdmX+y7/a6nsLGYXmK2EQ3nMgzfNNz5uk335onaQfoNbIaqUHNyp+61nF93j Z2tw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=3ibrJuFo; 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 z18-v6si30125857pfd.357.2018.05.28.08.54.53; Mon, 28 May 2018 08:55:07 -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=3ibrJuFo; 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 S1425193AbeE1PxY (ORCPT + 99 others); Mon, 28 May 2018 11:53:24 -0400 Received: from merlin.infradead.org ([205.233.59.134]:49440 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1425182AbeE1PxT (ORCPT ); Mon, 28 May 2018 11:53:19 -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=MILkkyA9eIH9WlWhYYxHx56WH1Jb4u4bUrXas7OKg4M=; b=3ibrJuFolyZNupWfLWNF9Ccf9 Wn5gJ6GdnOxbscPPGkPKWtSenAgWsRkXazXyW4ec/lsiPuFyBYdXDRlQ6SQQ76hrCNszKzgXFh0Ou S0hNaUh5XCrRkutXp32oB+sm5570FKRLVdrnxL+lZFrTgVvTSrFHVdNr/USibYjNRrrdWGhj/acmx gzC/8s61NzHY5HG4qZqf7BLgo7kB/dXOu7Y0UiDGSfAN6TkMEfLKMe6tkD1h1o0FkKNaVVSiS5Str 4fW5CnNHUHJ1fvtenUAUZMAROn3YNRVD4DxXU6+DE7L5LinSjfg3b+hDfK5hEdLOCZJhWKs7P+8Ub ve4t73eCA==; 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 1fNKSL-0003cY-GX; Mon, 28 May 2018 15:53:09 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id DF8CB2029F86E; Mon, 28 May 2018 17:53:06 +0200 (CEST) Date: Mon, 28 May 2018 17:53:06 +0200 From: Peter Zijlstra To: Paul Burton Cc: linux-kernel@vger.kernel.org, Thomas Gleixner , Ingo Molnar , Paul McKenney , Tejun Heo Subject: Re: [PATCH 1/2] sched: Make select_task_rq() require cpu_active() for user tasks Message-ID: <20180528155306.GU12180@hirez.programming.kicks-ass.net> References: <20180526154648.11635-1-paul.burton@mips.com> <20180526154648.11635-2-paul.burton@mips.com> <20180528144924.GE12217@hirez.programming.kicks-ass.net> <20180528154516.c54b37ygekcn3p4g@pburton-laptop> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180528154516.c54b37ygekcn3p4g@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:45:16AM -0700, Paul Burton wrote: > > --- a/kernel/sched/core.c > > +++ b/kernel/sched/core.c > > @@ -1562,7 +1562,7 @@ int select_task_rq(struct task_struct *p > > * not worry about this generic constraint ] > > */ > > if (unlikely(!cpumask_test_cpu(cpu, &p->cpus_allowed) || > > - !cpu_online(cpu))) > > + (is_per_cpu_kthread(p) ? !cpu_online(cpu) : !cpu_active(cpu))) > > cpu = select_fallback_rq(task_cpu(p), p); > > > > return cpu; > > Yes this looks good to me. > > Are you planning to submit your change to introduce > is_per_cpu_kthread(), or shall I? I've got the lot; I just need to write a better changelog for my old (now rebased) patch and make a small note in your patch, but will feed them to Ingo when done.