Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1784575yba; Thu, 25 Apr 2019 05:47:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqzeMdEe11xLzxVHXlorKQZ2g1bimAbmxystc35CUMeUiaInB3pU6NVE263vf0da/KCvmXdv X-Received: by 2002:a17:902:e610:: with SMTP id cm16mr36977047plb.189.1556196470101; Thu, 25 Apr 2019 05:47:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556196470; cv=none; d=google.com; s=arc-20160816; b=jdLsudmXGpP802BYViO4n6zByjqsnfxa5HTiJdifQ7LqZbAKIwNq03gztwzFZvQt2y EmaGt8F3uKRa19pyYticMn+P1yalp7lBz97vlpAUMfQ1+GJ7mAMHOA1A7ZlBzlrOnmuv EU85tAbAeyxivhQ8mqNAMD5DTJnJZUgGvq659b7CIK/1Iqwmm3oyS+GCHwShcnqZieK0 WWszTuKbFCPIZHsi12brdq8Mi3EalhdLmCKyEu0Q4NsIFce1Xf9JE1+m0SV5z0G8PU0y xQkG/JW/6r9Pzm7GjefVupBjR8KYx4DYsplMkqeaYUx7L8t0irGbtmtPQFHwwPZGABMw gdXA== 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=ouVX7DLtQR+TSPnOB9BUOPib5uiKvZBg++0sPW/v4gE=; b=Ou82i8naHhQzXSExqCxq1uZ1l2LF714lznW6Ois4d4OWDuBr5NjynCaT/hDjy0QQqu jurjGD2d2BvrEVNdLpM9KCLQN5qPyzRQVV79lp0X9aetg23sZHkG3gjmBn56iRxwp4P7 7liHuHvDKEMq4LviOoyh1IlIjEgCk53EOt+azip9BhAjumCfnsm8R+lPLkRr4s71B/bT HM4GZoqDTQF0Y9JmfBSy0tDoOeLQqD4fMrfPIKToIb21xIf1q8/0QJQweUuD8NH4DxOY Am7NmSdw1ZxfR6xfJa2Xh8r77ghbu3z1JCBxGimzRaeeb67iPWyuI44qAg5b8nv9qAtR 04SA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=Xyvp+dfh; 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 f19si7338227pfh.268.2019.04.25.05.47.34; Thu, 25 Apr 2019 05:47:50 -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=Xyvp+dfh; 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 S1728815AbfDYJzN (ORCPT + 99 others); Thu, 25 Apr 2019 05:55:13 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:40522 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728721AbfDYJzN (ORCPT ); Thu, 25 Apr 2019 05:55:13 -0400 Received: by mail-wr1-f65.google.com with SMTP id h4so29404395wre.7 for ; Thu, 25 Apr 2019 02:55:12 -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=ouVX7DLtQR+TSPnOB9BUOPib5uiKvZBg++0sPW/v4gE=; b=Xyvp+dfhww1WMbugWM08fm5oyJfQ+wIKPoCdMy5/ONKkXkHlNV+XZLOEPkycNdN2do wyRtmYS6t3ALW+vGuhfpcfhylKnMcYe6E0xduwzdwMPka8vN5YpT8tbdDeMIz2FKamuC FHet4fcB3VWAX2UW6ElDdXhh8Wh86rjliHR7rxe3T8nmBI5/kUYAKokSiAwVSC2VV68S xCbdKUjHUs7yNGSmyo1MRwmduYGsY9YMwiS5t7gpziXlFBhWE37EdGi4oqoN11Ha/cyK 0zEQYoe3GEq/pBSf3mv/N8Mwpk4lsZttHC6QA4OVzxdaGAtoCRL4vE7/Px07Bo8BEilM 2RYA== 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=ouVX7DLtQR+TSPnOB9BUOPib5uiKvZBg++0sPW/v4gE=; b=ldJl+QP/Vza+FEwDQ1uqp33GZSmpe/5hLsZ0+LcgNpBc6K6RlyTvZjGR+/LVTKZLxp BN85goprZVzzS6ULu8MozjcrKiu9k95wqPK+LlvoM4I8btH5MYl8CJvz5B6xr4GBexrS R0lKFWHypmcfXpzdt+rrXxnLug7ZjYhqoPDgiLKT0w5l85GVbvC8LolZcpSOZYh2j5sW SOFj8PMmxHRsaRnax9b6IBLEtmK7jCPPag+WaJwwq+5jzJuOCgznHo+jKhwRGS2c5VTX E7rumJeLwNOZOQbbTzdnPZV/cZgH8VuO9wgLGUlERHqHQrmj7X0rvaAZB9o4vM7VPrzo coww== X-Gm-Message-State: APjAAAXDCxIFBndh7vU5FrfD2DdJZJC/wG3uCN/AXoWTk6xCF3oVmsd1 qHh4kSz4XfhGA/8aiQuhve0= X-Received: by 2002:adf:80ec:: with SMTP id 99mr16716387wrl.55.1556186111655; Thu, 25 Apr 2019 02:55:11 -0700 (PDT) Received: from gmail.com (2E8B0CD5.catv.pool.telekom.hu. [46.139.12.213]) by smtp.gmail.com with ESMTPSA id y125sm31917125wmc.39.2019.04.25.02.55.09 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 25 Apr 2019 02:55:10 -0700 (PDT) Date: Thu, 25 Apr 2019 11:55:08 +0200 From: Ingo Molnar To: Aubrey Li Cc: 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: <20190425095508.GA8387@gmail.com> References: <20190424140013.GA14594@sinkpad> 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 Wed, Apr 24, 2019 at 10:00 PM Julien Desfossez > wrote: > > > > On 24-Apr-2019 09:13:10 PM, Aubrey Li wrote: > > > On Wed, Apr 24, 2019 at 12:18 AM Vineeth Remanan Pillai > > > wrote: > > > > > > > > Second iteration of the core-scheduling feature. > > > > > > > > This version fixes apparent bugs and performance issues in v1. This > > > > doesn't fully address the issue of core sharing between processes > > > > with different tags. Core sharing still happens 1% to 5% of the time > > > > based on the nature of workload and timing of the runnable processes. > > > > > > > > Changes in v2 > > > > ------------- > > > > - rebased on mainline commit: 6d906f99817951e2257d577656899da02bb33105 > > > > > > Thanks to post v2, based on this version, here is my benchmarks result. > > > > > > Environment setup > > > -------------------------- > > > Skylake server, 2 numa nodes, 104 CPUs (HT on) > > > cgroup1 workload, sysbench (CPU intensive non AVX workload) > > > cgroup2 workload, gemmbench (AVX512 workload) > > > > > > Case 1: task number < CPU num > > > -------------------------------------------- > > > 36 sysbench threads in cgroup1 > > > 36 gemmbench threads in cgroup2 > > > > > > core sched off: > > > - sysbench 95th percentile latency(ms): avg = 4.952, stddev = 0.55342 > > > core sched on: > > > - sysbench 95th percentile latency(ms): avg = 3.549, stddev = 0.04449 > > > > > > Due to core cookie matching, sysbench tasks won't be affect by AVX512 > > > tasks, latency has ~28% improvement!!! > > > > > > Case 2: task number > CPU number > > > ------------------------------------------------- > > > 72 sysbench threads in cgroup1 > > > 72 gemmbench threads in cgroup2 > > > > > > core sched off: > > > - sysbench 95th percentile latency(ms): avg = 11.914, stddev = 3.259 > > > core sched on: > > > - sysbench 95th percentile latency(ms): avg = 13.289, stddev = 4.863 > > > > > > So not only power, now security and performance is a pair of contradictions. > > > Due to core cookie not matching and forced idle introduced, latency has ~12% > > > regression. > > > > > > Any comments? > > > > Would it be possible to post the results with HT off as well ? > > What's the point here to turn HT off? The latency is sensitive to the > relationship > between the task number and CPU number. Usually less CPU number, more run > queue wait time, and worse result. HT-off numbers are mandatory: turning HT off is by far the simplest way to solve the security bugs in these CPUs. Any core-scheduling solution *must* perform better than HT-off for all relevant workloads, otherwise what's the point? Thanks, Ingo