Re: [PATCH v4 1/5] getcpu_cache system call: cache CPU number of running thread

From: Peter Zijlstra
Date: Thu Feb 25 2016 - 04:57:19 EST


On Tue, Feb 23, 2016 at 06:28:36PM -0500, Mathieu Desnoyers wrote:
> This approach is inspired by Paul Turner and Andrew Hunter's work
> on percpu atomics, which lets the kernel handle restart of critical
> sections. [1] [2]

So I'd like a few extra words on the intersection with that work.

Yes, that also needs a CPU number, but that needs a little extra as
well. Can this work be extended to provide the little extra and is the
getcpu name still sane in that case?

Alternatively, could you not, at equal speed, get the CPU number from
the restartable sequence data?

That is, do explain why we want both.

(And remind Paul to keep pushing that)