Re: [RFC] A new SPI API for fast, low-latency regmap peripheral access

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Since I am already moving the stats to per-cpu structs, wouldn't atomic_inc()
> be sufficient and even faster for uint32 stats on 32bit systems?

atomic is expensive, because it needs to synchronise across all
CPUs. And that synchoniszation across all CPUs is pointless when you
are doing per-cpu counters.

> I still would like to hear Mark's idea on the exact types. All bytes stats
> were ULL and transfer counter values were UL. Possibly the reason behind this
> was to make the transfer counters as efficient to increment as possible for
> the given platform, as should be the case for "unsigned long".

That efficiency argument is however broken by the use of a spinlock,
which is much more expensive than the actually increment. Except for a
UP machine when it becomes a NOP. But UP machines are becoming less
and less common.

      Andrew



[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux