public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: RFC: patch to allow lock-free traversal of lists with insertion
@ 2001-10-09 15:45 Paul McKenney
  2001-10-09 17:00 ` Richard Henderson
  2001-10-10  2:05 ` [Lse-tech] " Andrea Arcangeli
  0 siblings, 2 replies; 67+ messages in thread
From: Paul McKenney @ 2001-10-09 15:45 UTC (permalink / raw)
  To: Richard Henderson; +Cc: linux-kernel, lse-tech


> On Mon, Oct 08, 2001 at 06:55:24PM -0700, Paul E. McKenney wrote:
> > This is a proposal to provide a wmb()-like primitive that enables
> > lock-free traversal of lists while elements are concurrently being
> > inserted into these lists.
>
> I've discussed this with you before and you continue to have
> completely missed the point.

It would not be the first point that I have completely missed, but
please read on.  I have discussed this algorithm with Alpha architects,
who tell me that it is sound.

> Alpha requires that you issue read-after-read memory barriers on
> the reader side if you require ordering between reads.  That is
> the extent of the weakness of the memory ordering.

I agree that Alpha requires "mb" instructions to be executed on the
reading CPUs if the reading CPUs are to observe some other CPU's writes
occuring in order.  And I agree that the usual way that this is done
is to insert "mb" instructions between the reads on the read side.

However, if the reading CPU executes an "mb" instruction between the
time that the writing CPU executes the "wmb" and the time that the writing
CPU executes the second store, then the reading CPU is guaranteed to
see the writes in order.  Here is how this happens:


     Initial values: a = 0, p = &a, b = 1.


     Writing CPU              Reading CPU

     1) b = 2;

     2) Execute "wmb" instruction

     3) Send a bunch of IPIs

                         4) Receive IPI

                         5) Execute "mb" instruction

                         6) Indicate completion

     7) Detect completion

     8) p = &b

The combination of steps 2 and 5 guarantee that the reading CPU will
invalidate the cacheline containing the old value of "b" before it
can possibly reference the new value of "p".  The CPU must read "p"
before "b", since it can't know where "p" points before reading it.

> Sparc64 is the same way.

I can believe that "membar #StoreStore" and friends operate in the same
way that the Alpha memory-ordering instructions do.  However, some of
the code in Linux seems to rely on "membar #SYNC" waiting for outstanding
invalidations to complete.  If this is the case, then "membar #SYNC"
could be used to segregate writes when the corresponding reads are
implicitly ordered by data dependencies, as they are during pointer
dereferences.

> This crap will never be applied.  Your algorithms are simply broken
> if you do not ensure proper read ordering via the rmb() macro.

Please see the example above.  I do believe that my algorithms are
reliably forcing proper read ordering using IPIs, just in an different
way.  Please note that I have discussed this algorithm with Alpha
architects, who believe that it is sound.

But they (and I) may well be confused.  If so, could you please
show me what I am missing?

                              Thanx, Paul


^ permalink raw reply	[flat|nested] 67+ messages in thread
* Re: [Lse-tech] Re: RFC: patch to allow lock-free traversal of lists with insertion
@ 2001-10-10  4:43 Paul McKenney
  0 siblings, 0 replies; 67+ messages in thread
From: Paul McKenney @ 2001-10-10  4:43 UTC (permalink / raw)
  To: Andrea Arcangeli
  Cc: Peter Rival, Jay.Estabrook, linux-kernel, lse-tech,
	Richard Henderson


> The point here is that it is suprisingly that alpha needs this IPI
> unlike all other architectures. So while the IPI is certainly safe we
> wouldn't expect it to be necessary on alpha either.
>
> Now my only worry is that when you worked on this years ago with the
> alpha architects there were old chips, old caches and old machines (ev5
> maybe?).
>
> So before changing any code, I would prefer to double check with the
> current alpha architects that the read dependency really isn't enough to
> enforce read ordering without the need of rmb also on the beleeding edge
> ev6/ev67/etc.. cores. So potentially as worse we'd need to redefine
> wmb() as wmbdd() (and friends) only for EV5+SMP compiles of the kernel,
> but we wouldn't be affected with any recent hardware compiling for
> EV6/EV67.  Jay, Peter, comments?

Hello, Andrea!

This is a very good point.  I will double-check with the people I know.
I agree that it would also be very good to get an independent check.
There is clearly no use in adding expensive IPIs to the kernel except
where they are absolutely necessary!

                              Thanx, Paul


^ permalink raw reply	[flat|nested] 67+ messages in thread
* Re: [Lse-tech] Re: RFC: patch to allow lock-free traversal of lists with insertion
@ 2001-10-10  6:54 Dipankar Sarma
  0 siblings, 0 replies; 67+ messages in thread
From: Dipankar Sarma @ 2001-10-10  6:54 UTC (permalink / raw)
  To: torvalds; +Cc: linux-kernel


In article <Pine.LNX.4.33.0110092236210.1305-100000@penguin.transmeta.com> Linus Torvalds wrote:

> Now, in all fairness I can imagine hacky lock-less removals too. To get
> them to work, you have to (a) change the "next" pointer to point to the
> next->next (and have some serialization between removals, but removals
> only, to make sure you don't have next->next also going away from you) and
> (b) leave the old "next" pointer (and thus the data structure) around
> until you can _prove_ that nobody is looking anything up any more, and
> that the now-defunct data structure can truly be removed.

This is exactly what Read-Copy Update does. You keep the old data
structure around until you are sure that all the CPUs have lost
references to it by context switching. There are more than
one relatively non-intrusive ways of detecting completion of such a cycle
and "deleted" data can be freed afterwards.

The details are in http://lse.sourceforge.net/locking/rcupdate.html.

Thanks
Dipankar
-- 
Dipankar Sarma  <dipankar@in.ibm.com> Project: http://lse.sourceforge.net
Linux Technology Center, IBM Software Lab, Bangalore, India.

^ permalink raw reply	[flat|nested] 67+ messages in thread
* Re: [Lse-tech] Re: RFC: patch to allow lock-free traversal of lists with insertion
@ 2001-10-10  7:06 Dipankar Sarma
  2001-10-10  7:21 ` BALBIR SINGH
  0 siblings, 1 reply; 67+ messages in thread
From: Dipankar Sarma @ 2001-10-10  7:06 UTC (permalink / raw)
  To: balbir.singh; +Cc: linux-kernel


In article <3BC3D9ED.6050901@wipro.com> BALBIR SINGH wrote:

> What about cases like the pci device list or any other such list. Sometimes
> you do not care if somebody added something, while you were looking through
> the list as long as you do not get illegal addresses or data.
> Wouldn't this be very useful there? Most of these lists come up
> at system startup and change rearly, but we look through them often.

How often does the linux kernel need to go through the PCI device
list ? Looking at only SCSI code, it seems that not very often.
If that is the case in general, optimizing it for lockless
lookup (assuming that you use RCU or something to support deletion),
is probably an overkill.

One example of where it is useful is maintenance of route information
in either storage or network. Route information changes infrequently but
needs to be looked up for every I/O and being able to do lockless
lookup here is a good gain.

Thanks
Dipankar
-- 
Dipankar Sarma  <dipankar@in.ibm.com> Project: http://lse.sourceforge.net
Linux Technology Center, IBM Software Lab, Bangalore, India.

^ permalink raw reply	[flat|nested] 67+ messages in thread
* Re: [Lse-tech] Re: RFC: patch to allow lock-free traversal of lists with insertion
@ 2001-10-10  7:58 Dipankar Sarma
  0 siblings, 0 replies; 67+ messages in thread
From: Dipankar Sarma @ 2001-10-10  7:58 UTC (permalink / raw)
  To: torvalds; +Cc: linux-kernel, Paul McKenney

In article <Pine.LNX.4.33.0110092323450.1360-100000@penguin.transmeta.com> Linus Torvalds wrote:
> On Wed, 10 Oct 2001, Paul Mackerras wrote:
>> The difficulty is in making sure that no reader is still inspecting
>> the list element you just removed before you free it, or modify any
>> field that the reader would be looking at (particularly the `next'
>> field :).

> ..which implies _some_ sort of locking, even if it may be deferred.

> The locking can be per-CPU, whatever - have a per-CPU count for "this many
> traversals in progress", and have every lookup increment it before
> starting, and decrement it after stopping.

> Then the deleter can actually free the thing once he has seen every CPU go
> down to zero, with the proper memory barriers.

> Yes, I see that it can work. But it sounds like a _lot_ of complexity for
> not very much gain.

It can get really ugly since the deleter has to keep
checking periodically for zero-traversal-count. During that peiod more
deletions can happen and the resulting in the need to maintain
deleters as well.

An alternative approach is to divide the timeline
of the kernel into cycles - periods where every CPU does atleast
one context switch thereby losing reference to any pointer to
kernel data. You can now batch all the deletions prior to the
start of a period and finish them after the end of that period. Any
new deletions that happens during  such a period get batched to the
next such period. Any new traversal will see not see the older
copy of the data since the global pointer(s) was updated.


> Right now, you already have to have eight CPU's to see locking as a large
> problem in normal life. People have normal patches to bring that easily up
> to 16. Then how much hard-to-debug-with-subtle-memory-ordering-issues code
> do you want to handle the few machines that aren't in that range?

Yes, various degrees of weakness of memory ordering will make writing code
harder, but it can be dealt with be defining primitives that
behaves uniformly across different architectures. As for large machines
are concerned, I hope the answer is "yes as long as it doesn't adversely
affect the lower end" :-)

Thanks
Dipankar
-- 
Dipankar Sarma  <dipankar@in.ibm.com> Project: http://lse.sourceforge.net
Linux Technology Center, IBM Software Lab, Bangalore, India.

^ permalink raw reply	[flat|nested] 67+ messages in thread
[parent not found: <20011010182730.0077454b.rusty@rustcorp.com.au>]
* Re: [Lse-tech] Re: RFC: patch to allow lock-free traversal of lists with insertion
@ 2001-10-10 10:06 Dipankar Sarma
  2001-10-10 10:18 ` Linus Torvalds
  0 siblings, 1 reply; 67+ messages in thread
From: Dipankar Sarma @ 2001-10-10 10:06 UTC (permalink / raw)
  To: torvalds; +Cc: linux-kernel, Paul McKenney


In article <Pine.LNX.4.33.0110100230170.1518-100000@penguin.transmeta.com> Linus Torvalds wrote:

> On Wed, 10 Oct 2001, Rusty Russell wrote:
>>
>> If noone *holds* a reference, you can remove it "sometime later",
>> where "sometime later" is (for example) after every CPU has scheduled.

> Ehh.. One of those readers can hold on to the thing while waiting for
> something else to happen.

> Looking up a data structure and copying it to user space or similar is
> _the_ most common operation for any lookup. You MUST NOT free it just
> because we scheduled away. Scheduling points have zero meaning in real
> life.

How does locking inside the kernel help you here ? You could face 
the same situation even if you protect the data by locking. 
Perhaps, I am missing something here. So, a specific example would help.


> So you'll need a reference count to actually keep such a data structure
> alive _over_ a schedule. Or all the readers need to copy the data too
> before they actually start using it. At which point you've made your code
> a _lot_ slower than the locking version.

Only relevant issue I can see here is preemption - if you hold
a reference and get preempted out it is still a context switch
and the logic of "when the data can be really deleted" must take
into account such context switches. Alternatively, you could
disable preemption while traversing such lists.

Thanks
Dipankar
-- 
Dipankar Sarma  <dipankar@in.ibm.com> Project: http://lse.sourceforge.net
Linux Technology Center, IBM Software Lab, Bangalore, India.

^ permalink raw reply	[flat|nested] 67+ messages in thread
* Re: [Lse-tech] Re: RFC: patch to allow lock-free traversal of lists with insertion
@ 2001-10-10 15:24 Paul McKenney
  2001-10-10 16:58 ` Andrea Arcangeli
  0 siblings, 1 reply; 67+ messages in thread
From: Paul McKenney @ 2001-10-10 15:24 UTC (permalink / raw)
  To: Andrea Arcangeli
  Cc: Peter Rival, Ivan Kokshaysky, Jay.Estabrook, linux-kernel,
	lse-tech, Richard Henderson, cardoza, woodward


> > true for older alphas, especially because they are strictly in-order
> > machines, unlike ev6.
>
> Yes, it sounds strange. However According to Paul this would not be the
> cpu but a cache coherency issue. rmb() would enforce the cache coherency
> etc... so maybe the issue is related to old SMP motherboard etc... not
> even to the cpus ... dunno. But as said it sounded very strange that
> also new chips and new boards have such a weird reodering trouble.

It sounded strange to me, too.  ;-)  And my first reading of the
Alpha AXP Archtecture RM didn't help me much.

It was indeed a cache coherency issue.  The architect I talked to felt
that it was a feature rather than a bug.  I have an email in to him.
In the meantime, Compaq's patent #6,108,737 leads me to believe that
others in DEC/Compaq also believe it to be a feature.  The paragraph
starting at column 2 line 20 of the body of this patent states:

     In a weakly-ordered system, an order is imposed between selected
     sets of memory reference operations, while other operations are
     considered unordered.  One or more MB instructions are used to
     indicate the required order.  In the case of an MB instruction
     defined by the Alpha (R) 21264 processor instruction set, the MB
     denotes that all memory reference instructions above the MB (i.e.,
     pre-MB instructions) are ordered before all reference instructions
     after the MB (i.e., post-MB instructions).  However, no order
     is required between reference instructions that are not separated
     by an MB.

(The patent talks about the WMB instruction later on.)

In other words, if there is no MB, the CPU is not required to maintain
ordering.  Regardless of data dependencies or anything else.

There is also an application note at

     http://www.openvms.compaq.com/wizard/wiz_2637.html

which states:

     For instance, your producer must issue a "memory barrier" instruction
     after writing the data to shared memory and before inserting it on
     the queue; likewise, your consumer must issue a memory barrier
     instruction after removing an item from the queue and before reading
     from its memory.  Otherwise, you risk seeing stale data, since,
     while the Alpha processor does provide coherent memory, it does
     not provide implicit ordering of reads and writes.  (That is, the
     write of the producer's data might reach memory after the write of
     the queue, such that the consumer might read the new item from the
     queue but get the previous values from the item's memory.

Note that they require a memory barrier (rmb()) between the time the
item is removed from the queue and the time that the data in the item
is referenced, despite the fact that there is a data dependency between
the dequeueing and the dereferencing.  So, again, data dependency does
-not- substitute for an MB on Alpha.

Comments from DEC/Compaq people who know Alpha architecture details?

                              Thanx, Paul

> > I suspect some confusion here - probably that architect meant loads
> > to independent addresses. Of course, in this case mb() is required
> > to assure ordering.
> >
> > Ivan.
>
>
> Andrea
>


^ permalink raw reply	[flat|nested] 67+ messages in thread
* Re: [Lse-tech] Re: RFC: patch to allow lock-free traversal of lists with insertion
@ 2001-10-10 16:00 Paul McKenney
  0 siblings, 0 replies; 67+ messages in thread
From: Paul McKenney @ 2001-10-10 16:00 UTC (permalink / raw)
  To: dipankar; +Cc: linux-kernel, Linus Torvalds


> > 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


^ permalink raw reply	[flat|nested] 67+ messages in thread
* Re: [Lse-tech] Re: RFC: patch to allow lock-free traversal of lists with insertion
@ 2001-10-10 21:44 Paul McKenney
  0 siblings, 0 replies; 67+ messages in thread
From: Paul McKenney @ 2001-10-10 21:44 UTC (permalink / raw)
  To: Andrea Arcangeli
  Cc: cardoza, Peter Rival, Ivan Kokshaysky, Jay.Estabrook,
	linux-kernel, lse-tech, Richard Henderson, woodward


> This is very explicit indeed.
>
> In short I guess what happens is that the reader may have old data in
> its cache, and the rmb() makes sure the cache used after the rmb() is
> not older than the cache used before the rmb().

Yep!  This is what the Alpha architects eventually beat into my head
when I first encountered this issue.  ;-)

> However the more I think about it the more I suspect we'd better use
> rmb() in all readers in the common code, rather than defining rmbdd with
> IPI on alpha, maybe alpha after all isn't the only one that needs the
> rmb() but it's the only one defining the behaviour in detail? I can very
> well imagine other archs also not invalidating all caches of all other
> cpus after a write followed by wmb, the synchronization can be delayed
> safely if the other cpus are readers, and they didn't issued an explicit
> rmb. So what alpha is doing can really be seen as a "feature" that
> allows to delay synchronization of caches after writes and wmb, unless
> an explicit order is requested by the reader via rmb (or better mb on
alpha).

As I understand it, this "feature" allows the CPU to avoid stalling as
often, thereby increasing performance.  Which is presumably somewhat offset
by extra rmb()s on Alpha.

> The fact is that if there's old data in cache, a data dependency isn't
> different than non data dependency if the cpu caches aren't synchronized
> or invalidated during wmb run by the producer.

Right, and omitting this synchronization between CPU and cache presumably
decreases stalls and increases performance.

Here is my scorecard thus far on CPUs that run SMP Linux:

     SMP CPU        Data dependencies create implicit rmb()?

     Alpha          No
     i386      Yes
     IA64      Yes
     MIPS      Yes *
     MIPS64         Yes *
     PA-RISC        Yes *
     PPC       Yes
     S390      Yes
     S390X          Yes
     SPARC          Yes

     *MIPS & MIPS64: Still don't have my MIPS manual, basing this on
          earlier experience with MIPS.  Any comments from the SGI
          guys?

     *PA-RISC: Based on my reading of the PA RISC architecture manual,
          particularly the SYNC instruction and definition of the
          memory model.  However, this manual is not completely
          unambiguous.  Comments from someone in the know at HP?

     Non-SMP CPUs include: arm, cris, m68k, sh

So unless I missed something, Alpha stands alone here, as the only CPU
that does not provide some way for data dependencies to act as implicit
rmb()s.

Don't get me wrong -- I am quite impressed with the way Alpha avoids
stalls in many cases, while getting a level of synchronization that is
useful in many cases.  I just wish that they had also provided more heavy
weight memory barriers so that we aren't forced to choose between IPIs for
Alpha and lots of rmb()s sprinkled through the code, uglifying it and
slowing down all the other SMP CPUs.

Given the discussion on this topic over the past few days, and on earlier
discussions, I would argue that the Alpha semantics for wmb() and rmb()
are strongly counter-intuitive.  People seem to expect a wmb()-like
primitive that allows read-side data dependencies to act as implicit
rmb() instructions.  All the CPUs except for Alpha provide an instruction
that can act as such a wmb()-like instruction, and Alpha can simulate
such an instruction with IPIs.

And this line of reasoning lead me to send out the wmbdd() patch.  ;-)

Thoughts?

                              Thanx, Paul


^ permalink raw reply	[flat|nested] 67+ messages in thread
* Re: [Lse-tech] Re: RFC: patch to allow lock-free traversal of lists with insertion
@ 2001-10-11 10:34 Dipankar Sarma
  0 siblings, 0 replies; 67+ messages in thread
From: Dipankar Sarma @ 2001-10-11 10:34 UTC (permalink / raw)
  To: davem; +Cc: linux-kernel

In article <20011010.164628.39155290.davem@redhat.com> David S. Miller wrote:
>    From: Victor Yodaiken <yodaiken@fsmlabs.com>
>    Date: Wed, 10 Oct 2001 16:24:19 -0600
>    
>    In general you're right, and always its better to 
>    reduce contention than to come up with silly algorithms for 
>    reducing the cost of contention,

> I want to second this and remind people that the "cost" of spinlocks
> is mostly not "spinning idly waiting for lock", rather the big cost
> is shuffling the dirty cacheline ownership between the processors.

Absolutely. Even reader-writer locks with read-mostly situations
can result in painful degradation because of the dirty cacheline
bouncing around.


> Any scheme involving shared data which is written (the read counts
> in the various "lockless" schemes are examples) have the same "cost"
> assosciated with them.
> In short, I see no performance gain from the lockless algorithms
> even in the places where they can be applied.

I think it depends on the lockless algorithm. If it requires you
to write to cachelines with same level of sharing as earlier
locking algorithm, it is no good. On the other hand, if you
use schemes that minimizes or ideally has no writes to shared 
data for maintaining readers, it should result in performance gains.


> I spent some time oogling over lockless algorithms a few years ago,
> but I stopped once I realized where the true costs were.  In my view,
> the lockless algorithms perhaps are a win in parallel processing
> environments (in fact, the supercomputing field is where a lot of the
> lockless algorithm research comes from) but not in the kinds of places
> and with the kinds of data structure usage the Linux kernel has.

I would agree to the extent that lockless algorithms cannot be used as 
a wholesale replacement for spin-waiting locks. However in key areas where
performance is critical, lockless techniques can be applied provided
they don't come with the same problems as locking.

I would point to Read-Copy Update as a lockless mutual exclusion
where you don't have to maintain global reader counts and other
shared cachelines. We have been experimenting with a few
places in the linux kernel where lookups can be speeded up
by not having any writes to shared cachelines.

Thanks
Dipankar
-- 
Dipankar Sarma  <dipankar@in.ibm.com> Project: http://lse.sourceforge.net
Linux Technology Center, IBM Software Lab, Bangalore, India.

^ permalink raw reply	[flat|nested] 67+ messages in thread
* Re: [Lse-tech] Re: RFC: patch to allow lock-free traversal of lists with insertion
@ 2001-10-13 14:42 Paul McKenney
  2001-10-13 17:23 ` Linus Torvalds
  0 siblings, 1 reply; 67+ messages in thread
From: Paul McKenney @ 2001-10-13 14:42 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: dipankar, linux-kernel, Rusty Russell


> >
> > And the read side is:
> >        lock
> >        loopup
> >        atomic_inc
> >        unlock
> >
> > With RCU, read side is:
> >        loopup
> >        atomic_inc
>
> Yes. With maybe
>
>          non_preempt()
>          ..
>          preempt()
>
> around it for the pre-emption patches.
>
> However, you also need to make your free _free_ be aware of the count.
> Which means that the current RCU patch is really unusable for this. You
> need to have the "count" always in a generic place (put it with the
hash),

???

Ah!  Are you thinking of the trick that associates a reference counter
with each pointer, and where one uses a double-compare-and-swap instruction
to do updates?  That is definitely -not- what we are proposing here, since
it is important to avoid writes during read-only traversals.

Instead, we use side information to deduce when it is no longer possible
for there to be any references to a given data structure.

It -is- possible to use RCU in Linux -without- reference counts.  See
the Maneesh Soni's FD-management patch and description at:

http://lse.sourceforge.net/locking/patches/files_struct_rcu-2.4.10-04.patch
http://lse.sourceforge.net/locking/files_struct_rcu.txt

The reference counts are needed -only- in cases where references to an
RCU-protected data structure may be held across a sleep.  Dipankar Sarma's
IPV4 route-cache lookup patch at:

http://lse.sourceforge.net/locking/patches/rt_rcu-2.4.6-02.patch

is an example use of RCU where reference counts are used, since entries
can be queued.

                              Thanx, Paul


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

end of thread, other threads:[~2001-10-14  7:19 UTC | newest]

Thread overview: 67+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-10-09 15:45 RFC: patch to allow lock-free traversal of lists with insertion Paul McKenney
2001-10-09 17:00 ` Richard Henderson
2001-10-10  3:33   ` Paul Mackerras
2001-10-10 17:02     ` Richard Henderson
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  7:14         ` kdb requires kallsyms Kirill Ratkin
2001-10-10  7:38           ` BALBIR SINGH
2001-10-10  6:16     ` [Lse-tech] Re: RFC: patch to allow lock-free traversal of lists with insertion 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 11:54     ` Keith Owens
2001-10-10 13:42       ` AIC7XXX war
2001-10-10 21:40         ` AIC7XXX Luigi Genoni
2001-10-10 13:24   ` [Lse-tech] Re: RFC: patch to allow lock-free traversal of lists with insertion Ivan Kokshaysky
2001-10-10 13:41     ` Andrea Arcangeli
  -- strict thread matches above, loose matches on Subject: below --
2001-10-10  4:43 Paul McKenney
2001-10-10  6:54 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  7:58 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 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 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  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-13  7:38         ` Rusty Russell
2001-10-10 16:00 Paul McKenney
2001-10-10 21:44 Paul McKenney
2001-10-11 10:34 Dipankar Sarma
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox