Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1528225yba; Thu, 25 Apr 2019 01:02:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqzjCoxCRyZGtItvMIE1PI5J0AeN5ZFAeO6LgA91DbA7e39bo9Iqb9Yjb0by7kVccsJXDjDt X-Received: by 2002:a63:f147:: with SMTP id o7mr36007554pgk.197.1556179370069; Thu, 25 Apr 2019 01:02:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556179370; cv=none; d=google.com; s=arc-20160816; b=egf3Oeq/p8XriT+9Z2rrVJY02PB7T06S+3XKI4oIcyFsKfh4px8cYblCaxvdTwNkVE 9o45YiogJzcIjDX2jyzPDbmwqYF5UAwq+0Sv6PZmpxPl2kswD2EPsyH7yXD8Wm0fDho0 Sl8hhNQ2obwPYLHTZpYFWELuuDSaTXT0MAT27Wjhq2XTCFxQTxONcEsYg7H/S38kUXVK cG7k4f/thxFBxcTfAhXSwjfAx9jBrFej6B/YJYj9Cf9YvPBsgNw9RCBVbfrFpzDY3+Cd KUCaKtDtp7GEJX++UMf3VHDV26Yc18IV2884hK4Zr1ZAVGIgQmKDnIQFe6TWvnlFwfhQ bQ4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=o+Wa4CNacz7cfEZTyoG1CeJ1cikij3QMnhVi8x3t1b4=; b=ApE2mR1U4DJo8uKPJrdXmY+XuUHno9E7olhAgkhKGRwDZeiTw+FJAurbJSQOJ/NAdM kM3dxymniHD5x5SYI9BTzeLEdgQBWUr0cINJkY956gH2Jh9rK/GcwdDYy7OWIUtkfNrh dTRghJ4vOE9n2A/d4PkoUiYIELGm9PHNbE4IEGsbD+va8Fm2cpAlKeGvKxRd9Y7vRkvs eXkoJx/EcqxKxmqOuoL3NozWElWojYmJTvGM/4rYLrWFcSWAy3UrjBAE5QG/ufhmRQNL RId7mBVKp4ny7JZZz3VAME1zmbD+Kh2VVseTavJD/uI1vHE9ZToQ+cmZ643BXurNPrNo nDxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=GNiyrxKK; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a3si6930390pgm.455.2019.04.25.01.02.34; Thu, 25 Apr 2019 01:02: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=pass header.i=@gmail.com header.s=20161025 header.b=GNiyrxKK; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388821AbfDYDPW (ORCPT + 99 others); Wed, 24 Apr 2019 23:15:22 -0400 Received: from mail-lf1-f68.google.com ([209.85.167.68]:40739 "EHLO mail-lf1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388178AbfDYDPV (ORCPT ); Wed, 24 Apr 2019 23:15:21 -0400 Received: by mail-lf1-f68.google.com with SMTP id o16so5507296lfl.7 for ; Wed, 24 Apr 2019 20:15:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=o+Wa4CNacz7cfEZTyoG1CeJ1cikij3QMnhVi8x3t1b4=; b=GNiyrxKKAUbGnY0S3nMtyLScCEyeMDRpLrWTHw3KPXvI87ij64s6qVx5om9C028UFo cJFuVJ9TlMYwKiJJSa40XpZhr8QLAneXn/k+pIi1bqlrYksvUyc4BgQjxDRhyu9UrUEH Pl8mWFxfnK3pjWR1SA2vdtVQQ1XLEfOHUCMvO2EDk6AHWqORDhX4NOgMafnohxr2XGH6 vaGmOmhrwZn9A9HTDaarH95m9hvVUaNmONHB1Ma10WL8ji7sc6TP0hARvj9z+ElMWjJt Eh4NWAe2HAK8FQKPPrKoFnFOC2w5mFPTCp4vpYCMJ8VY2rdXARFmFkum3bG+sLPIWH0G BAFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=o+Wa4CNacz7cfEZTyoG1CeJ1cikij3QMnhVi8x3t1b4=; b=PmIFtE1cJjlLjjq0L+TddnlibeumnPJabJpHK5kZEjbHN0Z09LNYxWdSI+a7ABTM8d Mt48TThMRgcLInmm/iBrMJmJ7lVzvjAnyUdd0P2G+GOhe5vyuZcrYQSX8utrRdsbnmGc GbWGsazyZiy0mpENnC+qhMhTY76XbnXNuLE9mLUj6Ax4//0UPb8xGd9GY3IuDy84FUrM 4hS67kT3pLlEB0uIlD/T+88dfMDKKyuPN2/5jfj2AtGur10OFLRq41H1BQ1olqQNa3Ry xYFsjF5hCWnJra+VD6AD+D09lC8L6K+ps439nRiiitGdAVADNLlNXbDuH7uuyF9r38u9 vmuQ== X-Gm-Message-State: APjAAAUusmWG+Ug5Ly1PKAupc+TcwJ3qZTrPJMeKMPh57DxNcR3jjJT3 QdYqZb6xim8eLxGu27m48ef00N8Yw2uoKqdV+k0= X-Received: by 2002:a19:c113:: with SMTP id r19mr19471920lff.64.1556162119935; Wed, 24 Apr 2019 20:15:19 -0700 (PDT) MIME-Version: 1.0 References: <20190424140013.GA14594@sinkpad> In-Reply-To: <20190424140013.GA14594@sinkpad> From: Aubrey Li Date: Thu, 25 Apr 2019 11:15:08 +0800 Message-ID: Subject: Re: [RFC PATCH v2 00/17] Core scheduling v2 To: Julien Desfossez Cc: Vineeth Remanan Pillai , Nishanth Aravamudan , Peter Zijlstra , Tim Chen , Ingo Molnar , Thomas Gleixner , Paul Turner , Linus Torvalds , Linux List Kernel Mailing , Subhra Mazumdar , =?UTF-8?B?RnLDqWTDqXJpYyBXZWlzYmVja2Vy?= , Kees Cook , Greg Kerr , Phil Auld , Aaron Lu , Valentin Schneider , Mel Gorman , Pawan Gupta , Paolo Bonzini Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Thanks, -Aubrey