Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp437139ybb; Wed, 1 Apr 2020 03:03:26 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvpNkNFsXaQqlb3KlCuMEqsR/QPgn5aW/J0XD66zJ7XjiG0oXtnXCa3sfv0uFR6RmtHbmGd X-Received: by 2002:a9d:468b:: with SMTP id z11mr7981590ote.311.1585735405887; Wed, 01 Apr 2020 03:03:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585735405; cv=none; d=google.com; s=arc-20160816; b=LzBhPuGwDKSCaNUHKItJzaH9YM9bS83x8+iP44XLtytuNT2wzdl4jInTKGUCd+MQYn Rw1rPI/rZW22R3t9Vz/6J9nJecEI5/CCkvAxrnvSKN9kKXIms6OmWPZ+MHLP7whYcDdL aQo51IwfrFVKUGhnm5XaA27V0tenW945ABurNYhU2LNPkpJTn4xnTHR4nncJI40XW2Ls 8r0PgqAxzt3uCXfuIh3nPP62Imts+0kSlIUF+rDmL2PTXuEXMslKcezZj4RMNsTeE28m Oo7YV/zzx6Km9245n9SX3zhVFpROhKl0RtOuh2ncoXgnS5aW+m512CcjvrfHG57qyjZq uyPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=g2acQBwSdU8TClaR1PdrlLUVyKKZBvmfDgY4bZv6CmQ=; b=sXadbV2RFRt9sJig16mY9oPs3R8VWsccTOYWEFcX6cgzmeI7RCw2NsCD0cyBjSqOZn LZkI9R6pwHF3fMn//i8glwbkV0+B8KKvdnM0RzAyoYotMeIjUkTG8qy5L4EpBJkuLPKR g6SLhxgm8BXOiIZFQbpIay1kbi9pX5mdY10CmTfBJ5x4HOMHUXjlcN/OinlRlzRpV034 nZMi1nq/ESLg44Z3nqNN9Es+AFypJIydrfqCaGLy1Kc7JEWqsdwIQvPjByKQ8zQ3p6Cj 5MuTdj9OtuYunQrRtztZiFh0Xw+pp/mBh6eObJd3AMjI6EFnLOg2FwSjc+i023Uu5T4A ujUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@unikie-com.20150623.gappssmtp.com header.s=20150623 header.b=SQ5ypJul; 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 e23si645124oth.117.2020.04.01.03.03.13; Wed, 01 Apr 2020 03:03:25 -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=@unikie-com.20150623.gappssmtp.com header.s=20150623 header.b=SQ5ypJul; 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 S1732163AbgDAKCv (ORCPT + 99 others); Wed, 1 Apr 2020 06:02:51 -0400 Received: from mail-lj1-f193.google.com ([209.85.208.193]:45354 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726335AbgDAKCv (ORCPT ); Wed, 1 Apr 2020 06:02:51 -0400 Received: by mail-lj1-f193.google.com with SMTP id t17so25154536ljc.12 for ; Wed, 01 Apr 2020 03:02:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=unikie-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=g2acQBwSdU8TClaR1PdrlLUVyKKZBvmfDgY4bZv6CmQ=; b=SQ5ypJulyOsWIY3Ku0c0sdTpo8CFdwNq9pU9PKkyuH0O1H+hNSfPsW5ofyi3gGlpSg TWWLl8t2kD3LGgxzaY321b3JbSeQn2nf32tTxsePH9WxrOhaQGdU2aaG5iSCn64Jhl2K MrEqIqqbs31++Hhu5bjEGF73pngDZEIqv0qRNkuyLW2bxyRgHziPvbx7m82Qvfa04+il f1zVa2brw7CZy7CvX+CnT38xcJSTqXa4m8pok+HYiAOr3XDowk7T4PgmiAxXZKA1Xqbd hjhDyb11yKz+n2/AnaVGej0uJAnxdmlRj833TUFoQq7HNYu6bcobre1DQEqerpcJaQGZ NV0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=g2acQBwSdU8TClaR1PdrlLUVyKKZBvmfDgY4bZv6CmQ=; b=qdGGcRTtIy/yTDIR3MN177ckme6va6Pwuqb+G5MMk77hT/m8n+98JABknyuVPo9GYV AAdhBnH1qabOk6lrhrNBCDBb1wAvfSgK35Qd3Dtvb5aJlcqSfexJzFY2kfdYZKalkNcO kaaNA0h/77pqN3HIV0J/e2J83usXB87FDskPeSsw4w94hJ096B0h5GCO9JqXWfxht/ZI Yh5h1SMqiSoZnYMIlarbIHZq8Zhuj0YgJ3jZGWr52X8U4HavO39CWSx7BTm3Wu99Hj+b Os+oKS9imiJ8WSpinnq+Kvv9wfYMLYdg9hxM0D7s1lLxEUwWZxTE0b7RHereGKcTQdsn Srxg== X-Gm-Message-State: AGi0PuaoRiVB2pXFHAPZuNaOOHg8/aecpotETqFrj+vRPbK0SCbQjTyU rJd4c8BPKA/liT+THmtmi2NpAQ== X-Received: by 2002:a05:651c:404:: with SMTP id 4mr12957660lja.281.1585735368186; Wed, 01 Apr 2020 03:02:48 -0700 (PDT) Received: from localhost.localdomain (dyvyn9m99j8s7-9xsphjt-4.rev.dnainternet.fi. [2001:14bb:440:beab:bd3f:1fbf:f66f:618f]) by smtp.googlemail.com with ESMTPSA id n14sm862986ljm.104.2020.04.01.03.02.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Apr 2020 03:02:47 -0700 (PDT) From: John Mathew To: linux-doc@vger.kernel.org Cc: linux-kernel@vger.kernel.org, corbet@lwn.net, mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, bristot@redhat.com, tsbogend@alpha.franken.de, lukas.bulwahn@gmail.com, x86@kernel.org, linux-mips@vger.kernel.org, tglx@linutronix.de, mostafa.chamanara@basemark.com, John Mathew Subject: [RFC PATCH 0/3] Add scheduler overview documentation Date: Wed, 1 Apr 2020 13:00:26 +0300 Message-Id: <20200401100029.1445-1-john.mathew@unikie.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi all, Based on our investigation in the area of the MIPS scheduler context switch we wish to share our learnings about the kernel scheduler in the form of kernel documentation. Investigations were done mostly by stepping through the code using GDB and code inspection. The aim of the patchset is to provide a brief overview of the kernel scheduler starting from a brief history, the overview of the kernel structs used by the scheduler, scheduler invocation and context switch. We have also added a small section on scheduler state modelling possibilities. In order to add these subjects we have restructured the existing scheduler documentation so as to put them in to suitable sections. We hope the new structure will enable easy extension of the scheduler documentation. Patch 1 creates place holders and new structure for the scheduler documentation. The main sections are - Scheduler overview: Overview of the scheduler. - CFS: A section dedicated to CFS scheduler. - Process context switching: Context switching overview. - Scheduler features: We thought most of the existing documentation can be moved here. - Architecture Specific Scheduler Implementation Differences: Aimed for each architecture and future updates. - Scheduler Debugging Interface: For scheduler diagnostics and utilities - Scheduler related functions: Scheduler API reference. Patch 2: Adds documentation for the place holders of the Scheduler overview, Scheduler State Transition and CFS sections. Patch 3: Adds documentation for the place holder of the Process context switching and add 2 new sections to for x86 and MIPS context switch. John Mathew (3): docs: scheduler: Restructure scheduler documentation. docs: scheduler: Add scheduler overview documentation docs: scheduler: Add introduction to scheduler context-switch Documentation/scheduler/arch-specific.rst | 14 + Documentation/scheduler/cfs-data-structs.rst | 208 ++++++++++++++ Documentation/scheduler/cfs-overview.rst | 46 ++++ .../scheduler/cfs-sched-overview.rst | 17 ++ Documentation/scheduler/context-switching.rst | 71 +++++ Documentation/scheduler/index.rst | 31 ++- .../scheduler/mips-context-switch.rst | 78 ++++++ Documentation/scheduler/overview.rst | 260 ++++++++++++++++++ Documentation/scheduler/sched-debugging.rst | 14 + Documentation/scheduler/sched-features.rst | 20 ++ Documentation/scheduler/scheduler-api.rst | 34 +++ .../scheduler/x86-context-switch.rst | 59 ++++ kernel/sched/core.c | 36 ++- 13 files changed, 867 insertions(+), 21 deletions(-) create mode 100644 Documentation/scheduler/arch-specific.rst create mode 100644 Documentation/scheduler/cfs-data-structs.rst create mode 100644 Documentation/scheduler/cfs-overview.rst create mode 100644 Documentation/scheduler/cfs-sched-overview.rst create mode 100644 Documentation/scheduler/context-switching.rst create mode 100644 Documentation/scheduler/mips-context-switch.rst create mode 100644 Documentation/scheduler/overview.rst create mode 100644 Documentation/scheduler/sched-debugging.rst create mode 100644 Documentation/scheduler/sched-features.rst create mode 100644 Documentation/scheduler/scheduler-api.rst create mode 100644 Documentation/scheduler/x86-context-switch.rst -- 2.17.1