correct use of lock_kernel() - help! please
Thanks Roman,
Quoted 4 lines · Roman Zippel
Quoted 1 line · Iain Sandoe
AFACIT we could hold the kernel locked for *several seconds*
If you sleep inbetween, it's no problem. The kernel lock is released automatically during sleep and reget after sleeping.
Ok. I think we are alright then.
Quoted 4 lines
Quoted 1 line
What do I really need to protect with lock/unlock pairs?
SMP protection. Only a single processor can hold the kernel lock at the same time. The preferred solution is of course to use semaphores / spinlocks.
I think my question was badly phrased:
Around the use of which kernel resources should a lock be applied?
tia,
Iain.
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
Hi,
Quoted 1 line · Iain Sandoe
Around the use of which kernel resources should a lock be applied?
Depends on the resource, but most of it shouldn't need this anymore. If the kernel lock is moved into the driver, it usually means that everything else is safe, check now that the driver itself is smp safe, then you can remove the kernel lock.
bye, Roman
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/