Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2730484imj; Mon, 18 Feb 2019 11:05:44 -0800 (PST) X-Google-Smtp-Source: AHgI3IYOwLorAb2WCu00or7lMdkOhlysaufnr2qoI+TOlOBndtCHR+LH6u8SG5tPFNggILGJ/FEk X-Received: by 2002:a65:6290:: with SMTP id f16mr20093020pgv.106.1550516744202; Mon, 18 Feb 2019 11:05:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550516744; cv=none; d=google.com; s=arc-20160816; b=tpWaqQqVazEHIBVURnD71bdTMBysst5sa6rlp+ADuCD4K3wByz0JKXvtkzPWD0RiFT ZEc6xufYNKp004UTK+JaYTpqgZB83T5MDPhX73N7/LmNLBH/t2uv+Mz3Su6ajmWEvH5M G1ToDIYBD+T7QZGHDhNpujBpjqENWyZJDAZeyR0gCkHBDbUhkMBgTQAv9oMunum7OEDP pDfZ+/p9v4JgDf9hvvIPBcS6thxNAW+RbdXZHL1/f596n0F1mNmzHCtl+2ifOteoDFAX shMScnR/MCdW7PuCyiSw4hagqbISExuCtOLw+4MIS3FXbiafXuBjrM8iKWe1Dix8TdvA dTEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:subject:cc:to:from:date:user-agent :message-id:dkim-signature; bh=GbcwH6MTE7vIHDLQR5mHm2uiwRLpzBfLve9qxk9Cyls=; b=d27IrJB0zJG8xBZ3s+xkzcoiSeUQ7c+/2cWm2Mpi8qtT1xQ9Xy+kE9tu4oIA3/9OjX VWhPaJcVps7F2eJmmwe1saGDxzVdAi+mTMcL4hcfVBC+35dt6fE416mMV+AFyMoIA7zG diX7YEvUL6WLVXjo3DAQ/p3ecwdAf/AfuNkMN5Fj5PuzL7wYwXFwKuBkXe3fwOC8VeWh 9GllthPrvgneK8Rbz6MZzCbll10kXvrALlJk5VP3jKnQrNOl99LkYZQnVc64xCS1f+Hz J1zSUbwPQDpY+2bMqufv4yFwVVBNonjZsT2wEkcGV4ViFEvJqHTSo/Vlc7qMsRfGmw/2 m9tQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b="TjuvEU/G"; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b8si13083187pgw.561.2019.02.18.11.05.28; Mon, 18 Feb 2019 11:05:44 -0800 (PST) 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=fail header.i=@infradead.org header.s=bombadil.20170209 header.b="TjuvEU/G"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388627AbfBRRka (ORCPT + 99 others); Mon, 18 Feb 2019 12:40:30 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:59062 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729728AbfBRRka (ORCPT ); Mon, 18 Feb 2019 12:40:30 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Subject:Cc:To:From:Date:Message-Id: Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=GbcwH6MTE7vIHDLQR5mHm2uiwRLpzBfLve9qxk9Cyls=; b=TjuvEU/Gwj1gh5cMJgKYIWugs hINJuUY0+9RgzBelD7y4eS3yvaq9np/+mogF6QCXnoQi6rOyVc32rB0LLNCyxoq1NJQD0juHtAyq4 w5AH1srB/MRenSwTTZMTxXDTudr5FluD98vwe0UTLcc0HeoD0WA7oIRI8ZKBUVOtg02VRG49tF7x7 TpEQwurMHc/va4lNgjtDqrGtbzDoJXmrYtls9/LY4WQe6t79MQCU+vs6aBoB5ZLmZ6KB+FCYqg5kW 777b56VWpbqhUj7U179UNDeNMyq/Lgy5V8IQfmoPzaQDPw1FBLtzfvcxzpS0uDClUAI7Hg9tvrWei W3KmJz1Pw==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1gvmu1-0005yh-1A; Mon, 18 Feb 2019 17:40:25 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 0) id 146E42848B872; Mon, 18 Feb 2019 18:40:23 +0100 (CET) Message-Id: <20190218165620.383905466@infradead.org> User-Agent: quilt/0.65 Date: Mon, 18 Feb 2019 17:56:20 +0100 From: Peter Zijlstra To: mingo@kernel.org, tglx@linutronix.de, pjt@google.com, tim.c.chen@linux.intel.com, torvalds@linux-foundation.org Cc: linux-kernel@vger.kernel.org, subhra.mazumdar@oracle.com, fweisbec@gmail.com, keescook@chromium.org, kerrnel@google.com, "Peter Zijlstra (Intel)" Subject: [RFC][PATCH 00/16] sched: Core scheduling Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org A much 'demanded' feature: core-scheduling :-( I still hate it with a passion, and that is part of why it took a little longer than 'promised'. While this one doesn't have all the 'features' of the previous (never published) version and isn't L1TF 'complete', I tend to like the structure better (relatively speaking: I hate it slightly less). This one is sched class agnostic and therefore, in principle, doesn't horribly wreck RT (in fact, RT could 'ab'use this by setting 'task->core_cookie = task' to force-idle siblings). Now, as hinted by that, there are semi sane reasons for actually having this. Various hardware features like Intel RDT - Memory Bandwidth Allocation, work per core (due to SMT fundamentally sharing caches) and therefore grouping related tasks on a core makes it more reliable. However; whichever way around you turn this cookie; it is expensive and nasty. It doesn't help that there are truly bonghit crazy proposals for using this out there, and I really hope to never see them in code. These patches are lightly tested and didn't insta explode, but no promises, they might just set your pets on fire. 'enjoy' @pjt; I know this isn't quite what we talked about, but this is where I ended up after I started typing. There's plenty design decisions to question and my changelogs don't even get close to beginning to cover them all. Feel free to ask. --- include/linux/sched.h | 9 +- kernel/Kconfig.preempt | 8 +- kernel/sched/core.c | 762 ++++++++++++++++++++++++++++++++++++++++++++--- kernel/sched/deadline.c | 99 +++--- kernel/sched/debug.c | 4 +- kernel/sched/fair.c | 129 +++++--- kernel/sched/idle.c | 42 ++- kernel/sched/pelt.h | 2 +- kernel/sched/rt.c | 96 +++--- kernel/sched/sched.h | 183 ++++++++---- kernel/sched/stop_task.c | 35 ++- kernel/sched/topology.c | 4 +- kernel/stop_machine.c | 2 + 13 files changed, 1096 insertions(+), 279 deletions(-)