Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp2883081ybi; Thu, 18 Jul 2019 16:29:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqxEaxP7Lrpk6Mqb+ZlDGpuvHtPNiWMlHrtb2uv2jNFpWFfQ7bM7FCdJTx2kmHAdKP8V3wHt X-Received: by 2002:a63:b919:: with SMTP id z25mr50058763pge.201.1563492588879; Thu, 18 Jul 2019 16:29:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563492588; cv=none; d=google.com; s=arc-20160816; b=D3auqIomPEglmIyeEidz36Q52INrLVI1VHEB1A/0k0Ti0WkTp2Nalp/rC73VwxUea0 JMXkzMG7CnuZcp6Ru/HzPB92X8lit7uO6mrhfcVr64pBOrlXSFQDwOe+glb0TQc6kkmX daiOi+Qc5NukxCfVRsGKwO+mHZdh6cumgw3uwzPXCEo6MBLNR9rVNuxNOGvbG/6CsqX0 ZdP5ttIJS1AZYZtIgOUgBjlQXt+w+rtcqXT3OCuQ3UgMywaTObzxcC1jTZbBWaKqARPi 7aFs7VSjroAQstv79byHE8c9aOLCtxS0JNKQbJVcC4P84QDO2bQGYZuhPdz54sEUEcZK Yz/A== 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:from:references:cc:to:subject; bh=BmVSCX1UCCRsOy9qWb2C4RpBsHj51vpzz3aOMpEPIBc=; b=Wmqdd+62RSHtHb4qcUfh1ncCp+puj8IPEECc+SEEdH8uZkhtW4EvuH2qWjSowF4moI z5E+h4KwP7lvfNiPpWQCWLUvnUZyfPaUiKLo9i7VZTFhzk1fxZiOUucxiw2lGbexLgbO be3Plz4CyWem+81OnhcuGRrUq6CPdjBBn/LfmGq61ohi5bL6hv9/iipbMCn1IQlns1Cc ylfwtd2yCIj1UInfkdvRGKf2RMvfUQ1jPrIFrkanDJHUjdmF0sWK9oa4UmbyGKnCdgKM 0t18+ADHsFahhVu1zZ34YhH3wo54j0LH/yZBrZO7R5QKJ2cqR5rYGd2E8GMi7JHCDYAY rUsQ== 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 k22si2898008pfk.90.2019.07.18.16.29.33; Thu, 18 Jul 2019 16:29: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; 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 S1726183AbfGRX1U convert rfc822-to-8bit (ORCPT + 99 others); Thu, 18 Jul 2019 19:27:20 -0400 Received: from mga02.intel.com ([134.134.136.20]:24676 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726022AbfGRX1U (ORCPT ); Thu, 18 Jul 2019 19:27:20 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Jul 2019 16:27:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,279,1559545200"; d="scan'208";a="251970992" Received: from schen9-mobl.jf.intel.com ([10.24.10.117]) by orsmga001.jf.intel.com with ESMTP; 18 Jul 2019 16:27:19 -0700 Subject: Re: [RFC PATCH v3 00/16] Core scheduling v3 To: Aaron Lu , Julien Desfossez Cc: 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> From: Tim Chen Message-ID: <5f869512-3336-d9f0-6fff-e1150673a924@linux.intel.com> Date: Thu, 18 Jul 2019 16:27:19 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: <20190718100714.GA469@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 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? > > > } > + > +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. > + 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 ">=" ? > + sea = parent_entity(sea); > + if (sea_depth <= seb_depth) Should use "<" ? > + seb = parent_entity(seb); > + } > + > + delta = (s64)(sea->vruntime - seb->vruntime); > + } > + Thanks. Tim