From: Paolo Bonzini <pbonzini@redhat.com>
To: Ming Lei <tom.leiming@gmail.com>
Cc: "James E.J. Bottomley" <JBottomley@parallels.com>,
Linux SCSI List <linux-scsi@vger.kernel.org>,
Wanlong Gao <gaowanlong@cn.fujitsu.com>,
Rusty Russell <rusty@rustcorp.com.au>
Subject: Re: [PATCH] virtio_scsi: remove ACCESS_ONCE() and smp_read_barrier_depends()
Date: Wed, 07 May 2014 18:12:23 +0200 [thread overview]
Message-ID: <536A5B67.8030502@redhat.com> (raw)
In-Reply-To: <CACVXFVO_hg52+5U_njExbX1GtY1456HS_wsK0uyB-9fj+BFDpw@mail.gmail.com>
Il 07/05/2014 18:03, Ming Lei ha scritto:
>> *
>> * - likewise, decrements of reqs only occur when reqs != 0. If the decremented
>> * value is zero, the first CPU that enters virtscsi_queuecommand_multi will
>> * modify req_vq and the others will spin on tgt_lock.
>
> The fact should be obvious too,
Perhaps, but in your patch you're leaving a "Similarly" that doesn't
apply anymore.
> > * We do not try to read req_vq locklessly for simplicity, so tgt_lock is used
> > * to serialize reads of req_vq too.
>
> Maybe it is better to just mention it isn't done yet, and maybe someone
> will figure out simple way to support lockless reading req_vq.
The one I sketched is not too hard.
Paolo
next prev parent reply other threads:[~2014-05-07 16:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-07 14:34 [PATCH] virtio_scsi: remove ACCESS_ONCE() and smp_read_barrier_depends() Ming Lei
2014-05-07 15:50 ` Paolo Bonzini
2014-05-07 16:03 ` Ming Lei
2014-05-07 16:12 ` Paolo Bonzini [this message]
2014-05-07 16:29 ` Ming Lei
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=536A5B67.8030502@redhat.com \
--to=pbonzini@redhat.com \
--cc=JBottomley@parallels.com \
--cc=gaowanlong@cn.fujitsu.com \
--cc=linux-scsi@vger.kernel.org \
--cc=rusty@rustcorp.com.au \
--cc=tom.leiming@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.