All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/11] datastruct: Employ new scheme for code snippet
@ 2018-12-24 14:46 Akira Yokosawa
  2018-12-24 14:53 ` [PATCH 01/11] fcvextract.pl: Enhance comment block handling of C source Akira Yokosawa
                   ` (11 more replies)
  0 siblings, 12 replies; 37+ messages in thread
From: Akira Yokosawa @ 2018-12-24 14:46 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: perfbook, Akira Yokosawa

Hi Paul,

This patch set consists of enhancement of fcvextract.pl,
update of snippets in datastruct, and some minor tweaks.

fcvextract.pl now suppresses comment blocks in C source and
supports alternative code for snippets in #ifndef blocks,
which won't be affected by the suppression of comment blocks.

Also, labeling of the form /* \lnlbl{label} */ is now supported
in C snippets.

Patch #1 adds comment block handling to fcvextract.pl, without
changing the default behavior.

Patch #2 adds a couple of explicit options to snippets which
have comments to be displayed. It also converts alternative
code fragments using "#ifndef FCV_EXCLUDE" so that they survive
comment block suppression.

Patch #3 changes the default to "keepcomment=no".
This removes a couple of comments in Listings 4.8 and 9.5.

Patch #4 removes now redundant "\fcvexclude" around comment
blocks. It also uses "#ifndef FCV_SNIPPET" to reduce \fcvexclude
uses.

Patch #5 adds support of "/* \lnlbl{label} */" labeling.

Patch #6 updates snippets of hash_bkt.c. "struct hashtab"
now has the "ht_cmp" field and I updated the text to mention
it. You might want to do some rewording.

Patch #7 adds the "ht_cmp" field in the hashdiagram figure
(still in .fig).

Patch #8 updates the rest of snippets in datastruct. It also
fixes typo in cross references of Listing 10.13.
By this change, an smp_mb() appears in ht_get_bucket()
(Listing 10.10).

My guess is that the counterpart barrier is the first
synchronize_rcu() in hashtab_resize(). It might deserve some
explanation or a Quick Quiz.  Also, Answer to Quick Quiz 10.13
might need some expansion, since it looks as though hash_reorder.c
used something more than the pure RCU protection. But I might be
completely misreading here...

Patches #9 and #10 are minor tweaks in appearance of
Listing 10.13. As you can see, tab-space width can be
adjusted per snippet.

Patch #11 permits more chances of hyphenation.

I'm thinking of globally widening tab space of snippets for
1C layout.  Let me do some experiment.

        Thanks, Akira
--
Akira Yokosawa (11):
  fcvextract.pl: Enhance comment block handling of C source
  CodeSamples: Add explicit 'keepcomment=yes' options
  fcvextract.pl: Make 'keepcomment=no' as default
  CodeSamples: Remove redundant \fcvexclude
  fcvextract.pl: Support '/* \lnlbl{...} */' style label in C source
  datastruct: Employ new scheme for snippets of hash_bkt.c
  datastruct: Update hashdiagram figure
  datastruct: Employ new scheme for snippets of hash_bkt_rcu and
    hash_resize
  Make sure lmtt font is used in 'VerbatimL' and 'Verbatim' env
  Use wider tabsize for snippet in 'listing*'
  datastruct: Tweak hyphenation

 CodeSamples/SMPdesign/lockhdeq.c           |  11 +-
 CodeSamples/SMPdesign/smpalloc.c           |   8 +-
 CodeSamples/count/count_end.c              |   8 +-
 CodeSamples/count/count_lim.c              |   8 +-
 CodeSamples/count/count_tstat.c            |  10 +-
 CodeSamples/datastruct/hash/hash_bkt.c     |  96 ++--
 CodeSamples/datastruct/hash/hash_bkt_rcu.c |  33 +-
 CodeSamples/datastruct/hash/hash_resize.c  | 232 +++++-----
 CodeSamples/defer/route_hazptr.c           |  20 +-
 CodeSamples/defer/route_rcu.c              |  36 +-
 CodeSamples/defer/route_refcnt.c           |  16 +-
 CodeSamples/defer/route_seq.c              |  18 +-
 CodeSamples/defer/route_seqlock.c          |  14 +-
 CodeSamples/defer/seqlock.h                |  12 +-
 CodeSamples/locking/locked_list.c          |   6 +-
 CodeSamples/toolsoftrade/forkjoinvar.c     |   2 +-
 CodeSamples/toolsoftrade/pcreate.c         |   2 +-
 datastruct/datastruct.tex                  | 687 ++++++++---------------------
 datastruct/hashdiagram.fig                 | 103 ++---
 perfbook.tex                               |   2 +
 pfhyphex.tex                               |   1 +
 utilities/fcvextract.pl                    |  87 +++-
 22 files changed, 627 insertions(+), 785 deletions(-)

-- 
2.7.4


^ permalink raw reply	[flat|nested] 37+ messages in thread

end of thread, other threads:[~2019-01-05  0:10 UTC | newest]

Thread overview: 37+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-24 14:46 [PATCH 00/11] datastruct: Employ new scheme for code snippet Akira Yokosawa
2018-12-24 14:53 ` [PATCH 01/11] fcvextract.pl: Enhance comment block handling of C source Akira Yokosawa
2018-12-24 14:55 ` [PATCH 02/11] CodeSamples: Add explicit 'keepcomment=yes' options Akira Yokosawa
2018-12-24 14:56 ` [PATCH 03/11] fcvextract.pl: Make 'keepcomment=no' as default Akira Yokosawa
2018-12-24 14:57 ` [PATCH 04/11] CodeSamples: Remove redundant \fcvexclude Akira Yokosawa
2018-12-24 14:59 ` [PATCH 05/11] fcvextract.pl: Support '/* \lnlbl{...} */' style label in C source Akira Yokosawa
2018-12-24 15:00 ` [PATCH 06/11] datastruct: Employ new scheme for snippets of hash_bkt.c Akira Yokosawa
2018-12-24 15:01 ` [PATCH 07/11] datastruct: Update hashdiagram figure Akira Yokosawa
2018-12-24 15:02 ` [PATCH 08/11] datastruct: Employ new scheme for snippets of hash_bkt_rcu and hash_resize Akira Yokosawa
2018-12-24 15:03 ` [PATCH 09/11] Make sure lmtt font is used in 'VerbatimL' and 'Verbatim' env Akira Yokosawa
2018-12-24 15:04 ` [PATCH 10/11] Use wider tabsize for snippet in 'listing*' Akira Yokosawa
2018-12-24 15:05 ` [PATCH 11/11] datastruct: Tweak hyphenation Akira Yokosawa
2018-12-24 23:58 ` [PATCH 00/11] datastruct: Employ new scheme for code snippet Paul E. McKenney
2018-12-25  0:53   ` Paul E. McKenney
2018-12-25 14:30     ` Akira Yokosawa
2018-12-26 14:17       ` Paul E. McKenney
2018-12-26 14:31       ` [PATCH] gen_snippet_d.pl: Add rules to ignore editor's backup files Akira Yokosawa
2018-12-26 15:00         ` Paul E. McKenney
2018-12-31  4:37           ` Sporadic SIGSEGV in hash_bkt_rcu and hash_resize (was Re: [PATCH] gen_snippet_d.pl: Add rules to ignore editor's backup files) Akira Yokosawa
2018-12-31 15:15             ` [PATCH] EXP hashtorture.h: Avoid sporadic SIGSEGV in hash_bkt_rcu Akira Yokosawa
2018-12-31 21:03               ` Paul E. McKenney
2019-01-01  0:27                 ` Akira Yokosawa
2019-01-01 18:00                   ` Paul E. McKenney
2019-01-02 15:02                     ` Akira Yokosawa
2019-01-02 17:18                       ` Paul E. McKenney
2019-01-02 19:18                         ` Paul E. McKenney
2019-01-03 15:57                           ` [PATCH] datastruct/hash: Tweak appearance of updated code in snippet Akira Yokosawa
2019-01-03 17:21                             ` Paul E. McKenney
2019-01-03 23:35                               ` Akira Yokosawa
2019-01-04  0:52                                 ` Paul E. McKenney
2019-01-04  1:56                                   ` Akira Yokosawa
2019-01-04  3:56                                     ` Paul E. McKenney
2019-01-04 15:38                                 ` Akira Yokosawa
2019-01-04 15:39                                   ` [PATCH 1/2] datastruct/hash: Tweak indent of folded line " Akira Yokosawa
2019-01-04 22:40                                     ` Paul E. McKenney
2019-01-04 15:41                                   ` [PATCH 2/2] datastruct/hash: Annotate racy accesses with READ_ONCE/WRITE_ONCE Akira Yokosawa
2019-01-05  0:10                                     ` Paul E. McKenney

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.