Re: Lockless uidinfo.



On Sun, 19 Aug 2007, Bruce Evans wrote:

On Sun, 19 Aug 2007, Jeff Roberson wrote:

On Sun, 19 Aug 2007, Bruce Evans wrote:

atomic_*long() shouldn't exist (and doesn't exist in my version) since
longs should actually be long (twice as long as registers) and thus
especially epensive to lock.

Well unfortunately this is not how the compiler implements them on the architectures that we support. So in this case long is 32bit on 32bit machines and 64bit on 64bit machines and as such requires each architecture to treat them specially. I don't think it's unreasonable to add an atomic_fetchadd_long() that conforms to the definition of long that is actually in use.

The compiler has nothing to do with this. The implementation is FreeBSD's
and it is poor, like I said.

Well this really has little to do with the problem at hand. The long decision has already been made and it's not practical to change it now. Adding apis that accept the types that we've decided on should not be crippled because you don't like the types. I agree that we can't have atomics that are wider than architectures support, but that isn't the case here.


[Context lost to top posting]

I included the context that I needed.


Bruce

_______________________________________________
freebsd-arch@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "freebsd-arch-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: Lockless uidinfo.
    ... longs should actually be long (twice as long as registers) and thus ... especially epensive to lock. ... Well unfortunately this is not how the compiler implements them on the architectures that we support. ... So in this case long is 32bit on 32bit machines and 64bit on 64bit machines and as such requires each architecture to treat them specially. ...
    (freebsd-arch)
  • Re: Interview with Alan Kay
    ... > but the manufacturers wouldn't put MMUs on the machines, ... What Alan Kay says is no doubt true, but the real issue has always been ... desktop space means one machine per desktop." ... architectures (432, 960, 860, iWarp, other processors from other ...
    (comp.lang.lisp)
  • Re: Painless micro program
    ... cycles of a 2 MHZ clock. ... There weren't many triple-operand machines around, ... single instruction. ... set/memory architectures and market success. ...
    (sci.electronics.design)
  • Re: [patch 00/10] mutex subsystem, -V5
    ... > trying to lock backs off for awhile. ... > modification of the contention path. ... Yes, there can be oddball architectures, but all in one there's a ... CPUs we might have to use lesser state transitions, ...
    (Linux-Kernel)
  • Re: [PATCH 0/5] ppc RT: Realtime preempt support for PPC
    ... >> primitives, across all architectures. ... > checks the value of lock is assembly and treats lock as signed. ... If the lock field of struct raw_rwlock_t is a long instead of int ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)