public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* virtio-scsi: two questions related with picking up queue
@ 2014-05-06  9:26 Ming Lei
  2014-05-06 13:17 ` Paolo Bonzini
  0 siblings, 1 reply; 11+ messages in thread
From: Ming Lei @ 2014-05-06  9:26 UTC (permalink / raw)
  To: Linux SCSI List, Paolo Bonzini, Wanlong Gao, Asias He,
	James E.J. Bottomley, Rusty Russell

Hi Paolo and All,

One question is about ACCESS_ONCE() in virtscsi_pick_vq(),
looks it needn't since both reading and writing tgt->req_vq holds
tgt->tgt_lock.

Another one is about the comment in virtscsi_req_done(), which
said smp_read_barrier_depends() is needed for avoiding
out of order between reading req_vq and decreasing tgt->reqs.
But if I understand correctly, in virtscsi_req_done(), req_vq is
read from vscsi->req_vqs[vq->index - VIRTIO_SCSI_VQ_BASE],
instead of tgt->req_vq, and the former won't change wrt.
inc/dec tgt->reqs, so can the barrier be removed?

Any comments about the above?

Thanks,
-- 
Ming Lei

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2014-05-08 14:00 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-06  9:26 virtio-scsi: two questions related with picking up queue Ming Lei
2014-05-06 13:17 ` Paolo Bonzini
2014-05-07  1:07   ` Ming Lei
2014-05-07  7:10     ` Paolo Bonzini
2014-05-07 16:24   ` Ming Lei
2014-05-07 16:43     ` Paolo Bonzini
2014-05-08 10:44       ` Ming Lei
2014-05-08 12:17         ` Paolo Bonzini
2014-05-08 12:55           ` Ming Lei
2014-05-08 13:21             ` Paolo Bonzini
2014-05-08 14:00               ` Ming Lei

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox