[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20358dfa-4216-9e84-79a6-b34accbc4280@redhat.com>
Date: Wed, 8 Apr 2020 07:35:34 +0200
From: Daniel Bristot de Oliveira <bristot@...hat.com>
To: Jonathan Corbet <corbet@....net>
Cc: Peter Zijlstra <peterz@...radead.org>,
John Mathew <john.mathew@...kie.com>,
linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
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 4/7/20 9:40 PM, Jonathan Corbet wrote:
> On Wed, 1 Apr 2020 13:47:04 +0200
> Daniel Bristot de Oliveira <bristot@...hat.com> wrote:
>
>>> 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:
>>
>> [bristot@x1 ~]$ cat sched_transition.dot | graph-easy
>>
>> *
>>
>> |
>> | task
>> | forks
>> v
>> +------------------------------------+
>> | TASK_NEW |
>> | (Ready to run) |
>> +------------------------------------+
>> |
>> |
>> v
>> + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -+
>> ' int '
>> ' '
>> ' +------------------------------------+ '
>> ' | TASK_RUNNING | '
>> ' +--------------> | (Ready to run) | <--+ '
>> ' | +------------------------------------+ | '
>> ' | | | '
>> ' | | schedule() calls context_switch() | task is pre-empted '
>> ' | v | '
>> ' | +------------------------------------+ | '
>> ' | | TASK_RUNNING | | '
>> ' | | (Running) | ---+ '
>> ' | event occurred +------------------------------------+ '
>> ' | | '
>> ' | | - - - - - - - - - - - -+
>> ' | | '
>> ' | | task needs to wait for event '
>> ' | v '
>> ' | +------------------------------------+ '
>> ' | | TASK_INTERRUPTIBLE | '
>> ' | | TASK_UNINTERRUPTIBLE | '
>> ' +--------------- | TASK_WAKEKILL | '
>> ' +------------------------------------+ '
>> ' '
>> + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
>> |
>> | task exits via do_exit()
>> v
>> +------------------------------------+
>> | TASK_DEAD |
>> | EXIT_ZOMBIE |
>> +------------------------------------+
>>
>>
>> Is there a way to also add this representation, while hiding it
>> when using a graphical reader?
> Better, honestly, to just put the ascii art into the doc as a literal
> block. I don't see any real reason to embed Dot stuff unless there's
> really no alternative.
I agree.
I think that their idea was focused on a media that could translate the
"source-code in .dot" into a graphical representation, which is good. But that
is not the case for this file and its audience.
But, maybe, it would be nice to have the .dot somewhere (not in the document, I
agree) as a "source code" for future updates.
-- Daniel
Powered by blists - more mailing lists