On Sat, 23 Apr 2005, Bahadir Balban wrote: > do { > seq = read_seqbegin(&seq_lock); > > do_operation(); > > } while(read_seqretry(&seq_lock, seq)); > > if do_operation() is long enough that a writer always updates seq > meanwhile, wouldn't you run into an infinite loop? Yes, I guess you could. > Can we say that we must ensure writers eventually give way to readers > of this sort? IMHO that would be backwards. What we need to ensure instead is that the readers only do simple operations under the seq_lock, so they won't get stuck. -- "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." - Brian W. Kernighan -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/