Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp184443ybi; Thu, 30 May 2019 23:12:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqxOBZfstN96v2RBnnEYUTXA6j+0BJ1PZTsVEILG173jAXGk6XxXwxAPSnzvXTVdm0Xvmlhl X-Received: by 2002:a63:4621:: with SMTP id t33mr7251226pga.246.1559283127066; Thu, 30 May 2019 23:12:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559283127; cv=none; d=google.com; s=arc-20160816; b=gngzAus4sSXKGpnvPLH4/xEHtudfVdWLKHJeigCwKBQZMUEV+qt9mYZU4TTpVx3BJZ ZTAFXlcghmwlMsfN5rQxHek7Tc5DizuL3JoLqD9GMyLzgn1E4EI+ADBgP8bN57V2joUk RVOc5zgXZAAXoFiIhkyuOYmiIMHHdR6z+v0Jge3fRYhFCK+qveyVYTaAXbe7Fq5dUHZ3 bCgsSmPoYe5dkjg7Rw0vN82ML3q1J6FbuxS14a5xZOk/Wqhh/FNLmhcURGP9zc7kjW8E VaPj2yCUmqpfJQBOBtyBE1RWS9sQn7FB6mDtWdTGL4QuUnH1UOoikSpB7Ln7X4CgKDk/ hn3w== 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:from:references:cc:to:subject; bh=bExPFP42hYMJwxZEHTLKXQE+aS9TyD+uf2W2LhWD9j4=; b=KAZ+VciF9VSWals22U8F4Pz5VrazeodLZXHEKeFZMnO3HWoYmSxAj7x3vV/v/yQjlj 85YbSOnhh5kIpbhskTlSqI2NKNYXljr4EoPeCwfj4iEK8acRGeyPhLA+ob2M098ZPWzm Wp6z3CA4ONa/imo9aeAt6mu+EpbH0EurHwJOiJvhHC9BxnmRJK0aGX94SqeCFcU+COnJ Dnvh0vZ2aIAsJYnqRnCDZjI/iS5GEXpWdOFJiQNi6dKy/s3l5sdYv2r/29kcvJAcobN6 GUdxHCrpbIPWUqRBXtG5zqeX+HQYa1KXuoT7pf57UcWvMEgr39qqoNGlCj2JQKimPdfV IoAQ== 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=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j4si4641398pgc.213.2019.05.30.23.11.49; Thu, 30 May 2019 23:12:07 -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=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726724AbfEaGJa (ORCPT + 99 others); Fri, 31 May 2019 02:09:30 -0400 Received: from out30-42.freemail.mail.aliyun.com ([115.124.30.42]:33825 "EHLO out30-42.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725955AbfEaGJ3 (ORCPT ); Fri, 31 May 2019 02:09:29 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R461e4;CH=green;DM=||false|;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04394;MF=aaron.lu@linux.alibaba.com;NM=1;PH=DS;RN=20;SR=0;TI=SMTPD_---0TT3KRH6_1559282949; Received: from 30.17.232.221(mailfrom:aaron.lu@linux.alibaba.com fp:SMTPD_---0TT3KRH6_1559282949) by smtp.aliyun-inc.com(127.0.0.1); Fri, 31 May 2019 14:09:23 +0800 Subject: Re: [RFC PATCH v3 00/16] Core scheduling v3 To: Aubrey Li Cc: Vineeth Remanan Pillai , Nishanth Aravamudan , Julien Desfossez , 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 , Valentin Schneider , Mel Gorman , Pawan Gupta , Paolo Bonzini References: From: Aaron Lu Message-ID: <21fda627-1d3c-12cc-6389-8c226218e2ce@linux.alibaba.com> Date: Fri, 31 May 2019 14:09:08 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019/5/31 13:12, Aubrey Li wrote: > On Fri, May 31, 2019 at 11:01 AM Aaron Lu wrote: >> >> This feels like "date" failed to schedule on some CPU >> on time. >> >> My first reaction is: when shell wakes up from sleep, it will >> fork date. If the script is untagged and those workloads are >> tagged and all available cores are already running workload >> threads, the forked date can lose to the running workload >> threads due to __prio_less() can't properly do vruntime comparison >> for tasks on different CPUs. So those idle siblings can't run >> date and are idled instead. See my previous post on this: >> https://lore.kernel.org/lkml/20190429033620.GA128241@aaronlu/ >> (Now that I re-read my post, I see that I didn't make it clear >> that se_bash and se_hog are assigned different tags(e.g. hog is >> tagged and bash is untagged). > > Yes, script is untagged. This looks like exactly the problem in you > previous post. I didn't follow that, does that discussion lead to a solution? No immediate solution yet. >> >> Siblings being forced idle is expected due to the nature of core >> scheduling, but when two tasks belonging to two siblings are >> fighting for schedule, we should let the higher priority one win. >> >> It used to work on v2 is probably due to we mistakenly >> allow different tagged tasks to schedule on the same core at >> the same time, but that is fixed in v3. > > I have 64 threads running on a 104-CPU server, that is, when the 104-CPU means 52 cores I guess. 64 threads may(should?) spread on all the 52 cores and that is enough to make 'date' suffer. > system has ~40% idle time, and "date" is still failed to be picked > up onto CPU on time. This may be the nature of core scheduling, > but it seems to be far from fairness. Exactly. > Shouldn't we share the core between (sysbench+gemmbench) > and (date)? I mean core level sharing instead of "date" starvation? We need to make core scheduling fair, but due to no immediate solution to vruntime comparison cross CPUs, it's not done yet.