All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Johann Klähn" <johann@jklaehn.de>
To: "Paul E. McKenney" <paulmck@kernel.org>
Cc: perfbook@vger.kernel.org
Subject: Re: [PATCH-perfbook 4/4] glossary: Use more common definition of RAII
Date: Tue, 01 Feb 2022 23:16:14 +0100	[thread overview]
Message-ID: <87o83qi66p.fsf@jklaehn.de> (raw)
In-Reply-To: <20220201203832.GG4285@paulmck-ThinkPad-P17-Gen-1> (Paul E. McKenney's message of "Tue, 1 Feb 2022 12:38:32 -0800")


On Tue, Feb 01, 2022 at 12:38 -0800, Paul E. McKenney wrote:
> I do see older uses of "allocation" rather than "acquisition".
> Perhaps it changed once RAII locking entered the picture.

Yes, perhaps because it's as good an explanation for the “A” if one is
only concerned with memory management?  Apparently the phrase “resource
acquisition is initialization” (though not the acronym) was proposed as
early as ~1990: https://www.stroustrup.com/except89.pdf.  Either way,
“acquisition” seems to have taken over in popularity by now. :-)

> I took all but the hazptr change.  I am not necessarily opposed to that
> one, but I did want to check whether you had built and tested it.

Oh, I forgot to --annotate the patch.  Let me paste my notes here:

To test the change I added the following assert:
| assert((hp & 0x1UL) == 0);
| plist[psize++] = (hazptr_head_t *)hp;

And then I ran the different modes of hazptr and route_hazptr (although
only on my ‘spare time reading’ machine, which has a Intel Pentium 4415Y
with 2 cores/4 threads):
|./hazptr {2,3} {stress,perf,uperf,rperf}
|./route_hazptr {--stresstest,--smoketest,--perftest}

The assertion did not fail.

However, /also before applying the patch/,
• to build route_hazptr I had to work around several “multiple
  definition” linker errors (e.g., for HP in hazptr.h), and
• the “stress” mode of hazptr printed several fields of the form
  “2:15”, even though hazptrtorture.h points out that this should
  only happen for buggy implementations.

(I can have a closer look at some point.)

Thanks
Johann

  reply	other threads:[~2022-02-01 22:16 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-01 20:07 [PATCH-perfbook 1/4] cpu: Fix typo Johann Klähn
2022-02-01 20:07 ` [PATCH-perfbook 2/4] defer: Remove leftover manipulation of bottom bit in hazptr.c Johann Klähn
2022-02-01 20:07 ` [PATCH-perfbook 3/4] glossary: Fix typo Johann Klähn
2022-02-01 20:07 ` [PATCH-perfbook 4/4] glossary: Use more common definition of RAII Johann Klähn
2022-02-01 20:38   ` Paul E. McKenney
2022-02-01 22:16     ` Johann Klähn [this message]
2022-02-03 23:34       ` Paul E. McKenney

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=87o83qi66p.fsf@jklaehn.de \
    --to=johann@jklaehn.de \
    --cc=paulmck@kernel.org \
    --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.