[PATCH v6 08/46] CPU hotplug: Provide APIs to prevent CPU offline from atomic context
David Laight
David.Laight at ACULAB.COM
Tue Feb 19 05:42:53 EST 2013
> I wouldn't go that far... ;-) Unfairness is not a show-stopper right?
> IMHO, the warning/documentation should suffice for anybody wanting to
> try out this locking scheme for other use-cases.
I presume that by 'fairness' you mean 'write preference'?
I'd not sure how difficult it would be, but maybe have two functions
for acquiring the lock for read, one blocks if there is a writer
waiting, the other doesn't.
That way you can change the individual call sites separately.
The other place I can imagine a per-cpu rwlock being used
is to allow a driver to disable 'sleep' or software controlled
hardware removal while it performs a sequence of operations.
David
More information about the linux-arm-kernel
mailing list