mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Paul McKenney" <Paul.McKenney@us.ibm.com>
To: dipankar@beaverton.ibm.com
Cc: linux-kernel@vger.kernel.org, Linus Torvalds <torvalds@transmeta.com>
Subject: Re: [Lse-tech] Re: RFC: patch to allow lock-free traversal of lists with insertion
Date: Wed, 10 Oct 2001 09:00:21 -0700	[thread overview]
Message-ID: <OF75C1C410.48EFE2FF-ON88256AE1.0057C29E@boulder.ibm.com> (raw)


> > So I'm still at a loss for what this could actually be _used_. IP
routing?
> > Certainly not sockets (which have uniqueness requirements).
>
> Yes. We used it in IP routing in DYNIX/ptx back then at Sequent as well
> as for Multipath I/O routes for storage. That is all I can remember,
> but Paul will remember and know more about it. Paul ?

Hello!

RCU was used in the following portions of PTX:

o    Distributed lock manager: recovery, lists of callbacks used to
     report completions and error conditions to user processes, and
     lists of server and client lock data structures.

o    TCP/IP: routing tables, interface tables, and protocol-control-block
     lists.  As Linus suspected, RCU was -not- applied to the socket
     data structures.  ;-)

o    Storage-area network (SAN): routing tables and error-injection
     tables (used for stress testing).

o    Clustered journalling file systems: in-core inode lists and
     distributed-locking data structures.

o    Lock-contention measurement: data structure used to map from
     spinlock addresses to the corresponding measurement data.  (This
     was needed since PTX locks are one byte long, and you can't put
     much extra data into one byte.)

o    Application regions manager (which is a workload-management
     subsystem): maintains a list of "regions" into which processes
     may be confined.

o    Process management: per-process system-call tables and MP trace
     data structures used for debuggers that handle multi-threaded
     processes.

o    LAN drivers to resolve races between shutting down a LAN device
     and packets being received by that device.  (This use is in many
     ways similar to that of Rusty's, Anton's, and Greg's hotplug
     patch).

PTX used RCU on an as-needed basis.  K42 made more
pervasive use of a very similar technique.

RCU is definitely -not- a wholesale replacement for all locking.
For example, as Dipankar noted, it can be integrated with reference-count
schemes.  It -can- be used to replace reference counts, but only in
cases where no task blocks while holding a reference.

RCU works best in read-mostly data structures.  The most common use
is to allow lock-free dereferencing of pointers, for example, removing
the lock on a -list-, keeping locking/reference counts only on the
elements themselves.

In addition, when moving from one element in a list to the next, RCU
allows you to drop the refcnt/lock of the preceding element -before-
traversing the pointer to the next element.  This can make the
traversal code a bit simpler.

                              Thanx, Paul


             reply	other threads:[~2001-10-10 16:26 UTC|newest]

Thread overview: 59+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-10-10 16:00 Paul McKenney [this message]
  -- strict thread matches above, loose matches on Subject: below --
2001-10-13 14:42 Paul McKenney
2001-10-13 17:23 ` Linus Torvalds
2001-10-13 17:28   ` Linus Torvalds
2001-10-14  7:25     ` Dipankar Sarma
2001-10-13 18:42   ` Andi Kleen
2001-10-13 19:15     ` Alexander Viro
2001-10-13 20:44     ` Rusty Russell
2001-10-13 21:19   ` Rusty Russell
2001-10-11 10:34 Dipankar Sarma
     [not found] <20011010182730.0077454b.rusty@rustcorp.com.au>
2001-10-10  9:36 ` Linus Torvalds
2001-10-11  6:50 ` Rusty Russell
2001-10-10 21:44 Paul McKenney
2001-10-10 15:24 Paul McKenney
2001-10-10 16:58 ` Andrea Arcangeli
2001-10-10 17:25   ` Linus Torvalds
2001-10-12  5:06   ` Rusty Russell
2001-10-12 16:28     ` Linus Torvalds
2001-10-12 19:50       ` Al Dunsmuir
2001-10-13  7:38       ` Rusty Russell
2001-10-13  1:07     ` Paul Mackerras
2001-10-13  1:54       ` Davide Libenzi
2001-10-13  2:04         ` Linus Torvalds
2001-10-13  2:31           ` Davide Libenzi
2001-10-13  2:46             ` Davide Libenzi
2001-10-13  3:30             ` Linus Torvalds
2001-10-13  2:49         ` Paul Mackerras
2001-10-13  2:00       ` Linus Torvalds
2001-10-10 10:06 Dipankar Sarma
2001-10-10 10:18 ` Linus Torvalds
2001-10-10 11:43   ` Dipankar Sarma
2001-10-12  3:27 ` Rusty Russell
2001-10-12 16:56   ` Linus Torvalds
2001-10-12 18:53     ` Dipankar Sarma
2001-10-13  7:25     ` Rusty Russell
2001-10-10  7:58 Dipankar Sarma
2001-10-10  7:06 Dipankar Sarma
2001-10-10  7:21 ` BALBIR SINGH
2001-10-10  9:06   ` Dipankar Sarma
2001-10-10  6:54 Dipankar Sarma
2001-10-10  4:43 Paul McKenney
2001-10-09 15:45 Paul McKenney
2001-10-10  2:05 ` [Lse-tech] " Andrea Arcangeli
2001-10-10  5:05   ` Linus Torvalds
2001-10-10  5:17     ` BALBIR SINGH
2001-10-10  5:29       ` Davide Libenzi
2001-10-10  5:46       ` Linus Torvalds
2001-10-10  6:01         ` BALBIR SINGH
2001-10-10 15:23           ` Victor Yodaiken
2001-10-10 11:54     ` Keith Owens
2001-10-10  6:16   ` Paul Mackerras
2001-10-10  6:30     ` Linus Torvalds
2001-10-10  7:36   ` Paul Mackerras
2001-10-10 15:54     ` Victor Yodaiken
2001-10-10 21:56       ` Keith Owens
2001-10-10 22:24         ` Victor Yodaiken
2001-10-10 23:46         ` David S. Miller
2001-10-11  0:24           ` Davide Libenzi
2001-10-10 13:24   ` Ivan Kokshaysky
2001-10-10 13:41     ` Andrea Arcangeli

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=OF75C1C410.48EFE2FF-ON88256AE1.0057C29E@boulder.ibm.com \
    --to=paul.mckenney@us.ibm.com \
    --cc=dipankar@beaverton.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    /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

all inboxes | Powered by JetHome®