tech-kern archive

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

Re: drop volatile from __cpu_simplelock_t typedef



On 26/06/15 15:20, Matt Thomas wrote:

On Jun 26, 2015, at 8:17 AM, Antti Kantee <pooka%iki.fi@localhost> wrote:

Such as?  I can only think of the "C debugging version" of simple_lock ;)

Can't those be fixed by making them call __SIMPLELOCK_LOCKED_P()?  They arguably should have been doing that in the first place anyway.  Or are you worried that we won't be able to catch all of them?

Atomic instruction typically have a lot of overhead so you loop until the variable changes and then retry the atomic instruction.

__SIMPLELOCK_LOCKED_P() doesn't use an atomic instruction, and I can't see how it even could in any way that would make sense. We'd just add a volatile cast into that method.

Home | Main Index | Thread Index | Old Index