From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hillf Danton Subject: Re: [PATCH 2/2] vhost: re-introducing metadata acceleration through kernel virtual address Date: Fri, 6 Sep 2019 11:21:54 +0800 Message-ID: <20190906032154.9376-1-hdanton__23122.0118979522$1567740671$gmane$org@sina.com> References: <20190905122736.19768-1-jasowang@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20190905122736.19768-1-jasowang@redhat.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: virtualization-bounces@lists.linux-foundation.org Errors-To: virtualization-bounces@lists.linux-foundation.org To: Jason Wang Cc: aarcange@redhat.com, Christoph Hellwig , linux-parisc@vger.kernel.org, kvm@vger.kernel.org, mst@redhat.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org, James Bottomley , linux-mm@kvack.org, jglisse@redhat.com, jgg@mellanox.com, David Miller , linux-arm-kernel@lists.infradead.org List-Id: virtualization@lists.linuxfoundation.org On Thu, 5 Sep 2019 20:27:36 +0800 From: Jason Wang > > +static void vhost_set_map_dirty(struct vhost_virtqueue *vq, > + struct vhost_map *map, int index) > +{ > + struct vhost_uaddr *uaddr = &vq->uaddrs[index]; > + int i; > + > + if (uaddr->write) { > + for (i = 0; i < map->npages; i++) > + set_page_dirty(map->pages[i]); > + } Not sure need to set page dirty under page lock.