Posted Jun 13, 2003 17:40 UTC (Fri) by ncm
In reply to: Race condition?
Parent article: Read-copy-update
In other words, the (overwhelmingly) most frequent users of
the data structure never need to lock it. Concurrent writers
do need to lock, but since writing happens so rarely, collisions
requiring one writer to wait are vanishingly rare. Where you
can guarantee there can be no writer collisions (e.g. there's
only ever one writer, or they're already co-operating), writers
don't need to lock.
The more subtle danger is when there is a dependency relationship
between the data copied, and other data elsewhere in the
kernel (or in user space!). You just have to be very careful never
to let that happen.
to post comments)