Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp6277951ybe; Wed, 18 Sep 2019 00:26:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqxjkP5v9N+jXmhyTGPhOSYfKKT3807X4Naa7pXEhWKsvfNFdgCOUcEub5oolBY6684EIuk5 X-Received: by 2002:aa7:c759:: with SMTP id c25mr8688274eds.15.1568791608242; Wed, 18 Sep 2019 00:26:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568791608; cv=none; d=google.com; s=arc-20160816; b=FDkFihH+EbWou6J8I4xA2kA4/Wg2s0n9n4R0lOQbpR3acWv18a0lvOKVkAhExobzEN L+OdnFy+9hFahGhqIZpwILPGMn020B4xKcG9INQ7E6CWu7OjuApfUv/wYAMuBRf3Z7DJ Ft1+Psq5Cx0uap1KSohzwFx/490VymDalxzYb0/dCLTRUFcOHVzTRG/PzlnBL3h7lVLf izTaoJ0cuvv5YojdctghKn7FULD935U086IrUtMDA+FwV1Oz96kOrlNlbAFPBKu0n8pI AdLzRNpzCzSHvloQdrJbq5Nm5ExFDmVConlIdXFGDS4UcRKedBe+nu2uaQi+ntOnyOgr 5erw== 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=oACsSltggDwFvHAR00vC/fD11NPczKv/oiLF+OBDplc=; b=kUjsqMMqwW5frjR4Jolm7/+YklPe8e4FUslJ7+4VefgfiIUcMYdr/PXjsL56kBntXt PmqmX1LsI9NYPHqDZh2Jfnujh7wuSM7eYm2xknvm4Ktci2uAYurekQ2Oihrh/nQRbYjL 2hGScOIc9+Hg7SRVMeHGTGueQuwJyAj31ObIkrfDfpFjHN73A2dNh0Z1JiMN4SHcQL4j Q9/HMqwTQRuEYhgy9jErn+3Cff5BD8ZeK8XTwB3HdaqVXe+19YLLAoNvF1FcWKMDnC+Y UUXWIUPSKudD0XMQCw53lOJubIEK04YpzgFVzzij9e59Yk0tEDvk7y8gTrsepNdlmx/c MU4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=iGjZti6c; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p17si2441840ejb.163.2019.09.18.00.26.23; Wed, 18 Sep 2019 00:26:48 -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=@gmail.com header.s=20161025 header.b=iGjZti6c; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728665AbfIRBeD (ORCPT + 99 others); Tue, 17 Sep 2019 21:34:03 -0400 Received: from mail-lj1-f195.google.com ([209.85.208.195]:45167 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726829AbfIRBeD (ORCPT ); Tue, 17 Sep 2019 21:34:03 -0400 Received: by mail-lj1-f195.google.com with SMTP id q64so5443166ljb.12 for ; Tue, 17 Sep 2019 18:34:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=oACsSltggDwFvHAR00vC/fD11NPczKv/oiLF+OBDplc=; b=iGjZti6cvwAgVLoBPDMEogRYfcGpd8FRi0SfNAM8Aw4Ugo3cLvJzQBc3U4DWUyNvC0 SzHdILPIj1PKvKfLEiqApoBR3YBDHUwwkNtg3oqsau7a22aMr88w7ATnLski3vleZZGp dQ/9VV9xXI9dEnAa9bhjqzAaaY7gFChg/O1G865hLYuId8sJlrlnFNSDFz0kRgkNBHZR 9zWfDDPWaamPLXkZO51qX6Cg2xqxTLlUtKAGYEWjOyRbGG7R/YGQBk7goZUeIlncuNS1 DbD15EPWX5XEVQWVeS+uMTPLkZZ0ck5n0WbdDYCVpmZxZGvI5oGdKgz4AD/m/lDDNZ98 rx6g== 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=oACsSltggDwFvHAR00vC/fD11NPczKv/oiLF+OBDplc=; b=sgf7nj+iYlRbZZVZ/nKJy/L6edwabRu4xSxcoRATKYJQaskerAu15TmXYHWXypMkAL c+fNxqkzrjNdpyKpvTwy6oomk9jNhQNlN4utHvaPl2VC/TRnWYLqFImAHm27MPHZTdF9 4kt7B5mxutHCqXm4z0LG5dXHcL1R7utGBndWeddFvtn5H4hyOOqXT8+hMw0QgwnbXQ2D FxaiVbLUAkKdBLH8K6ZvOYQpskOyBcH1t/exhnFAlgphG1YyPuOuZuuKXYlIQVekHv7I jkHlk0Fv3uC0HN09SbIMvMoiwYJPLRt6Yihx/W7rIQflvjcqBrx5tNZzOU7X1OxhzBcS Y1hg== X-Gm-Message-State: APjAAAUHVaV2/k4YzuWe6meJ/Y8YQHYOhBQdeMlwz+4Ef0nKd94Q3KOx gUHMd4j4sDFV6XXBsmPi3EqfO9Ebf+ANd95++hk= X-Received: by 2002:a2e:3c14:: with SMTP id j20mr634473lja.84.1568770439623; Tue, 17 Sep 2019 18:33:59 -0700 (PDT) MIME-Version: 1.0 References: <20190726152101.GA27884@sinkpad> <7dc86e3c-aa3f-905f-3745-01181a3b0dac@linux.intel.com> <20190802153715.GA18075@sinkpad> <69cd9bca-da28-1d35-3913-1efefe0c1c22@linux.intel.com> <20190911140204.GA52872@aaronlu> <7b001860-05b4-4308-df0e-8b60037b8000@linux.intel.com> <20190912120400.GA16200@aaronlu> <20190915141402.GA1349@aaronlu> In-Reply-To: <20190915141402.GA1349@aaronlu> From: Aubrey Li Date: Wed, 18 Sep 2019 09:33:48 +0800 Message-ID: Subject: Re: [RFC PATCH v3 00/16] Core scheduling v3 To: Aaron Lu Cc: Tim Chen , Julien Desfossez , Dario Faggioli , "Li, Aubrey" , Subhra Mazumdar , Vineeth Remanan Pillai , 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 On Sun, Sep 15, 2019 at 10:14 PM Aaron Lu wrote: > > On Fri, Sep 13, 2019 at 07:12:52AM +0800, Aubrey Li wrote: > > On Thu, Sep 12, 2019 at 8:04 PM Aaron Lu wrote: > > > > > > On Wed, Sep 11, 2019 at 09:19:02AM -0700, Tim Chen wrote: > > > > On 9/11/19 7:02 AM, Aaron Lu wrote: > > > > I think Julien's result show that my patches did not do as well as > > > > your patches for fairness. Aubrey did some other testing with the same > > > > conclusion. So I think keeping the forced idle time balanced is not > > > > enough for maintaining fairness. > > > > > > Well, I have done following tests: > > > 1 Julien's test script: https://paste.debian.net/plainh/834cf45c > > > 2 start two tagged will-it-scale/page_fault1, see how each performs; > > > 3 Aubrey's mysql test: https://github.com/aubreyli/coresched_bench.git > > > > > > They all show your patchset performs equally well...And consider what > > > the patch does, I think they are really doing the same thing in > > > different ways. > > > > It looks like we are not on the same page, if you don't mind, can both of > > you rebase your patchset onto v5.3-rc8 and provide a public branch so I > > can fetch and test it at least by my benchmark? > > I'm using the following branch as base which is v5.1.5 based: > https://github.com/digitalocean/linux-coresched coresched-v3-v5.1.5-test > > And I have pushed Tim's branch to: > https://github.com/aaronlu/linux coresched-v3-v5.1.5-test-tim > > Mine: > https://github.com/aaronlu/linux coresched-v3-v5.1.5-test-core_vruntime > > The two branches both have two patches I have sent previouslly: > https://lore.kernel.org/lkml/20190810141556.GA73644@aaronlu/ > Although it has some potential performance loss as pointed out by > Vineeth, I haven't got time to rework it yet. In terms of these two branches, we tested two cases: 1) 32 AVX threads and 32 mysql threads on one core(2 HT) 2) 192 AVX threads and 192 mysql threads on 96 cores(192 HTs) For case 1), we saw two branches is on par Branch: coresched-v3-v5.1.5-test-core_vruntime -Avg throughput:: 1865.62 (std: 20.6%) -Avg latency: 26.43 (std: 8.3%) Branch: coresched-v3-v5.1.5-test-tim - Avg throughput: 1804.88 (std: 20.1%) - Avg latency: 29.78 (std: 11.8%) For case 2), we saw core vruntime performs better than counting forced idle time Branch: coresched-v3-v5.1.5-test-core_vruntime - Avg throughput: 5528.56 (std: 44.2%) - Avg latency: 165.99 (std: 45.2%) Branch: coresched-v3-v5.1.5-test-tim -Avg throughput:: 3842.33 (std: 35.1%) -Avg latency: 306.99 (std: 72.9%) As Aaron pointed out, vruntime is with se's weight, which could be a reason for the difference. So should we go with core vruntime approach? Or Tim - do you want to improve forced idle time approach? Thanks, -Aubrey