Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp4355583ybh; Tue, 6 Aug 2019 10:13:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqwomWVdIondop51/3ptLuoK7B2g0CN1ghQaF9vhHi+p2wNsCLh2X2qITx5diXuwvnEB8vvN X-Received: by 2002:a17:902:8547:: with SMTP id d7mr4242803plo.171.1565111631351; Tue, 06 Aug 2019 10:13:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565111631; cv=none; d=google.com; s=arc-20160816; b=oftlGkkPlrXnskF9HYBMKfc95u4p7/I97ZClagR/MjSw4XeZWh1ugxMHqz1PwncnKp jjwPIYr86d1d/EV1YlTbBZ2x0x3X9bOTGVh868TGRZJmgJlmEkx4xVGwoweIwQ/vbp3t o6oDjRlSiZwdi2uNxaqLNXD75LXrWbjUAf4snYIvKcTd+s40xRjqrKaAcf6T+RLyHFck 7cFi6dgPhSH10yknuo3HoVejln95YJLZO1TRQMRmbiWAyt71qZXa1omGGgciWSXLGtxk M3WiSK90rSsLWmBpsKTVuAuP0934oEyQv2GiGsm6ftrQ1Om3T73L/bd72gdT7PSKsmp8 jXjg== 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=2kU8vUtngahEqmHW2S1XUf53K0cOdiBL/zU2if7hPBA=; b=sOb7gk/0jZDE96UmQhw1gDxXdhVyefZsUCgSy4gF2abPWd9PMkFeM/Y/CyGPSwHPOK JqJjgkFH+PGKG0pLPnXZf2R6CaS6GRzL7ZEx0K+kz+cf4NkuxPd6deAvGMugN2j1CEls keV+xYlRH6QcSd3FzC2zrJ585QENrzc77jhp4rCpUCBGuK/nal5U6XtG7KX3y+JyjsQQ Dg3mU85b9N/iGiNeuKa1IELeTieUjR7Ry3ZNpj6qGg5VsOiZUflBZpTSygyx8vxJwh+j S1ajfi3mWP0Aw3gfOfFEXIl9u98fXpRowOAcKWh0rMsd+Vfg+zsPlP3m6ljokoxV4v7Y eqHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@digitalocean.com header.s=google header.b=ZV2HOe+C; 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=REJECT sp=REJECT dis=NONE) header.from=digitalocean.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e19si15044826pjp.49.2019.08.06.10.13.35; Tue, 06 Aug 2019 10:13:51 -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=@digitalocean.com header.s=google header.b=ZV2HOe+C; 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=REJECT sp=REJECT dis=NONE) header.from=digitalocean.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733263AbfHFPxl (ORCPT + 99 others); Tue, 6 Aug 2019 11:53:41 -0400 Received: from mail-ot1-f66.google.com ([209.85.210.66]:34590 "EHLO mail-ot1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729161AbfHFPxl (ORCPT ); Tue, 6 Aug 2019 11:53:41 -0400 Received: by mail-ot1-f66.google.com with SMTP id n5so93754604otk.1 for ; Tue, 06 Aug 2019 08:53:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=digitalocean.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=2kU8vUtngahEqmHW2S1XUf53K0cOdiBL/zU2if7hPBA=; b=ZV2HOe+CkdXIYkkrGxoHzBb8ECZ5a8TqwsoVCM9YlCbr5ENgND/M6cdDMMxkCj3ZhM /JOY25ozOsGv+H4ffZ/gbxam8GLnd6ZfV3R3s29cPPOHz4PremFjPtHsSRiG/hzEMh70 gmnEIxYF+Q9/DteRTAgr47v/e1UagfFKgc7TY= 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=2kU8vUtngahEqmHW2S1XUf53K0cOdiBL/zU2if7hPBA=; b=cApkmlzGFslC5WnDryynAoB+FV8tqkzebw24XI+iN/+qtng6cX7eMiMk6aEoQ+nIRF AVhvUyWL1vpmXk1PIJDZ89ALaJwvHtZ+pewH6552QhiIskMSgZtX3VXBvVsgouA+yiMw pG45h/Bj/qaN/nN9uqgVIT6jffTT5UoAo2p+J7kerfWQdSYCuyU0YJy+0DMhy7EIUdYq MIt5W+xZDQH46A+30JoOtEph1Xj7EpAxy1/tADdXJaosqou8tAE9F5EhU3Uqg/UJBFU8 o08uhvwXcmf57DxyJssOV99KcJqxgZsIZxNuqOKYzrhrIpURKTExmcG6uA66Cws9InKa 2CRw== X-Gm-Message-State: APjAAAX13MqG1W+XG3UnYX/LN42tiyQDVewhF/BuIR3hGDNhwX/WINhS 1q8UjOA8e706ANmkGo+gtIxxY9HGU9oGDpTQIVRyGw== X-Received: by 2002:a9d:5787:: with SMTP id q7mr4050241oth.75.1565106820218; Tue, 06 Aug 2019 08:53:40 -0700 (PDT) MIME-Version: 1.0 References: <20190725143003.GA992@aaronlu> <20190726152101.GA27884@sinkpad> <7dc86e3c-aa3f-905f-3745-01181a3b0dac@linux.intel.com> <20190802153715.GA18075@sinkpad> <20190806032418.GA54717@aaronlu> <54fa27ff-69a7-b2ac-6152-6915f78a57f9@linux.alibaba.com> <20190806141617.GR2332@hirez.programming.kicks-ass.net> In-Reply-To: <20190806141617.GR2332@hirez.programming.kicks-ass.net> From: Vineeth Remanan Pillai Date: Tue, 6 Aug 2019 11:53:29 -0400 Message-ID: Subject: Re: [RFC PATCH v3 00/16] Core scheduling v3 To: Peter Zijlstra Cc: Aaron Lu , Aubrey Li , Tim Chen , Julien Desfossez , "Li, Aubrey" , Subhra Mazumdar , Nishanth Aravamudan , 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 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 > > What accounting in particular is upset? Is it things like > select_idle_sibling() that thinks the thread is idle and tries to place > tasks there? > The major issue that we saw was, certain work load causes the idle cpu to never wakeup and schedule again even when there are runnable threads in there. If I remember correctly, this happened when the sibling had only one cpu intensive task and did not enter the pick_next_task for a long time. There were other situations as well which caused this prolonged idle state on the cpu. One was when pick_next_task was called on the sibling but it always won there because vruntime was not progressing on the idle cpu. Having a coresched idle makes sure that the idle thread is not overloaded. Also vruntime moves forward and tsk vruntime comparison across cpus works when we normalize. > It should be possible to change idle_cpu() to not report a forced-idle > CPU as idle. I agree. If we can identify all the places the idle thread is considered special and also account for the vruntime progress for force idle, this should be a better approach compared to coresched idle thread per cpu. > > (also; it should be possible to optimize select_idle_sibling() for the > core-sched case specifically) > We haven't seen this because, most of our micro test cases did not have more threads than the cpus. Thanks for pointing this out, we shall cook some tests to observe this behavior. Thanks, Vineeth