[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200401122606.GF20713@hirez.programming.kicks-ass.net>
Date: Wed, 1 Apr 2020 14:26:06 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Daniel Bristot de Oliveira <bristot@...hat.com>
Cc: John Mathew <john.mathew@...kie.com>, linux-doc@...r.kernel.org,
linux-kernel@...r.kernel.org, corbet@....net, mingo@...hat.com,
juri.lelli@...hat.com, vincent.guittot@...aro.org,
dietmar.eggemann@....com, rostedt@...dmis.org, bsegall@...gle.com,
mgorman@...e.de, tsbogend@...ha.franken.de,
lukas.bulwahn@...il.com, x86@...nel.org,
linux-mips@...r.kernel.org, tglx@...utronix.de,
mostafa.chamanara@...emark.com
Subject: Re: [RFC PATCH 2/3] docs: scheduler: Add scheduler overview
documentation
On Wed, Apr 01, 2020 at 01:47:04PM +0200, Daniel Bristot de Oliveira wrote:
> On 4/1/20 12:35 PM, Peter Zijlstra wrote:
> >> +Scheduler State Transition
> >> +==========================
> >> +
> >> +A very high level scheduler state transition flow with a few states can be
> >> +depicted as follows.
> >> +
> >> +.. kernel-render:: DOT
> >> + :alt: DOT digraph of Scheduler state transition
> >> + :caption: Scheduler state transition
> >> +
> >> + digraph sched_transition {
> >> + node [shape = point, label="exisiting task\n calls fork()"]; fork
> >> + node [shape = box, label="TASK_NEW\n(Ready to run)"] tsk_new;
> >> + node [shape = box, label="TASK_RUNNING\n(Ready to run)"] tsk_ready_run;
> >> + node [shape = box, label="TASK_RUNNING\n(Running)"] tsk_running;
> >> + node [shape = box, label="TASK_DEAD\nEXIT_ZOMBIE"] exit_zombie;
> >> + node [shape = box, label="TASK_INTERRUPTIBLE\nTASK_UNINTERRUPTIBLE\nTASK_WAKEKILL"] tsk_int;
> >> + fork -> tsk_new [ label = "task\nforks" ];
> >> + tsk_new -> tsk_ready_run;
> >> + tsk_ready_run -> tsk_running [ label = "schedule() calls context_switch()" ];
> >> + tsk_running -> tsk_ready_run [ label = "task is pre-empted" ];
> >> + subgraph int {
> >> + tsk_running -> tsk_int [ label = "task needs to wait for event" ];
> >> + tsk_int -> tsk_ready_run [ label = "event occurred" ];
> >> + }
> >> + tsk_int -> exit_zombie [ label = "task exits via do_exit()" ];
> >> + }
> > And that is a prime example of why I hates RST, it pretty much mandates
> > you view this with something other than a text editor.
>
> The good thing about the dot format is that we can convert it to many other
> formats, including text:
Oh, I know and love dot files, I generate them occasionally. But they
stink as end-result, which is what it is here.
If you can't read a document (or worse comment) in a code editor it's
broken (and yes, I know some subsystems have a different opinion here).
Powered by blists - more mailing lists