All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@linux.ibm.com>
To: Akira Yokosawa <akiyks@gmail.com>
Cc: perfbook@vger.kernel.org
Subject: Re: [PATCH 0/6] formal/spinhint: Update code snippet
Date: Thu, 7 Feb 2019 01:17:57 -0800	[thread overview]
Message-ID: <20190207091757.GE4240@linux.ibm.com> (raw)
In-Reply-To: <d48a0e7f-6869-86ac-6edf-a47c33cdaeb7@gmail.com>

On Thu, Feb 07, 2019 at 07:42:26AM +0900, Akira Yokosawa wrote:
> On 2019/02/02 09:34:37 -0800, Paul E. McKenney wrote:
> > On Sun, Feb 03, 2019 at 12:05:32AM +0900, Akira Yokosawa wrote:
> >> Hi Paul,
> >>
> >> Here is another round of code snippet update, with modernization
> >> of outputs of Spin and tables of state search results.
> >>
> >> Patch #1 updates fcvextract.pl so that .spin files are handled
> >> as the same as C source files.
> >>
> >> Patch #2 applies the new scheme to code snippets. It also contains
> >> minor changes for better typesetting.
> >>
> >> Patch #3 replaces captures of Spin outputs with those obtained
> >> from Spin version 6.4.8. This commit adds outputs as .lst files
> >> under CodeSamples/formal/promela/. They are added to the dependency
> >> in the top level Makefile.
> >>
> >> Patch #4 updates tables of Spin result.  For qrcu.spin, I used
> >> the compiler flag -DCOLLAPSE to complete the state search for
> >> updaters=3 readers=2 on a machine with 16GB memory. As far as
> >> I understand correctly, this compiler flag does not affect the
> >> completeness of state search. So I added some explanation in the text
> >> to mention the flag and the argument -mN of ./pan to increase the
> >> limit of search depth.
> >>
> >> Patch #5 tweaks footnote on a cell in a table.
> >>
> >> Patch #6 is a nitpick patch to consistently use \co{}.
> >>
> >> I'm wondering if Patch #4 is OK from your perspective.
> >> Any feedback is welcome!
> > 
> > Very good, applied and pushed!  I added a small patch on top of Patch #4
> > updating the extrapolation.  It was about a terabyte, and is now about
> > half that.
> 
> Half a terabyte is not prohibitively large these days, and Spin has
> another compaction option "-DMA=N" which aggressively reduces memory
> consumption in exchange of search speed.
> 
> It took three days to complete, with the total memory usage of 6.5GB.
> The output looks as follows:
> 
> --------
> (Spin Version 6.4.6 -- 2 December 2016)
>         + Partial Order Reduction
>         + Graph Encoding (-DMA=96)
> 
> Full statespace search for:
>         never claim             - (none specified)
>         assertion violations    +
>         cycle checks            - (disabled by -DSAFETY)
>         invalid end states      +
> 
> State-vector 96 byte, depth reached 2055621, errors: 0
> MA stats: -DMA=84 is sufficient
> Minimized Automaton:    56420520 nodes and 1.75128e+08 edges
> 9.6647071e+09 states, stored
> 9.7503813e+09 states, matched
> 1.9415088e+10 transitions (= stored+matched)
> 7.2047951e+09 atomic steps
> 
> Stats on memory usage (in Megabytes):
> 1142905.887     equivalent memory usage for states (stored*(State-vector + overhead))
>  5448.879       actual memory usage for states (compression: 0.48%)
>  1068.115       memory used for DFS stack (-m20000000)
>     1.619       memory lost to fragmentation
>  6515.375       total actual memory usage
> 
> 
> unreached in proctype qrcu_reader
>         (0 of 18 states)
> unreached in proctype qrcu_updater
>         qrcu.spin:102, state 82, "-end-"
>         (1 of 82 states)
> unreached in init
>         (0 of 23 states)
> 
> pan: elapsed time 2.72e+05 seconds
> pan: rate 35500.523 states/second
> --------
> 
> I'm not sure if this result is worthy enough to be mentioned
> in the text.

But of course!

As long as the entire table is generated with the same arguments and
configuration, and those arguments and configuration are called out
somewhere (perhaps in a script somewhere in CodeSamples), please do
send me a patch!

Perhaps even better would be to call out those configurations and
arguments earlier on in the section giving advice on how to use
Promela and spin.

							Thanx, Paul

> Thoughts?
> 
>         Thanks, Akira
> 
> >            I agree that -DCOLLAPSE is a pure optimization, so it should
> > be OK.  If we trust the documentation, anyway!  ;-)
> > 
> > 							Thanx, Paul
> > 
> >>         Thanks, Akira
> >> --
> >> Akira Yokosawa (6):
> >>   fcvextract.pl: Treat '.spin' files as C sources
> >>   formal/spinhint: Employ new scheme for code snippet
> >>   formal/spinhint: Update output lists of spin
> >>   formal/spinhint: Update tables of memory usage of Spin
> >>   formal/spinhint: Put footnote on header in table
> >>   formal/spinhint: Use \co{...} rather than {\tt ...}
> >>
> >>  CodeSamples/formal/promela/atomicincrement.spin    |   2 +
> >>  .../formal/promela/atomicincrement.spin.lst        |  28 +
> >>  CodeSamples/formal/promela/increment.spin          |  46 +-
> >>  CodeSamples/formal/promela/increment.spin.lst      |  28 +
> >>  .../formal/promela/increment.spin.trail.lst        |  42 +
> >>  CodeSamples/formal/promela/lock.h                  |  16 +-
> >>  CodeSamples/formal/promela/lock.spin               |  46 +-
> >>  CodeSamples/formal/promela/lock.spin.lst           |  29 +
> >>  CodeSamples/formal/promela/qrcu.spin               |  95 ++-
> >>  Makefile                                           |   4 +-
> >>  formal/spinhint.tex                                | 874 ++++++---------------
> >>  perfbook.tex                                       |   1 +
> >>  utilities/fcvextract.pl                            |   8 +-
> >>  13 files changed, 502 insertions(+), 717 deletions(-)
> >>  create mode 100644 CodeSamples/formal/promela/atomicincrement.spin.lst
> >>  create mode 100644 CodeSamples/formal/promela/increment.spin.lst
> >>  create mode 100644 CodeSamples/formal/promela/increment.spin.trail.lst
> >>  create mode 100644 CodeSamples/formal/promela/lock.spin.lst
> >>
> >> -- 
> >> 2.7.4
> >>
> > 
> 


  reply	other threads:[~2019-02-07  9:18 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-02 15:05 [PATCH 0/6] formal/spinhint: Update code snippet Akira Yokosawa
2019-02-02 15:08 ` [PATCH 1/6] fcvextract.pl: Treat '.spin' files as C sources Akira Yokosawa
2019-02-02 15:09 ` [PATCH 2/6] formal/spinhint: Employ new scheme for code snippet Akira Yokosawa
2019-02-02 15:11 ` [PATCH 3/6] formal/spinhint: Update output lists of spin Akira Yokosawa
2019-02-02 15:13 ` [PATCH 4/6] formal/spinhint: Update tables of memory usage of Spin Akira Yokosawa
2019-02-02 15:14 ` [PATCH 5/6] formal/spinhint: Put footnote on header in table Akira Yokosawa
2019-02-02 15:15 ` [PATCH 6/6] formal/spinhint: Use \co{...} rather than {\tt ...} Akira Yokosawa
2019-02-02 17:34 ` [PATCH 0/6] formal/spinhint: Update code snippet Paul E. McKenney
2019-02-06 22:42   ` Akira Yokosawa
2019-02-07  9:17     ` Paul E. McKenney [this message]
2019-02-11 15:08       ` [PATCH 0/3] formal/spinhint: Add result and discussion of 3 readers 3 updaters QRCU Spin run Akira Yokosawa
2019-02-11 15:11         ` [PATCH 1/3] formal/spinhint: Add result " Akira Yokosawa
2019-02-11 15:28           ` Akira Yokosawa
2019-02-11 19:34             ` Paul E. McKenney
2019-02-11 15:12         ` [PATCH 2/3] formal/spinhint: Add column of search depth in Table 12.2 Akira Yokosawa
2019-02-11 15:13         ` [PATCH 3/3] formal/spinhint: Place footnote inside floating table Akira Yokosawa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190207091757.GE4240@linux.ibm.com \
    --to=paulmck@linux.ibm.com \
    --cc=akiyks@gmail.com \
    --cc=perfbook@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.