Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp872897ybe; Fri, 6 Sep 2019 08:32:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqzFT20BMAS1aSsaMP7wK/qNnxS97rPqg0pGy2uyBYB0pg15aNTRovdr8UYO9YG0kYoFwaDW X-Received: by 2002:a63:5823:: with SMTP id m35mr8620642pgb.329.1567783921420; Fri, 06 Sep 2019 08:32:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567783921; cv=none; d=google.com; s=arc-20160816; b=Yl3ohOdd2KtqI+idY8RypyybfgeSGvVXtb0Xxmmds7Pc4GlBHT/nTG3Y/EUZII80hS NHN1KFNvfetzURvlPqXuYb/ZDfCmvXVPgc2X8M3aV1WWG0WexP4fo9UBJJGQHmik2DRm PAA7CoFukp9gOp/KGGCQROg+YwAcudreTmNYki1jHki4pQbRCogrPyEtzUhV4/iGscAp l1WqBqIvSL6RYOTnYl0BCB9G5M5eiyc4A22s8pHJDSSct4oRAIu2DYXuQgp0DxM96OsO RNlGOuDKid2MzXlDAsHiIIjVONGEup6BVfLoXXFBBogvKNLK+e22BZoKz4e9aiJluei+ 6Y/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=YT/ytD7k/wFwQe7BgxqPAj0duufFyPr3XHhtyY3O8DU=; b=rF5R4edwVp+OISBaXhO1FXOLW5evgb4dVoNlGugjhKTj8w5zAFh4xdefSusHtpNAbE V6rEJwJIJ+LLR15RfSBHpWrojlV7A8hChda4vCPQplaGI32cNAaWCDQ92tAdC6m2rxte KN7MWWpr1ibYcR3IKf4luNWpWP4B6ktJr5pc/kv/HYoIIUi1FSWjRzwCwwS6M9KOe0mw 35dCyYP+nM2RAvNxjqz9Ke7XSu8WjhTzO+mQnJWIXgbDSjGCDp9jJuVWLk5dmAkWxVx3 HPN5zEjWGUaRWeht3nGTOJFQ30U3ue0xViLurW4FE2BjIlX9G67NA74krlPA3SygJOoV SiQQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p13si4978142plo.267.2019.09.06.08.31.45; Fri, 06 Sep 2019 08:32:01 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404787AbfIFMvl (ORCPT + 99 others); Fri, 6 Sep 2019 08:51:41 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37400 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404772AbfIFMvk (ORCPT ); Fri, 6 Sep 2019 08:51:40 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 383D38980E3; Fri, 6 Sep 2019 12:51:39 +0000 (UTC) Received: from [10.72.12.95] (ovpn-12-95.pek2.redhat.com [10.72.12.95]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1D1A260605; Fri, 6 Sep 2019 12:51:30 +0000 (UTC) Subject: Re: [PATCH 2/2] vhost: re-introducing metadata acceleration through kernel virtual address To: Hillf Danton Cc: mst@redhat.com, kvm@vger.kernel.org, virtualization@lists.linux-foundation.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, jgg@mellanox.com, aarcange@redhat.com, jglisse@redhat.com, linux-mm@kvack.org, James Bottomley , Christoph Hellwig , David Miller , linux-arm-kernel@lists.infradead.org, linux-parisc@vger.kernel.org References: <20190905122736.19768-1-jasowang@redhat.com> <20190906032154.9376-1-hdanton@sina.com> From: Jason Wang Message-ID: Date: Fri, 6 Sep 2019 20:51:29 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20190906032154.9376-1-hdanton@sina.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.67]); Fri, 06 Sep 2019 12:51:39 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019/9/6 上午11:21, Hillf Danton wrote: > 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. Just to make sure I understand the issue. Do you mean there's no need for set_page_dirty() here? If yes, is there any other function that already did this? Thanks