9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Richard Miller <9fans@hamnavoe.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] double lock in proc.c
Date: Tue, 25 Jul 2017 19:51:24 +0100	[thread overview]
Message-ID: <CADq+LhMdBaovcWgeCLzu5XfamZBC8YcTajoSKY+_EDheKYKqbQ@mail.gmail.com> (raw)
In-Reply-To: <431F6692-904D-4424-9036-C74FAB969B7C@lsub.org>

[-- Attachment #1: Type: text/plain, Size: 976 bytes --]

I'm not convinced that I recall not being convinced ... :)

Essentially I changed the order of lock acquire/release so that the
canlock() loop in proc.c:/^postnote could be eliminated.  Not significant
for performance, but it seemed more elegant and I think it also avoided
looking at any shared data outside code regions protected by a lock.

This was many years ago (when my now-white beard was still merely grey).
Not worth going back to reconstruct the arguments, but I'll send Giacomo
and Nemo a copy of my proc.c to examine for themselves.

On 24 July 2017 at 20:13, Fran. J Ballesteros <nemo@lsub.org> wrote:

> do you remember the proposal?
> thanks
>
> El 24 jul 2017, a las 18:39, Erik Quanstrom <quanstro@quanstro.net>
> escribió:
>
> I had a discussion with Richard about this a few years ago.  Richard was
> no longer convinced of the solution.  at the time I agreed with his
> reasoning.  the comment should be changed.
>
> - erik
>
>

[-- Attachment #2: Type: text/html, Size: 1576 bytes --]

  reply	other threads:[~2017-07-25 18:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-24 16:03 Giacomo Tesio
2017-07-24 16:39 ` Erik Quanstrom
2017-07-24 19:13   ` Fran. J Ballesteros
2017-07-25 18:51     ` Richard Miller [this message]
2017-07-25 22:23       ` David du Colombier

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=CADq+LhMdBaovcWgeCLzu5XfamZBC8YcTajoSKY+_EDheKYKqbQ@mail.gmail.com \
    --to=9fans@hamnavoe.com \
    --cc=9fans@9fans.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).