Received: by 2002:ac0:aa62:0:0:0:0:0 with SMTP id w31-v6csp1613947ima; Thu, 25 Oct 2018 01:59:08 -0700 (PDT) X-Google-Smtp-Source: AJdET5ddinOh1XP9Pnsp3Mb477G6viflOZpR8eV4acUvpTCzo8KCG2mUOO6OLBJ0SbNs+qjoOkMv X-Received: by 2002:a62:5210:: with SMTP id g16-v6mr700992pfb.256.1540457948498; Thu, 25 Oct 2018 01:59:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540457948; cv=none; d=google.com; s=arc-20160816; b=Y133gVZldIvEieuvjb3ObhDj/JrYRaHg66JLIEwkQpzL9a/KY/GokJzlZ2JThNqS0q 2yfipyEj2bJP9yMpNTenIVUILsjCZWK5OKhrlTew0LHW6bZzhg1mbAeqnH68M8NPugSQ NMPPoeEhuhrlaB1lg+3qKNKLyNq214vFE5oaMCBI1cXNaax8ycw1HdYjYG8gx6yLi0sm ROg688eN4OziAojoBjRW7TKGwpzXsH9LFVMqOv54hyJ4tz94977MJekObKrgqnUdug/v kiO7cfJ1/ynttKB6ElbbC2d7B0nN3kPbOQKt8pHgPF/aviHmcG6/0tw4EuMTMEdMtouZ qBbg== 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; bh=dmo3P10pH5eIO443LwYtF3L+MAwOElQyiKGg3JKzFRE=; b=o7F0yz4NOQzgIO8rKEdwQAjrQFuLeERAkbpBLjE5ng40fTdgmgjKeVXfiZd3EXd3nh GLAxD9VmBFajH2aeZ9diJpmp1lA/PlPeDWKJPxtbBGCbMjSjEj/NPkbXB2KouzcMxsew TLXdWvbzu7LHZKz+n+vhsQnQbRVdYBrdVzoo/fAHGVabfadsYsZAvBZWQ5/28mGSbEnJ JOGDuH4kCGfv1+8GJ5USx+uwu682vhA2EYdnkWHe1UHKQEYeobCeOyDhXWuIrqxv6M8r MJqgP4jzdx2s5Jeuq+nqy5cgWe0EvfHuCD71mUPZZctA42FhiXHrQBhgaAK8/udnZXGD XQIg== 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 w7-v6si7390837pgh.131.2018.10.25.01.58.53; Thu, 25 Oct 2018 01:59:08 -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 S1726909AbeJYR2W (ORCPT + 99 others); Thu, 25 Oct 2018 13:28:22 -0400 Received: from mga05.intel.com ([192.55.52.43]:26246 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726606AbeJYR2W (ORCPT ); Thu, 25 Oct 2018 13:28:22 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Oct 2018 01:56:34 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,423,1534834800"; d="scan'208";a="102534208" Received: from aaronlu.sh.intel.com (HELO intel.com) ([10.239.159.44]) by orsmga001.jf.intel.com with ESMTP; 25 Oct 2018 01:56:30 -0700 Date: Thu, 25 Oct 2018 16:56:29 +0800 From: Aaron Lu To: Patrick Bellasi Cc: "Ye, Xiaolong" , Joel Fernandes , Juri Lelli , Todd Kjos , Stephen Rothwell , Peter Zijlstra , Paul Turner , "Wysocki, Rafael J" , Morten Rasmussen , Dietmar Eggemann , Steve Muckle , "lkp@01.org" , Viresh Kumar , Chris Redpath , Thomas Gleixner , Linus Torvalds , Ingo Molnar , LKML Subject: Re: [LKP] [lkp-robot] [sched/fair] d519329f72: unixbench.score -9.9% regression Message-ID: <20181025085629.GA18146@intel.com> References: <20180402032000.GD3101@yexl-desktop> <20181024064100.GA27054@intel.com> <20181024170137.GA13236@e110439-lin> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181024170137.GA13236@e110439-lin> 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 Wed, Oct 24, 2018 at 06:01:37PM +0100, Patrick Bellasi wrote: > On 24-Oct 14:41, Aaron Lu wrote: > > On Mon, Apr 02, 2018 at 11:20:00AM +0800, Ye, Xiaolong wrote: > > > > > > Greeting, > > > > > > FYI, we noticed a -9.9% regression of unixbench.score due to commit: > > > > > > > > > commit: d519329f72a6f36bc4f2b85452640cfe583b4f81 ("sched/fair: Update util_est only on util_avg updates") > > > https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git master > > > > > > in testcase: unixbench > > > on test machine: 8 threads Intel(R) Core(TM) i7 CPU 870 @ 2.93GHz with 6G memory > > > with following parameters: > > > > > > runtime: 300s > > > nr_task: 100% > > > test: execl > > > > > > test-description: UnixBench is the original BYTE UNIX benchmark suite aims to test performance of Unix-like system. > > > test-url: https://github.com/kdlucas/byte-unixbench > > Hi Aaron, > > > I tested this workload on different machines with this commit > > d519329f72a6f36bc4f2b85452 and its parent a07630b8b2c16f82, I also > > tested with v4.19-rc8 to see if the regression is gone - > > the performance drop is there with v4.19-rc8 and with different > > machines so I assume this regression is not solved yet. > > > > Here are detailed data: > > > > cmdline used to run this workload: > > ./Run execl -c $nr_cpu -i 30 > > I had a better look into this issue and found that something like this > could be the cure for the execl throughput regression: Good news, yes they are! > ---8<--- > diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c > index 908c9cdae2f0..c34d41b542fc 100644 > --- a/kernel/sched/fair.c > +++ b/kernel/sched/fair.c > @@ -6258,8 +6258,17 @@ static unsigned long cpu_util_wake(int cpu, struct task_struct *p) > * covered by the following code when estimated utilization is > * enabled. > */ > - if (sched_feat(UTIL_EST)) > - util = max(util, READ_ONCE(cfs_rq->avg.util_est.enqueued)); > + if (sched_feat(UTIL_EST)) { > + unsigned int estimated = > + READ_ONCE(cfs_rq->avg.util_est.enqueued); > + > + if (unlikely(current == p)) { > + estimated -= min_t(unsigned int, estimated, > + (_task_util_est(p) | UTIL_AVG_UNCHANGED)); > + } > + > + util = max(util, estimated); > + } > > /* > * Utilization (estimated) can exceed the CPU capacity, thus let's > ---8<--- > > I'll test this better on a machine on my side and send out a proper > patch by tomorrow. > > > Please let me know if you need other information, thanks. > > Would be nice if you can test the above on your side too. > commit cbcb74a95c5af32f9127a102feca323139ba2c49 is the commit I made from your diff and it restored performance for the two desktops. the result on the skylake server isn't quite stable so I think the performance gap is due to noise. lkp-ivb-d04: cbcb74a95c5af32f9127a102feca323139ba2c49/avg.json: "unixbench.score": 2946.0, d519329f72a6f36bc4f2b85452640cfe583b4f81/avg.json: "unixbench.score": 2669.5333333333333, a07630b8b2c16f82fd5b71d890079f4dd7599c1d/avg.json: "unixbench.score": 2924.3333333333335, lkp-hsw-d01: cbcb74a95c5af32f9127a102feca323139ba2c49/avg.json: "unixbench.score": 7013.533333333333, d519329f72a6f36bc4f2b85452640cfe583b4f81/avg.json: "unixbench.score": 6421.233333333333, a07630b8b2c16f82fd5b71d890079f4dd7599c1d/avg.json: "unixbench.score": 7090.400000000001, lkp-skl-2sp2: cbcb74a95c5af32f9127a102feca323139ba2c49/avg.json: "unixbench.score": 9347.02, d519329f72a6f36bc4f2b85452640cfe583b4f81/avg.json: "unixbench.score": 9362.76, a07630b8b2c16f82fd5b71d890079f4dd7599c1d/avg.json: "unixbench.score": 9520.86,