Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp2609073ybe; Thu, 12 Sep 2019 12:02:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqxHvuiDYzYO9iZvE3OBpyD2kg0A2Ro5lMhxrOVJiS0h6TgCdRuJEBLsk4pVhHbf5yvAb9lB X-Received: by 2002:a17:906:4d4b:: with SMTP id b11mr9925669ejv.0.1568314959893; Thu, 12 Sep 2019 12:02:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568314959; cv=none; d=google.com; s=arc-20160816; b=B8ALDkF36XAX2Piibh0lHIYWH1kXvYgZ/9tqAPN2CoEQPDpLYk3ae0UbHjcHjNhhVq SF5XUDdgaSyxS/AmokBL/3PsVBWyf9pE4TGJnAqOgOCRtDjqd+8AJGj5KMBGVSxbZk5a mGVP8UWDKBsO3lQ0vL2ldxI02WxAjJMrNPkVq1sl2cvw9lxsTLXEhfEqGiYwLvqrtRVE NDGhwwb8PrFzpXonAkbZd8NH7YodqiGhx88sjXdHvsIdwdxfoiWD3ZKcD8FXWVnf6EBO 5nsKBx81SO6k1V55ajvbtQ6EnpZcWeJHDZSnndcclO+3ypRXS1hNwMyIJ16czkFiN8J5 uH1w== 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:subject:autocrypt:openpgp:from:references:cc:to; bh=vs79ACyeQyvOl8pdDY8HdHY4ExRoNM4G6YEwKylazBw=; b=T3QMWr1BvfAZn7uBjJjmejwAqsTCFSvJxmX8hhx40EuqyXElEd21jpNckGkaVTYnIB opR3f+X3yWTShrBN5WWtJX0wqXJWNb4M7PvNGqpbxqCgJCQ7P2jCmh/+gUzxEsN3u7xk 2zqZmUN5wqqJ3iiEbcPRmUPjGTCYkqnCcqq7gV4Omhcs5hVBiEDa9IKOm6A8H3jocupA LJwXi3ZnPXP/Aveoe5DJNNMmBm/GnFq12dDIkSuzUmHVqTWihDLpYEDgJFUNSSc8NClR MLG4f9EU7HHy+YbqPql3g7YVid2WJDQmTw5smK9i0qmvNH80sP5JTnTRulfP+mwI5Jl0 nFAg== 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 oy9si13186038ejb.249.2019.09.12.12.02.15; Thu, 12 Sep 2019 12:02:39 -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 S1731453AbfILRFq (ORCPT + 99 others); Thu, 12 Sep 2019 13:05:46 -0400 Received: from mga17.intel.com ([192.55.52.151]:13993 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728091AbfILRFp (ORCPT ); Thu, 12 Sep 2019 13:05:45 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Sep 2019 10:05:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,497,1559545200"; d="scan'208";a="200780168" Received: from schen9-desk.jf.intel.com (HELO [10.54.74.162]) ([10.54.74.162]) by fmsmga001.fm.intel.com with ESMTP; 12 Sep 2019 10:05:43 -0700 To: Aaron Lu Cc: Julien Desfossez , Dario Faggioli , "Li, Aubrey" , 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: <20190725143003.GA992@aaronlu> <20190726152101.GA27884@sinkpad> <7dc86e3c-aa3f-905f-3745-01181a3b0dac@linux.intel.com> <20190802153715.GA18075@sinkpad> <69cd9bca-da28-1d35-3913-1efefe0c1c22@linux.intel.com> <20190911140204.GA52872@aaronlu> <7b001860-05b4-4308-df0e-8b60037b8000@linux.intel.com> <20190912120400.GA16200@aaronlu> From: Tim Chen Openpgp: preference=signencrypt Autocrypt: addr=tim.c.chen@linux.intel.com; prefer-encrypt=mutual; keydata= mQINBE6ONugBEAC1c8laQ2QrezbYFetwrzD0v8rOqanj5X1jkySQr3hm/rqVcDJudcfdSMv0 BNCCjt2dofFxVfRL0G8eQR4qoSgzDGDzoFva3NjTJ/34TlK9MMouLY7X5x3sXdZtrV4zhKGv 3Rt2osfARdH3QDoTUHujhQxlcPk7cwjTXe4o3aHIFbcIBUmxhqPaz3AMfdCqbhd7uWe9MAZX 7M9vk6PboyO4PgZRAs5lWRoD4ZfROtSViX49KEkO7BDClacVsODITpiaWtZVDxkYUX/D9OxG AkxmqrCxZxxZHDQos1SnS08aKD0QITm/LWQtwx1y0P4GGMXRlIAQE4rK69BDvzSaLB45ppOw AO7kw8aR3eu/sW8p016dx34bUFFTwbILJFvazpvRImdjmZGcTcvRd8QgmhNV5INyGwtfA8sn L4V13aZNZA9eWd+iuB8qZfoFiyAeHNWzLX/Moi8hB7LxFuEGnvbxYByRS83jsxjH2Bd49bTi XOsAY/YyGj6gl8KkjSbKOkj0IRy28nLisFdGBvgeQrvaLa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OfL2/Bvj2IyU35EOC5sgO6h VRt3kA/JPvZK+6MDxXmm6R8OyohR8uM/9NCb9aDw/DnLEWcFPHfzzFFn0idp7zD5SNgAXHzV PFY6UGIm86OuPZuSG31R0AU5zvcmWCeIvhxl5ZNfmZtv5h8TgmfGAgF4PSD0x/Bq4qobcfaL ugWG5FwiybPzu2H9ZLGoaRwRmCnzblJG0pRzNaC/F+0hNf63F1iSXzIlncHZ3By15bnt5QDk l50q2K/r651xphs7CGEdKi1nU0YJVbQxJQ== Subject: Re: [RFC PATCH v3 00/16] Core scheduling v3 Message-ID: <474e818e-0bae-a715-99e0-7fbaf40590dc@linux.intel.com> Date: Thu, 12 Sep 2019 10:05:43 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <20190912120400.GA16200@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 9/12/19 5:04 AM, Aaron Lu wrote: > Well, I have done following tests: > 1 Julien's test script: https://paste.debian.net/plainh/834cf45c > 2 start two tagged will-it-scale/page_fault1, see how each performs; > 3 Aubrey's mysql test: https://github.com/aubreyli/coresched_bench.git > > They all show your patchset performs equally well...And consider what > the patch does, I think they are really doing the same thing in > different ways. > Aaron, The new feature of my new patches attempt to load balance between cores, and remove imbalance of cgroup load on a core that causes forced idle. Whereas previous patches attempt for fairness of cgroup between sibling threads, so I think the goals are kind of orthogonal and complementary. The premise is this, say cgroup1 is occupying 50% of cpu on cpu thread 1 and 25% of cpu on cpu thread 2, that means we have a 25% cpu imbalance and cpu is force idled 25% of the time. So ideally we need to remove 12.5% of cgroup 1 load from cpu thread 1 to sibling thread 2, so they both run at 37.5% on both thread for cgroup1 load without causing any force idled time. Otherwise we will try to remove 25% of cgroup1 load from cpu thread 1 to another core that has cgroup1 load to match. This load balance is done in the regular load balance paths. Previously for v3, only sched_core_balance made an attempt to pull a cookie task, and only in the idle balance path. So if the cpu is kept busy, the cgroup load imbalance between sibling threads could last a long time. And the thread fairness patches for v3 don't help to balance load for such cases. The new patches take into actual consideration of the amount of load imbalance of the same group between sibling threads when selecting task to pull, and it also prevent task migration that creates more load imbalance. So hopefully this feature will help when we have more cores and need load balance across the cores. This tries to help even cgroup workload between threads to minimize forced idle time, and also even out load across cores. In your test, how many cores are on your machine and how many threads did each page_fault1 spawn off? Tim