On Thu, 2011-04-21 at 00:17 -0700, Stanislaw Gruszka wrote: > > Could you elaborate a bit more, why you do not need to protect getting > > the cmd index. > > get_cmd_index() is simple mathematical function of index local variable > (provided by firmware) and globally canst q->n_window, not need to be > protected. > > What need to be protected is iwl_hcdm_queue_reclaim() as is touch > q->read_ptr and meta->flags to make assure is synchronized across > different cpus, when new huge command come instantly. > > Note circular queue management could be done lock-less, but need > trickery described in Documentation/circular-buffers.txt to synchronize > q->read_ptr and q->write_ptr properly. What is probably too complex to > be worth to consider instead of simply using a spin lock. > Thanks for the clear, explanation. Acked-by: Wey-Yi Guy <wey-yi.w.guy@xxxxxxxxx> Wey -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html