mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Yongji Xie <xieyongji@bytedance.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Jason Wang <jasowang@redhat.com>,
	Liu Xiaodong <xiaodong.liu@intel.com>,
	Maxime Coquelin <maxime.coquelin@redhat.com>,
	Stefan Hajnoczi <stefanha@redhat.com>,
	songmuchun@bytedance.com,
	virtualization <virtualization@lists.linux-foundation.org>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 1/5] vduse: Remove unnecessary spin lock protection
Date: Wed, 13 Jul 2022 18:39:04 +0800	[thread overview]
Message-ID: <CACycT3uu3DWsLTH8b4GhTLS74hmduH5ugaKGEqaoBrdQckyPow@mail.gmail.com> (raw)
In-Reply-To: <20220713015352-mutt-send-email-mst@kernel.org>

On Wed, Jul 13, 2022 at 1:57 PM Michael S. Tsirkin <mst@redhat.com> wrote:
>
> On Wed, Jul 06, 2022 at 01:04:59PM +0800, Xie Yongji wrote:
> > Taking iotlb lock to access bounce page in page fault
> > handler is meaningless since vduse_domain_free_bounce_pages()
> > would only be called during file release.
> >
> > Signed-off-by: Xie Yongji <xieyongji@bytedance.com>
>
> vduse_domain_free_bounce_pages is not the
> only one taking this lock.

Yes, but only vduse_domain_free_bounce_pages() is to protect
domain->bounce_maps with this lock. In other places, the lock is used
to protect the domain->iotlb.

> This commit log needs more
> analysis documenting all points of access to bounce_maps
> and why vduse_domain_get_bounce_page and file
> release are the only two.
>

OK, I will explain that we actually protect two different variables
(domain->bounce_maps and domain->iotlb) with one lock.

Thanks,
Yongji

  reply	other threads:[~2022-07-13 10:39 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-06  5:04 [PATCH v2 0/5] VDUSE: Support registering userspace memory as bounce buffer Xie Yongji
2022-07-06  5:04 ` [PATCH v2 1/5] vduse: Remove unnecessary spin lock protection Xie Yongji
2022-07-13  5:43   ` Jason Wang
2022-07-13 11:08     ` Yongji Xie
2022-07-14  2:27       ` Jason Wang
2022-07-14  6:06         ` Yongji Xie
2022-07-13  5:57   ` Michael S. Tsirkin
2022-07-13 10:39     ` Yongji Xie [this message]
2022-07-06  5:05 ` [PATCH v2 2/5] vduse: Use memcpy_{to,from}_page() in do_bounce() Xie Yongji
2022-07-13  5:59   ` Jason Wang
2022-07-06  5:05 ` [PATCH v2 3/5] vduse: Support using userspace pages as bounce buffer Xie Yongji
2022-07-06  5:05 ` [PATCH v2 4/5] vduse: Support querying IOLTB information Xie Yongji
2022-07-14  2:51   ` Jason Wang
2022-07-14  5:58     ` Yongji Xie
2022-07-06  5:05 ` [PATCH v2 5/5] vduse: Support registering userspace memory for IOTLB Xie Yongji
2022-07-06  6:08   ` kernel test robot
2022-07-07 23:01   ` kernel test robot
2022-07-08  1:14   ` kernel test robot
2022-07-06  9:30 ` [PATCH v2 0/5] VDUSE: Support registering userspace memory as bounce buffer Jason Wang
2022-07-06 10:15   ` Yongji Xie
2022-07-08  8:38     ` Jason Wang
2022-07-08  9:53       ` Yongji Xie
2022-07-11  6:02         ` Jason Wang
2022-07-11  7:24           ` Yongji Xie
2022-07-14  2:59             ` Jason Wang

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=CACycT3uu3DWsLTH8b4GhTLS74hmduH5ugaKGEqaoBrdQckyPow@mail.gmail.com \
    --to=xieyongji@bytedance.com \
    --cc=jasowang@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maxime.coquelin@redhat.com \
    --cc=mst@redhat.com \
    --cc=songmuchun@bytedance.com \
    --cc=stefanha@redhat.com \
    --cc=virtualization@lists.linux-foundation.org \
    --cc=xiaodong.liu@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®