Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2497627imm; Mon, 28 May 2018 09:12:00 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJlNA//l4gY3Fe5zI0jet4pH+qFVIMsL2KkXEQftvmtsBdJHZPeOL74Vxw5d5THiHXkmgq9 X-Received: by 2002:a62:fc8d:: with SMTP id e135-v6mr9091305pfh.208.1527523919984; Mon, 28 May 2018 09:11:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527523919; cv=none; d=google.com; s=arc-20160816; b=Zy3+PWsV6KL/R3UHwr8yAL2t3q0yk+jEihCmcc0Dab8SmHj4lBg0GgZ/hhFELsy+jA blFi6bWMw2jzPpDkFdBJ3PVJAj5OUQuerg9U4KkiKTyW8Box6gs59KrwmopcgNXP4aF5 6FZgt47O9AJv0gvwEj7Mtwn9XNF3sZASa6AW+irX9O1lf4Obotp6rNT+7bci37GikTfy gtQ2uaugAGXbpY2Ao7LxGVys5r8RPtHO6QoPylfjpw5r6Zfr+wgm50JsoAA/EOJzWWua fgUN2A8W+osBufce9KQEeg63zbY4IpmSNkimFj2szUYtsgfrs1tR52z6sFSr74qy49bB ZMTA== 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:arc-authentication-results; bh=CTOTSpwSOqibbM1Ml3H6lGPaSvYOuYsTf3axu7rr57A=; b=U5KzIgfo1GD8BQSVjS072/uOxM/HWf0Afq1VxVpAxQV2H023qPBrMm7Y8ii0SQUAHo J6eXo/8C4fHYWucbe3RXhyTv74R2TKQO5HbU15LEHBk5EZl8grjnR0zEyvFu7RWIkaje tUvGOUSHDjR04dD2IihpEb/sCnuce3HCctUmwbrKk6u0Q+PltSujm9HyQBAoFP+99dmD fwv9dl2C9hpTOU4B11OJNG5PAEP5pvmFuzjopHaQbx8+HwB1F3T3mq24iiJcb3SuhxSv FhRDOVlnAQh14xWT3qFmKrLawzgoHXJH1HM+qv5br3afq5/mJnOjHrXSXpn7u+8RpZUu JXTQ== ARC-Authentication-Results: i=1; mx.google.com; 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 p7-v6si23746224pga.473.2018.05.28.09.11.45; Mon, 28 May 2018 09:11:59 -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; 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 S933462AbeE1QLL (ORCPT + 99 others); Mon, 28 May 2018 12:11:11 -0400 Received: from 9pmail.ess.barracuda.com ([64.235.150.225]:59148 "EHLO 9pmail.ess.barracuda.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933391AbeE1QLF (ORCPT ); Mon, 28 May 2018 12:11:05 -0400 Received: from mipsdag03.mipstec.com (mail3.mips.com [12.201.5.33]) by mx27.ess.sfj.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA256 bits=128 verify=NO); Mon, 28 May 2018 16:10:18 +0000 Received: from mipsdag02.mipstec.com (10.20.40.47) by mipsdag03.mipstec.com (10.20.40.48) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1415.2; Mon, 28 May 2018 09:10:23 -0700 Received: from localhost (10.20.78.231) by mipsdag02.mipstec.com (10.20.40.47) with Microsoft SMTP Server id 15.1.1415.2 via Frontend Transport; Mon, 28 May 2018 09:10:22 -0700 Date: Mon, 28 May 2018 09:10:17 -0700 From: Paul Burton To: Peter Zijlstra CC: , 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: <20180528161017.ttgdusrzypvkga5w@pburton-laptop> 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> <20180528155306.GU12180@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20180528155306.GU12180@hirez.programming.kicks-ass.net> User-Agent: NeoMutt/20180512 X-BESS-ID: 1527523818-637137-26662-297717-1 X-BESS-VER: 2018.6-r1805181819 X-BESS-Apparent-Source-IP: 12.201.5.33 X-BESS-Outbound-Spam-Score: 0.00 X-BESS-Outbound-Spam-Report: Code version 3.2, rules version 3.2.2.193454 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------- 0.00 BSF_BESS_OUTBOUND META: BESS Outbound X-BESS-Outbound-Spam-Status: SCORE=0.00 using account:ESS59374 scores of KILL_LEVEL=7.0 tests=BSF_BESS_OUTBOUND X-BESS-BRTS-Status: 1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Peter, On Mon, May 28, 2018 at 05:53:06PM +0200, Peter Zijlstra wrote: > 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. Thanks a bunch! Paul