schedule while atomic

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

 



More importantly _exactly_what_ are you using the LOCK to protect?

Short recap, spinlocks are used to serialise, ie prevent races in SMP
systems, where turning the interrupts off, on a single processor, is
NOT good enough to prevent races between interrupt-handlers and core
kernel code accessing shared-common-data eg managing a linked list
where the data structure would be mangled by shared access; thus
the lock should be taken and released _for_the_shortest_time_possible_
eg

get lock
unlink head of list
give lock

and so on, so get the lock only when you need it, and give it back as
soon as the transaction is done; also design the data-structure so that
complex, long lasting transactions are un-necessary.

see also RCU.

-- 
mit freundlichen Grüßen, Brian.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux