lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20221120205205.itjp7ken5hdbtkty@airbuntu>
Date:   Sun, 20 Nov 2022 20:52:05 +0000
From:   Qais Yousef <qyousef@...alina.io>
To:     Bagas Sanjaya <bagasdotme@...il.com>
Cc:     kernel test robot <lkp@...el.com>, Ingo Molnar <mingo@...nel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Dietmar Eggemann <dietmar.eggemann@....com>,
        Vincent Guittot <vincent.guittot@...aro.org>,
        oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org,
        Lukasz Luba <lukasz.luba@....com>,
        Xuewen Yan <xuewen.yan94@...il.com>, Wei Wang <wvw@...gle.com>,
        Jonathan JMChen <Jonathan.JMChen@...iatek.com>,
        Hank <han.lin@...iatek.com>, Paul Bone <pbone@...illa.com>,
        Jonathan Corbet <corbet@....net>, linux-doc@...r.kernel.org
Subject: Re: [PATCH] Documentation: sched: Add a new sched-util-clamp.rst

On 11/16/22 15:36, Bagas Sanjaya wrote:
> On Tue, Nov 15, 2022 at 08:55:47PM +0000, Qais Yousef wrote:
> > > >  2.1  BUCKETS:
> > > >  -------------
> > > >  
> > > > +.. code-block:: c
> > > > +
> > > >                             [struct rq]
> > > >  
> > > > -(bottom)                                                    (top)
> > > > +  (bottom)                                                    (top)
> > > >  
> > > > -  0                                                          1024
> > > > -  |                                                           |
> > > > -  +-----------+-----------+-----------+----   ----+-----------+
> > > > -  |  Bucket 0 |  Bucket 1 |  Bucket 2 |    ...    |  Bucket N |
> > > > -  +-----------+-----------+-----------+----   ----+-----------+
> > > > -     :           :                                   :
> > > > -     +- p0       +- p3                               +- p4
> > > > -     :                                               :
> > > > -     +- p1                                           +- p5
> > > > -     :
> > > > -     +- p2
> > > > +    0                                                          1024
> > > > +    |                                                           |
> > > > +    +-----------+-----------+-----------+----   ----+-----------+
> > > > +    |  Bucket 0 |  Bucket 1 |  Bucket 2 |    ...    |  Bucket N |
> > > > +    +-----------+-----------+-----------+----   ----+-----------+
> > > > +       :           :                                   :
> > > > +       +- p0       +- p3                               +- p4
> > > > +       :                                               :
> > > > +       +- p1                                           +- p5
> > > > +       :
> > > > +       +- p2
> > > 
> > > The code block above is diagram, isn't it? Thus specifying language for
> > > syntax highlighting (in this case ``c``) isn't appropriate.
> > 
> > I could do with a helping hand here actually. I am a text only person but
> > trying to follow the new rst docs; but I don't have a clue to be honest.
> > 
> > I did try to find the right directive, but I couldn't find it. What should be
> > specified for this diagram?
> 
> Just leave ..code-block:: directive alone or use simpler double colon
> (::). The highlighting will not be applied to the code snippet.

Leaving

	..code-block::

produces this error:

	sched-util-clamp.rst:172: WARNING: Error in "code-block" directive: 1 argument(s) required, 0 supplied

I used

	::

and it seems to produces the desired results. I tried this first but I think my
indentation was broken then which is why it didn't work at the time and I moved
to code-block.

> 
> > > > @@ -200,6 +203,8 @@ The rq has a bucket for each uclamp_id: [UCLAMP_MIN, UCLAMP_MAX].
> > > >  The range of each bucket is 1024/N. For example for the default value of 5 we
> > > >  will have 5 buckets, each of which will cover the following range:
> > > >  
> > > > +.. code-block:: c
> > > > +
> > > 
> > > Again, why ``c`` syntax highlighting?
> > 
> > This is a C code snippet. What would be better to use? I think I was getting
> > errors if I don't specify something. But again; I was touching my way around in
> > the dark here trying to figure it out.
> > 
> 
> Yup, that's the correct language for highlighting.

Thanks Bagas!


--
Qais Yousef

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ