Another idea for simplifying locking in kernel/module.c
Quoted 4 lines · I wrote:
Quoted 1 line · Max Krasnyansky
We have to be able to call
try_module_get()from interrupt context.Where? Why? Please show me one or more examples.
Come to think of it, I don't think you even have to answer
that question. You should be able to use my try_module_get() from interrupt context. It never blocks.
Adam J. Richter __ ______________ 575 Oroville Road [email protected] \ / Milpitas, California 95035 +1 408 309-6081 | g g d r a s i l United States of America
"Free Software For The Rest Of Us."
In message <[email protected]> you write:
Quoted 9 lines
Quoted 4 lines · I wrote:
Quoted 1 line · Max Krasnyansky
We have to be able to call
try_module_get()from interrupt context.Where? Why? Please show me one or more examples.
Come to think of it, I don't think you even have to answer
that question. You should be able to use mytry_module_get()from interrupt context. It never blocks.
Yes, your try_module_get just gets spurious failures on SMP, as well as thrashing the cacheline (why bother with one counter per CPU then?).
I guess I just don't understand your solution?
Sorry,
Rusty.
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.