Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.programming.threads > #2734

Re: About my new algorithm

From Drazen Kacar <dave@fly.srk.fer.hr>
Newsgroups comp.programming.threads
Subject Re: About my new algorithm
Date 2014-12-05 22:48 +0000
Organization Čardak ni na nebu, ni na zemlji
Message-ID <slrnm84di2.je0.dave@fly.srk.fer.hr> (permalink)
References <m5qvr9$o4v$3@dont-email.me> <m5t191$28r$1@speranza.aioe.org>

Show all headers | View raw


Chris M. Thomasson wrote:

>  Comparing RCU read-side with anything that uses an atomic rmw and/or
>  memory barrier is just plain foolish. That LOCK ADD destroys performance
>  when compared to RCU's basically zero overhead reads. End of story.

I don't quite understand the "or" part of your "and/or memory barrier"
statement. If there was a different algorithm which used only memory
barrier, but not RMW, would that be so much worse than RCU?

Another thing I don't quite understand is in Wikipedia's RCU article (at
http://en.wikipedia.org/wiki/Read-copy-update, section Simple
implementation)

The article says:

  [RCU's] read-side overhead is precisely zero, as smp_read_barrier_depends()
  is an empty macro on all but DEC Alpha CPUs;[19] such memory barriers are
  not needed on modern CPUs. 

I was under the impression that you'd need memory barrier on Alpha because
it does more agressive memory access reordering than other processors.
But then, if that's correct, that means that modern CPUs (whichever they
are) still don't have features that old Alpha CPUs have. And not the other
way round.

-- 
 .-.   .-.    Yes, I am an agent of Satan, but my duties are largely
(_  \ /  _)   ceremonial.
     |
     |        dave@fly.srk.fer.hr

Back to comp.programming.threads | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

About my new algorithm Ramine <ramine@1.1> - 2014-12-04 19:57 -0800
  Re: About my new algorithm Ramine <ramine@1.1> - 2014-12-04 20:07 -0800
  Re: About my new algorithm "Chris M. Thomasson" <no@spam.invalid> - 2014-12-05 11:32 -0800
    Re: About my new algorithm Drazen Kacar <dave@fly.srk.fer.hr> - 2014-12-05 22:48 +0000
      Re: About my new algorithm "Chris M. Thomasson" <no@spam.invalid> - 2014-12-06 13:45 -0800
        Re: About my new algorithm "Chris M. Thomasson" <no@spam.invalid> - 2014-12-06 13:56 -0800

csiph-web