Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4467372yba; Mon, 29 Apr 2019 21:44:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqwDL1TGJZ9iDhG5G4dkX9inDtftzCJa1RQ6QXKAg9sE8PCdK/VegrkRABuM0wsKMlqarf6E X-Received: by 2002:a63:3fc1:: with SMTP id m184mr29813168pga.222.1556599472500; Mon, 29 Apr 2019 21:44:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556599472; cv=none; d=google.com; s=arc-20160816; b=Z2XLPc9+oOQ/ys8PpEZH1kAg7aXmGOIGVZFsgMxj+28V0CjsEGfaryTptsoVtqLfUa pt/c5mluMspWAE0cromCx2vhxgYHjZcOm0M0SaDXTxK8irykggF9chhXTygad9nXjObT 1z7LHOz4X5M5kTPbm2ktttot70P/jOVHDMGFtSK2eiENtsxoOnKvf5iLV8AcTAmxCLG1 Fbl0jc/snHHwbM4UjGPpmnycCmk9LyDxYsfEac3cOrO+L7EOhFxya2AalaL05UgtfuXf 6Y33T1tain4+ygQu0bdv+cxfbXFQ7faofz/e/QfFyvWlFixUojJYEhKzIHjRwKmmfyZD 7n+g== 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:dkim-signature; bh=95ElxBUisDLl2oakdawK7d9Lg88o3di7LnAFmSTN78w=; b=UF5OYjLfO/ZzhRV/ipqp3j9WoG9cx6srDc0B2HEK0AuKf6AUine7rnDvV3+uoPMvzW 86aNxLAJZWQILs78xac3NnXvDPNC3nQkw91KACTRWtryc+WAF9MN2yxhgb94lNQzthbb TIIE1qbCdUjezCKfq2LqBZQ7OUJJw1M8AHWAGl737ajgKTV5QsXfBZ4B0o7F0ZkbMHR9 d3ZldCqqCbcOmPjMIzuo7kJiultfUrOl4DLIhgIKq64LAVGV/LWVRMEliLryzW6EMXBq uRyiHJ2Fto0A2bnx8LsD6KU6o+a4MwQ2QMYRbz+6l9uRJ9WEI+I+UWMgcJA+lWXCZJoD 0p4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b="CZYl3/rf"; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l5si17081554pgj.560.2019.04.29.21.44.16; Mon, 29 Apr 2019 21:44:32 -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=fail header.i=@gmail.com header.s=20161025 header.b="CZYl3/rf"; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726088AbfD3Em6 (ORCPT + 99 others); Tue, 30 Apr 2019 00:42:58 -0400 Received: from mail-wm1-f67.google.com ([209.85.128.67]:35818 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725958AbfD3Em5 (ORCPT ); Tue, 30 Apr 2019 00:42:57 -0400 Received: by mail-wm1-f67.google.com with SMTP id y197so2221607wmd.0 for ; Mon, 29 Apr 2019 21:42:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=95ElxBUisDLl2oakdawK7d9Lg88o3di7LnAFmSTN78w=; b=CZYl3/rfLAl3eQocHA15kNDAUIaDHv2KmhrIyXoJQkmnhRb89gkeK4OIuYkomLWkwq 0HNalC+vrsnriyz4jhwEISRrXM7tJioKZsd0U0Ug0gajAYPE9d5AGli/7cYweDl9qprE T1KgaGM44SX63uCwSlmjTibq34gaPzEJtTyPmmrLQCiI5WvKgKZ+0BX0N05Ul+SiIh6s y80miI+Lih1uMZHGexwFpTdPTLGhmUfaCiasG4NtwGolO+XhbOIczip16AHIBg+VEJ+1 L50ycz6AnEJ5wWnaiLyUB7JyxIeiS0N+V1Ye6YLqL2lrof/VdCQFgy5rM3wVDNxQdPtm RC7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=95ElxBUisDLl2oakdawK7d9Lg88o3di7LnAFmSTN78w=; b=qD3wpbu2gybrmkxVEyjHwrwHqOXNoqXX6nmTJQwn1gX+QcGrpZNIuIIqbkY++h8TFp jgNP9Q1T3nrVT2H50vdsiQoZS+WPzWo2oFi+boCqK0hhAfpsJu3Hic6q1eOh5rSK+GjP 56C+1C0lsuxr6DFj1dX6LX95T6enPIaNfRiBQko2Z5jkErYzCiLxQMKJDL3+kNSxBQKL LQ6UUBUH15ujnmZs7m9o3MnHJ5bDvPr51WDwu1gWj2M/aQ1NJOMYP9q7zah8iWBIiNb7 iGdX3UFJxYYzhOQsYvSe77uWvUB94eix3QYDnztsR/EDBfS37UKg3EQwSDALjjTbByM4 /Hmw== X-Gm-Message-State: APjAAAU6P3Jc51VENUq7Arl0/AtZ13QG9AqGc1ianx8YFEPegAHr3ARZ J8EXQszO8fBLptH7B1xfs+Y= X-Received: by 2002:a1c:f910:: with SMTP id x16mr1556018wmh.114.1556599375049; Mon, 29 Apr 2019 21:42:55 -0700 (PDT) Received: from gmail.com (2E8B0CD5.catv.pool.telekom.hu. [46.139.12.213]) by smtp.gmail.com with ESMTPSA id c6sm1091548wmb.21.2019.04.29.21.42.51 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 29 Apr 2019 21:42:53 -0700 (PDT) Date: Tue, 30 Apr 2019 06:42:50 +0200 From: Ingo Molnar To: Aubrey Li Cc: "Li, Aubrey" , Julien Desfossez , Vineeth Remanan Pillai , Nishanth Aravamudan , Peter Zijlstra , Tim Chen , Thomas Gleixner , Paul Turner , Linus Torvalds , Linux List Kernel Mailing , Subhra Mazumdar , =?iso-8859-1?Q?Fr=E9d=E9ric?= Weisbecker , Kees Cook , Greg Kerr , Phil Auld , Aaron Lu , Valentin Schneider , Mel Gorman , Pawan Gupta , Paolo Bonzini Subject: Re: [RFC PATCH v2 00/17] Core scheduling v2 Message-ID: <20190430044250.GC73609@gmail.com> References: <20190427142137.GA72051@gmail.com> <20190428093304.GA7393@gmail.com> <20190428121721.GA121434@gmail.com> <20190429061422.GA20939@gmail.com> <24bca399-5370-c4b5-725f-979db06bfc29@linux.intel.com> <20190429160058.GA82935@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 * Aubrey Li wrote: > On Tue, Apr 30, 2019 at 12:01 AM Ingo Molnar wrote: > > * Li, Aubrey wrote: > > > > > > I.e. showing the approximate CPU thread-load figure column would be > > > > very useful too, where '50%' shows half-loaded, '100%' fully-loaded, > > > > '200%' over-saturated, etc. - for each row? > > > > > > See below, hope this helps. > > > .--------------------------------------------------------------------------------------------------------------------------------------. > > > |NA/AVX vanilla-SMT [std% / sem%] cpu% |coresched-SMT [std% / sem%] +/- cpu% | no-SMT [std% / sem%] +/- cpu% | > > > |--------------------------------------------------------------------------------------------------------------------------------------| > > > | 1/1 508.5 [ 0.2%/ 0.0%] 2.1% | 504.7 [ 1.1%/ 0.1%] -0.8% 2.1% | 509.0 [ 0.2%/ 0.0%] 0.1% 4.3% | > > > | 2/2 1000.2 [ 1.4%/ 0.1%] 4.1% | 1004.1 [ 1.6%/ 0.2%] 0.4% 4.1% | 997.6 [ 1.2%/ 0.1%] -0.3% 8.1% | > > > | 4/4 1912.1 [ 1.0%/ 0.1%] 7.9% | 1904.2 [ 1.1%/ 0.1%] -0.4% 7.9% | 1914.9 [ 1.3%/ 0.1%] 0.1% 15.1% | > > > | 8/8 3753.5 [ 0.3%/ 0.0%] 14.9% | 3748.2 [ 0.3%/ 0.0%] -0.1% 14.9% | 3751.3 [ 0.4%/ 0.0%] -0.1% 30.5% | > > > | 16/16 7139.3 [ 2.4%/ 0.2%] 30.3% | 7137.9 [ 1.8%/ 0.2%] -0.0% 30.3% | 7049.2 [ 2.4%/ 0.2%] -1.3% 60.4% | > > > | 32/32 10899.0 [ 4.2%/ 0.4%] 60.3% | 10780.3 [ 4.4%/ 0.4%] -1.1% 55.9% | 10339.2 [ 9.6%/ 0.9%] -5.1% 97.7% | > > > | 64/64 15086.1 [11.5%/ 1.2%] 97.7% | 14262.0 [ 8.2%/ 0.8%] -5.5% 82.0% | 11168.7 [22.2%/ 1.7%] -26.0% 100.0% | > > > |128/128 15371.9 [22.0%/ 2.2%] 100.0% | 14675.8 [14.4%/ 1.4%] -4.5% 82.8% | 10963.9 [18.5%/ 1.4%] -28.7% 100.0% | > > > |256/256 15990.8 [22.0%/ 2.2%] 100.0% | 12227.9 [10.3%/ 1.0%] -23.5% 73.2% | 10469.9 [19.6%/ 1.7%] -34.5% 100.0% | > > > '--------------------------------------------------------------------------------------------------------------------------------------' > > > > Very nice, thank you! > > > > What's interesting is how in the over-saturated case (the last three > > rows: 128, 256 and 512 total threads) coresched-SMT leaves 20-30% CPU > > performance on the floor according to the load figures. > > Yeah, I found the next focus. > > > Is this true idle time (which shows up as 'id' during 'top'), or some > > load average artifact? > > vmstat periodically reported intermediate CPU utilization in one > second, it was running simultaneously when the benchmarks run. The cpu% > is computed by the average of (100-idle) series. Ok - so 'vmstat' uses /proc/stat, which uses cpustat[CPUTIME_IDLE] (or its NOHZ work-alike), so this should be true idle time - to the extent the HZ process clock's sampling is accurate. So I guess the answer to my question is "yes". ;-) BTW., for robustness sake you might want to add iowait to idle time (it's the 'wa' field of vmstat) - it shouldn't matter for this particular benchmark which doesn't do much IO, but it might for others. Both CPUTIME_IDLE and CPUTIME_IOWAIT are idle states when a CPU is not utilized. [ Side note: we should really implement precise idle time accounting when CONFIG_IRQ_TIME_ACCOUNTING=y is enabled. We pay all the costs of the timestamps, but AFAICS we don't propagate that into the idle cputime metrics. ] Thanks, Ingo