Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp2227239ybi; Mon, 1 Jul 2019 08:20:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqwfwuN6c5/OLAFX+HkSuT9XrYy4VjnhVop41rTmhJAgTAAU+DHhxX7scXctgfleViNRqz4r X-Received: by 2002:a63:3d09:: with SMTP id k9mr24988764pga.321.1561994436879; Mon, 01 Jul 2019 08:20:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561994436; cv=none; d=google.com; s=arc-20160816; b=E6BCD/UU8FGJ7nBqYoMm4C0KFmzBuqfLrg9c0XEF+Lk9e+4e7ixMDtyF+ueX7Tochx aGz8y4J0cubapHXN5lPH5gnGEkwqDlUhdVr5WQJMJqdt9JA1rj/GqTb14BMLimul0rVV wqwf51OwfKaFrVnzUtXSSW72h6zggpC8gUh+QcZqjMVvIpEdViViEH2+hHDowo1dhSMH xeJO0v5O4ir1JvTslYc20JVq28DQGyP7rGUtdfXuMeTiRPM795ms6KDP3X/XUaWizEdf nxylkQZdp9yTJ7uPqhmg3OVBkDWN5vdA5CZqxymOu9fCkAjyDdVeBduFGYE1DgBD0B2I 8m2g== 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; bh=w0VI24MunDSPULjn1w4xJ2RakkuV8gfIqZVFxUPHrOA=; b=ruDLu74g5XNpUu8udMOWO7ZHo/W5ZVzb+5LaR0BELGkTnvGvxgwXhIr0Y5DauzhLiT fDU/TAWvJTAg8wFJtrFq7+Y34ncaJGilTyUEO/4myKC1IzrQd50wp33KDmIFz3c0VLxX k8I3syKgj+6puImceQO+JPaWIzQulryaUb9vWSl+RGfWjTcZWqLtJa8cN6XNiLjcslfs Oodo3vOkozoz1+axz6wWx5NnPObKjaqYjgSEMhi6LDgE6RWDAn8R09OtDBPUkoU5h3QU R2UHr6F4m6N8UE/VrVaMrzzOJZcAC0Z0DFX2TAtI17ZgoSIv8I51kEaW29lBsroehOdf jpNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=DGvYhSgf; 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 31si10635881plk.342.2019.07.01.08.20.19; Mon, 01 Jul 2019 08:20:36 -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=bombadil.20170209 header.b=DGvYhSgf; 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 S1729211AbfGANoC (ORCPT + 99 others); Mon, 1 Jul 2019 09:44:02 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:44128 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727038AbfGANoB (ORCPT ); Mon, 1 Jul 2019 09:44:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.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=w0VI24MunDSPULjn1w4xJ2RakkuV8gfIqZVFxUPHrOA=; b=DGvYhSgfU3SNTQxT9W023jL+W IDOzDEXTEqB6mo2GHK7m8awhXIJRyGFoznTAeBSXVjtRdDOxZFktbNdblf9FvWaRZhgdv6wdlqXi1 SX7/VTmP+B+mFHF900CIHUn5XrTaPGzymXe5auc8yZTlh+ZXA/nKp4+aCQ+Qe52JO3eszB5FpbijT leNaNOxCRnr56gK+v5f/+fmxEw9tuq1JxsbPYdsZn6GX3huoB9W+9RI4Wjs6Zb2rWiLdLxbuIj1Zf mHJ+MpQmjaRC6il1CgrJEATXIAk5AIP96Erx5Zm3aNttlPkeDzm45rY5J5/Ayxi2WKAzcZy7ygRhz hjQ7/t2OA==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.92 #3 (Red Hat Linux)) id 1hhwav-00066b-TU; Mon, 01 Jul 2019 13:43:46 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 9F9AB20A18921; Mon, 1 Jul 2019 15:43:43 +0200 (CEST) Date: Mon, 1 Jul 2019 15:43:43 +0200 From: Peter Zijlstra To: Viresh Kumar Cc: Ingo Molnar , linux-kernel@vger.kernel.org, Vincent Guittot , tkjos@google.com, Daniel Lezcano , quentin.perret@linaro.org, chris.redpath@arm.com, steven.sistare@oracle.com, subhra.mazumdar@oracle.com, songliubraving@fb.com Subject: Re: [PATCH V3 0/2] sched/fair: Fallback to sched-idle CPU in absence of idle CPUs Message-ID: <20190701134343.GT3402@hirez.programming.kicks-ass.net> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 26, 2019 at 10:36:28AM +0530, Viresh Kumar wrote: > Hi, > > We try to find an idle CPU to run the next task, but in case we don't > find an idle CPU it is better to pick a CPU which will run the task the > soonest, for performance reason. > > A CPU which isn't idle but has only SCHED_IDLE activity queued on it > should be a good target based on this criteria as any normal fair task > will most likely preempt the currently running SCHED_IDLE task > immediately. In fact, choosing a SCHED_IDLE CPU over a fully idle one > shall give better results as it should be able to run the task sooner > than an idle CPU (which requires to be woken up from an idle state). > > This patchset updates both fast and slow paths with this optimization. So this basically does the trivial SCHED_IDLE<-* wakeup preemption test; one could consider doing the full wakeup preemption test instead. Now; the obvious argument against doing this is cost; esp. the cgroup case is very expensive I suppose. But it might be a fun experiment to try. That said; I'm tempted to apply these patches..