Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp4163183ybh; Tue, 6 Aug 2019 07:18:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqywnnVclwPZoF31j8XutJpF63JEAGAbnMasbDzUWNtLD+dR56k0AtLaAGJeYxpop+Vqy77E X-Received: by 2002:aa7:9514:: with SMTP id b20mr3967826pfp.223.1565101094610; Tue, 06 Aug 2019 07:18:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565101094; cv=none; d=google.com; s=arc-20160816; b=JmdTxcxA0fb9JsahbItHDzZT0n9rKXV603aiVfXLdeeFkWmCBDNPMJtEy37cxeqHpT a7wegGLLHQeN8gJIn3Ti66KC5ATV2CMljGPgHsYPBRDds7QQ3GULgDrYs3QUFqEmmcZQ 878rzZ5y62f5s/c9SqnDLa1pd28nzTZCRzO0JSjAkpoNbvzp+7BNwq+FZvBIw9TOBrga /ep6VTHRmNgVd5qLYeMsKw7LMtNafb/4K8AZPyJop8Qiq+9eP9UF5sxzpQ2SDKsFlgOr qn1uITIJuO7wDEmvRhurQ1Wx93McnbV8XZHXmOcJYU4Mp8b3MYIM83kRvmfvSxTx5ZnW r+Mw== 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=zO8VA8eX4wC7dRJeySQSxsRPrO+enpiYoyXKbRd3Ah4=; b=if8jmp7Xgc1xdaE8YwWQNtqvjTcatAR/dP6XhusVYSaxtS+0EYdn6qQQbJWeUlX0rp kFgnEOtKdPbpF3cxUtcRCBrU3JXv0/7UYjS+sn+4QHO3WP8OVAUsFpKYYE28bqczTdjF 8QVS1vz14OTbxVDIOAW7kxITLE1+yuKHFm7o1eCdGv31sMuHUmk0h5Ff5l7pSHtu4bqM m82ZptCbGfVYzF3qQEDVYDMC21WphJTNoEBpTjlJJZGHsImw4ySJ1fIbOk3B9UuwMgum 29JCfa0HLoZn/8AGaBOdNYi2nreA/AnGy3JaC+xnzAhIAz52+xjRegc/hdJJ7d8YoR8b vlvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=QR0eZq93; 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 v2si14695103pjy.48.2019.08.06.07.17.58; Tue, 06 Aug 2019 07:18:14 -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=QR0eZq93; 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 S1732935AbfHFOQ6 (ORCPT + 99 others); Tue, 6 Aug 2019 10:16:58 -0400 Received: from merlin.infradead.org ([205.233.59.134]:60786 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726834AbfHFOQ6 (ORCPT ); Tue, 6 Aug 2019 10:16:58 -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=zO8VA8eX4wC7dRJeySQSxsRPrO+enpiYoyXKbRd3Ah4=; b=QR0eZq93VudrR3V1sn01qUGTp 7YpSYFDVy1rT2i1JWIuEcHExlrCLneGqqKg5TW1zggG1C0Qil1nuxqt2FMgEcd4/HRpk66HLS31cn Vjm6pS00r1EDZxCaD3id3vUOEQ/2jriTfAGGpV7G/Yxbt/KA4DAosItfmD87UjTPsn2dfx2brbI+D wF6dH4/ltbVujPJZXhRTyDCGDQLE7k1g7bn3Zf4BkStw3Y3YQ5iO0RqDxvCcpZpNPAfqn4E4JWWL4 vM2LVyG/R8a2ndDDmAYys1j+CnrDVDS6J8XsnfxAcFl4Bp0BOHSS3TtkrRFSfW8uCKRgjji8bIosH kK68KZK/Q==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.92 #3 (Red Hat Linux)) id 1hv0GD-0003Jd-1c; Tue, 06 Aug 2019 14:16:21 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id C3ADC3077DD; Tue, 6 Aug 2019 16:15:51 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 26633201B4C6E; Tue, 6 Aug 2019 16:16:17 +0200 (CEST) Date: Tue, 6 Aug 2019 16:16:17 +0200 From: Peter Zijlstra To: Vineeth Remanan Pillai Cc: Aaron Lu , Aubrey Li , Tim Chen , Julien Desfossez , "Li, Aubrey" , Subhra Mazumdar , Nishanth Aravamudan , Ingo Molnar , Thomas Gleixner , Paul Turner , Linus Torvalds , Linux List Kernel Mailing , =?iso-8859-1?Q?Fr=E9d=E9ric?= Weisbecker , Kees Cook , Greg Kerr , Phil Auld , Valentin Schneider , Mel Gorman , Pawan Gupta , Paolo Bonzini Subject: Re: [RFC PATCH v3 00/16] Core scheduling v3 Message-ID: <20190806141617.GR2332@hirez.programming.kicks-ass.net> References: <20190725143003.GA992@aaronlu> <20190726152101.GA27884@sinkpad> <7dc86e3c-aa3f-905f-3745-01181a3b0dac@linux.intel.com> <20190802153715.GA18075@sinkpad> <20190806032418.GA54717@aaronlu> <54fa27ff-69a7-b2ac-6152-6915f78a57f9@linux.alibaba.com> 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 Tue, Aug 06, 2019 at 08:24:17AM -0400, Vineeth Remanan Pillai wrote: > Peter's rebalance logic actually takes care of most of the runq > imbalance caused > due to cookie tagging. What we have found from our testing is, fairness issue is > caused mostly due to a Hyperthread going idle and not waking up. Aaron's 3rd > patch works around that. As Julien mentioned, we are working on a per thread > coresched idle thread concept. The problem that we found was, idle thread causes > accounting issues and wakeup issues as it was not designed to be used in this > context. So if we can have a low priority thread which looks like any other task > to the scheduler, things becomes easy for the scheduler and we achieve security > as well. Please share your thoughts on this idea. What accounting in particular is upset? Is it things like select_idle_sibling() that thinks the thread is idle and tries to place tasks there? It should be possible to change idle_cpu() to not report a forced-idle CPU as idle. (also; it should be possible to optimize select_idle_sibling() for the core-sched case specifically) > The results are encouraging, but we do not yet have the coresched idle > to not spin 100%. We will soon post the patch once it is a bit more > stable for running the tests that we all have done so far. There's play_idle(), which is the entry point for idle injection. In general, I don't particularly like 'fake' idle threads, please be very specific in describing what issues it works around such that we can look at alternatives.