Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp217409ybi; Thu, 30 May 2019 23:54:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqwwCwoQHamDX2t2SpLYY8Xfu59Andw4cOWdlzBt2LLvlDVYSS6Qr84fG5U+PGANLKC2TRaM X-Received: by 2002:a63:1460:: with SMTP id 32mr7341601pgu.319.1559285695324; Thu, 30 May 2019 23:54:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559285695; cv=none; d=google.com; s=arc-20160816; b=KP+3GnHRmnnTaEAMYZTPSanxZttCL7k426vfTtPeQbofcW10jbZhQCe5tAL/zxTmcM k4nwwE49GkQwlEm8rN4Z7faVh7+Z176dzSmecmegf2WHFc3u/7bUC6fJFoG3Re4sWzyw FATZydLXOQNuCGRuXNU0eSS86f5/9dupRKTX2mlfu6+ynly9R0xJh5fnQzvml/HYS0Uw tvPx/SD2KNnFEaz2OHiJK6smTXp+VE6Kooe3PVWlCf13aYyc7MYbisJpbPVCtomwM7f8 2bhxVN5qhWztGASd/baEIj1LpCPH/YHhInetle6fw42BRBBNw/7jxLyY79YUwCE7ZPz2 tWjw== 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=ixtzvwr6OAXulCUUC9jq9Xmlzxs9UBVrOck9k45G2oE=; b=Hf8mM468lnRXgSXlIKImPW/4lCpTJi4K/elsE5fkPDZ+m0HtgO2HOc7sIVt7l1IPGs wN+U79CoyDjVyPaZX1BTxPxmkkjR9j9pDLc1QdupfNiobGviOFC+EvRzrhAlCNGBfWsK /SrZerJGoctcnM20WP42KJdgJRfSgj5U1l40ZVX1IS4nH/c9MrEVtE5R4JyQy3s/BmPq u/PzMUfWmG7DKl/mtaD31KTg4NXpbCn8sNezRI9Ic/b65PW4GRpqE+tB6R5AMQ56GOar 16PfgRf8nvvV48bxMn2pM4CF4k3epdKZTyaBJ6DvMWSUb48tKGl4dni31YSIZ72NkqoZ Owuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=PwcrjK51; 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 n63si4896183pgn.511.2019.05.30.23.54.39; Thu, 30 May 2019 23:54:55 -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=PwcrjK51; 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 S1726520AbfEaGxf (ORCPT + 99 others); Fri, 31 May 2019 02:53:35 -0400 Received: from mail-lf1-f65.google.com ([209.85.167.65]:37945 "EHLO mail-lf1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726002AbfEaGxe (ORCPT ); Fri, 31 May 2019 02:53:34 -0400 Received: by mail-lf1-f65.google.com with SMTP id b11so7019975lfa.5 for ; Thu, 30 May 2019 23:53:33 -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=ixtzvwr6OAXulCUUC9jq9Xmlzxs9UBVrOck9k45G2oE=; b=PwcrjK51/xlqSUlAN4uLHBclRr9umQumstkOA7FMfpqnsXSxeVoQskE+ltGjhobl50 pgQdDwGtXSc4qqdHAnAiDwoJDcn0iaqYmTGzbznMvBt0/nXfsE9oO7LthGSxaOcrjo8M D8rNLQvfcZn+dZJx3fHuxLSvENelhFsnOSPPCyRRkgXQ4xWJ1dJYIeGmoiEv1JFNH6CH BFmLRrqtPm/RSMKGia68UH9jg06plIlOThXoPukcrOiQHuBqkjI3W6W3dS5LV13COHzR RPXtqvFpc8Pra6dZxgxA0qFZEVfmWWXDyLAKkRoNjrgKs0NY4Bljh18UpTbKn9C2tpEe jopA== 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=ixtzvwr6OAXulCUUC9jq9Xmlzxs9UBVrOck9k45G2oE=; b=t1UR1LeG5Fud8NsNu5/6R8ph+X+kDghDc332Uxd5RsMeYpFfIOXIVt3/qC0bmf4zUR GTtMVCJu4sw5RpMKnLhQdq1NrTCTjaeYyksO90Mm8WwljzswxKKV5IMK+GKUlW5bcikn Fg7MQ9On0YYmKZaA6pIjDoB3iwjHGCyBEYThjR2JwR7DaWWzCHgZ8VPqlkeJ5JjAthjJ D5LfRLquaVNw2GSvfXNujOlR3xbRpvQPlH/4733Ad5p2UBHS+4zodPshJIj5Bd6b7U5L 7qCAscWwkLG3pdQosZF3cdPVadC8akmkQajch98hgpi6h3cbO1YS46uTwQ7A5Qk05lBq 3OCw== X-Gm-Message-State: APjAAAX/M7D+hYu0l0jW/K6QQYchUzV39HfnCovbqgpIXuWXtdTpFgHK gn1D3exHjrVvmUQgkUNyIajvu38XsZS1QOK0ykc= X-Received: by 2002:ac2:42cb:: with SMTP id n11mr4252789lfl.179.1559285612749; Thu, 30 May 2019 23:53:32 -0700 (PDT) MIME-Version: 1.0 References: <21fda627-1d3c-12cc-6389-8c226218e2ce@linux.alibaba.com> In-Reply-To: <21fda627-1d3c-12cc-6389-8c226218e2ce@linux.alibaba.com> From: Aubrey Li Date: Fri, 31 May 2019 14:53:21 +0800 Message-ID: Subject: Re: [RFC PATCH v3 00/16] Core scheduling v3 To: Aaron Lu 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 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 Fri, May 31, 2019 at 2:09 PM Aaron Lu wrote: > > 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. 64 threads should spread onto all the 52 cores, but why they can get scheduled while untagged "date" can not? Is it because in the current implementation the task with cookie always has higher priority than the task without a cookie? Thanks, -Aubrey