Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp4038859ybh; Tue, 6 Aug 2019 05:25:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqzdWK7R6GcDzPshXfdOGLrSBYaBeFmspwm7HquOZNTxlkXlA4Jz0Eijio8JWgcsA9AnbZfy X-Received: by 2002:a63:481c:: with SMTP id v28mr2831055pga.50.1565094341234; Tue, 06 Aug 2019 05:25:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565094341; cv=none; d=google.com; s=arc-20160816; b=x+P2L1lt7iAvS67RIhK/ejMf1QM54CtroQmWrtVLQZvJfYMlYFncuTlf+NtIoi9TWi FS/HK1ITkp+EwFBsr1h8UfsTxELTSV7nWtfM2FEhHAiJOZ4PzzQIfTSN+rlBI8xbOIFR Wti+8xxym2uLwhV5I/LqgZjA+oBr8UD3loCN8yRIIF4wYYdjyygdegQE89eI6r1w8L6M M147+jVNQvQMFVupTyqSD7+AMoyjxyJ7zIfewRFn8QJDutdJtMbgH34CheztLyS2YEb7 BHuV7habrX3wUD38Ix542jZ0fyRHriOhEDHFcA50T2Uj5jU4hNHl8oYuYjcnpAIm1Kcx AYcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=+OtseeKLSiM3o2ZCafh2q89vJhJltkIdOIzMnLRVtP4=; b=xLnkmNZOL1ym+nTYwy4QtEcxTB5m8cXNlCvX5RCsd6O8Gx8bnvwTUTb0ifYtt/I8IJ UUdbVYAwPM3oYv243ErwBkUeOHPQGvKQkMAlaKSDerreP7zpNfD5lYVH2sz3+SZGhqy2 y3IAJNETJ1cwVydXKwGiNtAjAwUD/izyha451wleklwcwyyPhbwF0IU5xrRxZ1EUHivx Qu30SQhAFyEWvd2zkxhGypG/nSCgKj49efzxy+eOzG7yuGP6y+nl4n/1X3cRbJsdTgRR wYgSwCchuEsFyOQTzX2tSUKLnuR+MAlBjswVbo8koAGiA/qBIHYaJ3Jv15h2IJdu1Qu+ FIwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@digitalocean.com header.s=google header.b=X9kZZAea; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=digitalocean.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y71si43922402pgd.271.2019.08.06.05.25.25; Tue, 06 Aug 2019 05:25:41 -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=pass header.i=@digitalocean.com header.s=google header.b=X9kZZAea; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=digitalocean.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728560AbfHFMY3 (ORCPT + 99 others); Tue, 6 Aug 2019 08:24:29 -0400 Received: from mail-ot1-f67.google.com ([209.85.210.67]:46777 "EHLO mail-ot1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726036AbfHFMY3 (ORCPT ); Tue, 6 Aug 2019 08:24:29 -0400 Received: by mail-ot1-f67.google.com with SMTP id z23so63591870ote.13 for ; Tue, 06 Aug 2019 05:24:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=digitalocean.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=+OtseeKLSiM3o2ZCafh2q89vJhJltkIdOIzMnLRVtP4=; b=X9kZZAeawbYIt+4ShKknt0vQ/h0Xz8bq70+1ovNArQ/0LHG+mJXv6X1cjLavzyzIb2 4R8RZ7ob7yPl0gS1hcvVB1ASuKHgAcPwUSXPoPLf+OzESICI9LrRQvQnowSkMRWZE0Wk ZXfY2tKmm95YP1ZpZj8heCaeKiqV7ShI70lLQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=+OtseeKLSiM3o2ZCafh2q89vJhJltkIdOIzMnLRVtP4=; b=KCrNZnfvPeC2kzqLPGbx3olg7SnRud8muAyryFk5FYZhcDvDq6+4TohCdLT8KAj1wJ rUKhvC7eShFLb5Ad4Q2tD8sUNs9BR3pNvsnyxzG8SeUTMDOzUFWyE/hdmLe0YPOkxawz WBQcPOvtg72o8ij174gGUvY2jBrXei2PXesw1Qg+75hFxvRhukt41pUXD/E5Wp2cTLLm csYZHpjdqp5UXHVebsjVy9gZ8TwlD+UxKX8drvH+y5FbZjy/uXRQP1A0ygjj90sp0aJl PNqAUuF6MChj1cM8HvOXwt2QB9/aRplCxFM9chvgzwyIfvCjjVmMDXQq49JTGMBeIhId KgJA== X-Gm-Message-State: APjAAAW0V6zFlqJNhKdu38Zpj5Q7Y4Mwl+Y9FHfTlS9Ac7RIxZFwr+40 uJL5m7u4nfFE7Wn1YiYjb8XPteP9uPGMoXVBOUVas43e X-Received: by 2002:a9d:5788:: with SMTP id q8mr2706168oth.237.1565094268049; Tue, 06 Aug 2019 05:24:28 -0700 (PDT) MIME-Version: 1.0 References: <20190613032246.GA17752@sinkpad> <20190619183302.GA6775@sinkpad> <20190718100714.GA469@aaronlu> <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> In-Reply-To: <54fa27ff-69a7-b2ac-6152-6915f78a57f9@linux.alibaba.com> From: Vineeth Remanan Pillai Date: Tue, 6 Aug 2019 08:24:17 -0400 Message-ID: Subject: Re: [RFC PATCH v3 00/16] Core scheduling v3 To: Aaron Lu Cc: Aubrey Li , Tim Chen , Julien Desfossez , "Li, Aubrey" , Subhra Mazumdar , Nishanth Aravamudan , Peter Zijlstra , Ingo Molnar , Thomas Gleixner , Paul Turner , Linus Torvalds , Linux List Kernel Mailing , =?UTF-8?B?RnLDqWTDqXJpYyBXZWlzYmVja2Vy?= , Kees Cook , Greg Kerr , Phil Auld , Valentin Schneider , Mel Gorman , Pawan Gupta , Paolo Bonzini Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > > > I also think a way to make fairness per cookie per core, is this what you > > want to propose? > > Yes, that's what I meant. I think that would hurt some kind of workloads badly, especially if one tenant is having way more tasks than the other. Tenant with more task on the same core might have immediate requirements from some threads than the other and we would fail to take that into account. With some hierarchical management, we can alleviate this, but as Aaron said, it would be a bit messy. 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. 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. Thanks, Vineeth