Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp298570ybi; Fri, 31 May 2019 01:29:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqwVog7j59SxQ6xvACcVLoaz3Mw4SLdqPuxLJETcj3kGR7d7PLasfAK0XK8p1i1QAp/UK18D X-Received: by 2002:a17:902:b083:: with SMTP id p3mr7822702plr.151.1559291384134; Fri, 31 May 2019 01:29:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559291384; cv=none; d=google.com; s=arc-20160816; b=lZoiBQ2mrSRhvCr7WwJ/r8r4t5her6blVqXKJsxkTq+wrzNvbfIOBAKfe29kVtOBLc teIezTYzl9FO/6Qey+k400O9M/J7gtQpho2kPBivasg1LM61s8VFp+WbliD4alQYY2XZ ZOW99qW1C4Q00dVQHzZrQE0za8+j6r4nicHyJpCQprDCIHbjpWQg0LCqwjKAteQc9OGn zDX6rkHi543VD2IWpI7tl/IvCYPrpFTA7VFHiji5cQXB0gVKNMHU6GgHoSGVwub/3bP/ TdY77BxZHKMvskGnCxoHQasI9jZcmftgSptWyb4+d7OVn6sJzNLU3J2fiePnmhAtHUcF /VKg== 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=vfC0vBfj3dl+S4JICqcjDoSBUZJGnS+ckX0H0B+UWP8=; b=rmmQonAe4bbjlBJ+7ZMig+tFiyMUCL2HSNtox5HAossJ89o0KfyiouZdxGhjIoBcjP fOMHRyqP2WYuXZTDgRub5Vhi0qhbJYnzlMwjZsNSzTOVrJEAPt+XX/JFwNFrLc7pRBjB otCSIFbml+nYsvSVq4hykT5K6djU9g8xE5Gun3KKWZ4Uu6UTcJ38N4PCxiK2LZAYfYM5 jNMuPxDFgDoTrXUE43QBK9LCPAm4/kDKEcnqetnPXog/JyJVs36IGau7H0kNGn5xKXJ4 X8Ej8XEszTsRMrTHyG20kgIsXMfppEoDgmyr1DDlCJErUtTygQUukA+NvLiQBBuI7xfg 3vlA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=uuf3Zngw; 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 p1si3887099pld.432.2019.05.31.01.29.28; Fri, 31 May 2019 01:29:44 -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=uuf3Zngw; 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 S1726957AbfEaI0p (ORCPT + 99 others); Fri, 31 May 2019 04:26:45 -0400 Received: from mail-lf1-f67.google.com ([209.85.167.67]:43234 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726867AbfEaI0l (ORCPT ); Fri, 31 May 2019 04:26:41 -0400 Received: by mail-lf1-f67.google.com with SMTP id d7so63988lfb.10 for ; Fri, 31 May 2019 01:26:39 -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=vfC0vBfj3dl+S4JICqcjDoSBUZJGnS+ckX0H0B+UWP8=; b=uuf3ZngwL3h2t7t4f1mqw1SA7AcmRSii9KiV/Qip2UqqQwkIcD+M5Ncpooxlpjetn+ EVwVYGzH/O3ILxbusPiGYoniriBwnLhhb9LcJn2zu+IwE0ZHWaQWjUbup4SXE3tY5shP xuTqV3C0Zoq549IsRmGbXJObFgBs0iytW1nh1YMl6A6rtjQPau14oxFWF4rgbO8NbWSY 1yaAOQn9MbjCB0D927ZUIW8CEG4A+c+ephFuvW9vkTkn5TFYfEoCooAx86i8z8PVrjqt djIcCisQKhSypwUNeJd5TzQY131nMP+BgI2vdnOcbQNJbUFWBzECg3+/mriPZrMcUQbK rGCg== 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=vfC0vBfj3dl+S4JICqcjDoSBUZJGnS+ckX0H0B+UWP8=; b=LMCZenm0k1UDAWP6LcdmKuxkVYVuggl580G9Jpp/WkAhdpefNjkep5lUG1nOMsrL9y q5TJ4PdDUhtOJ59amJYn2WmbIS2/rAexh6yY4pZvOYOYX/kPJKU2RbEx2CawKMecQD1t ncOLSX8i7/0M1Oi1X1HAN1OGRvs8vXkWO2N8BZXVpxkVXXkkuVBQOHxC5RfbeKlhs1Bs 69rGdDWzTME2b6YbdxEH9hD3NrwjinOceNs2sEEZWQ0oo8mofoLhYUiR6X4RxTaBMF9y QFddxn6oXJUTeRzPafPSIwX80oLv8BTd0Lp5L/ME5kMGuRNpGURS1ZIv5osd0fG4Zs9S 1aHA== X-Gm-Message-State: APjAAAUAWHus+ICkovItbbPfP4ASvlRQtxAZPZ3UDk+E1LIz3tw1WkrU WJj5q9HCaH7Mipc/b9RU5JC+AZILvpLFRcZC1z0= X-Received: by 2002:a19:a5ca:: with SMTP id o193mr4826260lfe.89.1559291198938; Fri, 31 May 2019 01:26:38 -0700 (PDT) MIME-Version: 1.0 References: <21fda627-1d3c-12cc-6389-8c226218e2ce@linux.alibaba.com> <20190531074456.GA314@aaronlu> In-Reply-To: <20190531074456.GA314@aaronlu> From: Aubrey Li Date: Fri, 31 May 2019 16:26:26 +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 3:45 PM Aaron Lu wrote: > > On Fri, May 31, 2019 at 02:53:21PM +0800, Aubrey Li wrote: > > 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 > > If 'date' didn't get scheduled, there will be no output at all unless > all those workload threads finished :-) Certainly I meant untagged "date" can not be scheduled on time, :) > > I guess the workload you used is not entirely CPU intensive, or 'date' > can be totally blocked due to START_DEBIT. But note that START_DEBIT > isn't the problem here, cross CPU vruntime comparison is. > > > implementation the task with cookie always has higher priority than the > > task without a cookie? > > No. I checked the benchmark log manually, it looks like the data of two benchmarks with cookies are acceptable, but ones without cookies are really bad.