Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp4092480ybi; Fri, 19 Jul 2019 14:50:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqxUvn8AGZJctLl1KT/EfPP9MynUHAMvKotFHVkojPlt7NgLraIpFLY6PytfFX3UaZ55EOxb X-Received: by 2002:a17:902:7088:: with SMTP id z8mr60208449plk.125.1563573037801; Fri, 19 Jul 2019 14:50:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563573037; cv=none; d=google.com; s=arc-20160816; b=AagOcB1CWVi7gYDe6ZUVdrUtCVTCtwfy//hzLwBzoTtfbkIZIUyCvxohAQI3LnMB+t 54B8UJ90x9xtlcs1VvpuHP75uPilmoYqxqNMvtkwuhl4lj2Y3VXIjie3ik3oyWmAGeWT X0vqkzbuVa9aCKp0UryrTe3hhWSFEpcwvvW7lGr4dWVplmllYS/e9mSqEtPm1iY3YkWh gmUF8zs+lcp6M2R6CGHzeQvFXWkYkDJ7Ku1V8f1HAwLkayKNg2uzEr3NPtRKuXdzjDnt YhH67F+GBF7ItiHsRnvPWzPYybFmgFNPSYwli+WEnmpg0rgxsv81hAmixjmbJ5S31wQU RnEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:subject:autocrypt:openpgp:from:references:cc:to; bh=ATK8to+k5U+ulByN1KN3J4tA6FNBaN1T5YuCHpMpmFs=; b=Ady5GWEkp2f1Og3Yn/v/4J/cQohjcUzaltPBe1dQ4hcDxjd38gH01YY7yHfJS6Y9St O+b1TNzt+/EznFyTbBsvn2CfS4SezO+nCqgvqfHfo10PZ55chzgyWi3BsYDGmwR6eV9C LyZQbKUqUs8qGSz2M/z++EfiUFvo/N5YOYd8H20mwrSKsltVI30pV+4B2Ib4Wo2EoAP0 eLSmJhN2yon6h9X1Q6+wY6F7FRemy5NSrPSXoqRFzf6GBA0SGBD2bUlYd9WdZ2zyf9Ek 7Jv88Z+GQhGv9ayWo6+7ZLy6+zbbJQqQqOh56OZsXT9sKaOIoujgc8M2Fm5LSWlnrcOc OS5g== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i1si2847932pld.173.2019.07.19.14.50.20; Fri, 19 Jul 2019 14:50:37 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731694AbfGSSdF (ORCPT + 99 others); Fri, 19 Jul 2019 14:33:05 -0400 Received: from mga07.intel.com ([134.134.136.100]:37673 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729674AbfGSSdF (ORCPT ); Fri, 19 Jul 2019 14:33:05 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Jul 2019 11:33:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,283,1559545200"; d="scan'208";a="196027546" Received: from schen9-desk.jf.intel.com (HELO [10.54.74.162]) ([10.54.74.162]) by fmsmga002.fm.intel.com with ESMTP; 19 Jul 2019 11:33:04 -0700 To: Aaron Lu Cc: Julien Desfossez , Aubrey Li , 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 References: <20190531210816.GA24027@sinkpad> <20190606152637.GA5703@sinkpad> <20190612163345.GB26997@sinkpad> <635c01b0-d8f3-561b-5396-10c75ed03712@oracle.com> <20190613032246.GA17752@sinkpad> <20190619183302.GA6775@sinkpad> <20190718100714.GA469@aaronlu> <5f869512-3336-d9f0-6fff-e1150673a924@linux.intel.com> <20190719055238.GA536@aaronlu> From: Tim Chen Openpgp: preference=signencrypt Autocrypt: addr=tim.c.chen@linux.intel.com; prefer-encrypt=mutual; keydata= mQINBE6ONugBEAC1c8laQ2QrezbYFetwrzD0v8rOqanj5X1jkySQr3hm/rqVcDJudcfdSMv0 BNCCjt2dofFxVfRL0G8eQR4qoSgzDGDzoFva3NjTJ/34TlK9MMouLY7X5x3sXdZtrV4zhKGv 3Rt2osfARdH3QDoTUHujhQxlcPk7cwjTXe4o3aHIFbcIBUmxhqPaz3AMfdCqbhd7uWe9MAZX 7M9vk6PboyO4PgZRAs5lWRoD4ZfROtSViX49KEkO7BDClacVsODITpiaWtZVDxkYUX/D9OxG AkxmqrCxZxxZHDQos1SnS08aKD0QITm/LWQtwx1y0P4GGMXRlIAQE4rK69BDvzSaLB45ppOw AO7kw8aR3eu/sW8p016dx34bUFFTwbILJFvazpvRImdjmZGcTcvRd8QgmhNV5INyGwtfA8sn L4V13aZNZA9eWd+iuB8qZfoFiyAeHNWzLX/Moi8hB7LxFuEGnvbxYByRS83jsxjH2Bd49bTi XOsAY/YyGj6gl8KkjSbKOkj0IRy28nLisFdGBvgeQrvaLaA06VexptmrLjp1Qtyesw6zIJeP oHUImJltjPjF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ZK+6MDxXmm6R8OyohR8uM/9NCb9aDw/DnLEWcFPHfzzFFn0idp7zD5SNgAXHzV PFY6UGIm86OuPZuSG31R0AU5zvcmWCeIvhxl5ZNfmZtv5h8TgmfGAgF4PSD0x/Bq4qobcfaL ugWG5FwiybPzu2H9ZLGoaRwRmCnzblJG0pRzNaC/F+0hNf63F1iSXzIlncHZ3By15bnt5QDk l50q2K/r651xphs7CGEdKi1nU0YJVbQxJQ== Subject: Re: [RFC PATCH v3 00/16] Core scheduling v3 Message-ID: Date: Fri, 19 Jul 2019 11:33:03 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <20190719055238.GA536@aaronlu> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/18/19 10:52 PM, Aaron Lu wrote: > On Thu, Jul 18, 2019 at 04:27:19PM -0700, Tim Chen wrote: >> >> >> On 7/18/19 3:07 AM, Aaron Lu wrote: >>> On Wed, Jun 19, 2019 at 02:33:02PM -0400, Julien Desfossez wrote: >> >>> >>> With the below patch on top of v3 that makes use of util_avg to decide >>> which task win, I can do all 8 steps and the final scores of the 2 >>> workloads are: 1796191 and 2199586. The score number are not close, >>> suggesting some unfairness, but I can finish the test now... >> >> Aaron, >> >> Do you still see high variance in terms of workload throughput that >> was a problem with the previous version? > > Any suggestion how to measure this? > It's not clear how Aubrey did his test, will need to take a look at > sysbench. > >>> >>> >>> } >>> + >>> +bool cfs_prio_less(struct task_struct *a, struct task_struct *b) >>> +{ >>> + struct sched_entity *sea = &a->se; >>> + struct sched_entity *seb = &b->se; >>> + bool samecore = task_cpu(a) == task_cpu(b); >> >> >> Probably "samecpu" instead of "samecore" will be more accurate. >> I think task_cpu(a) and task_cpu(b) >> can be different, but still belong to the same cpu core. > > Right, definitely, guess I'm brain damaged. > >> >>> + struct task_struct *p; >>> + s64 delta; >>> + >>> + if (samecore) { >>> + /* vruntime is per cfs_rq */ >>> + while (!is_same_group(sea, seb)) { >>> + int sea_depth = sea->depth; >>> + int seb_depth = seb->depth; >>> + >>> + if (sea_depth >= seb_depth) >> >> Should this be strictly ">" instead of ">=" ? > > Same depth doesn't necessarily mean same group while the purpose here is > to make sure they are in the same cfs_rq. When they are of the same > depth but in different cfs_rqs, we will continue to go up till we reach > rq->cfs. Ah, I see what you are doing now. Thanks for the clarification. Tim