Received: by 2002:ac0:950c:0:0:0:0:0 with SMTP id f12csp3853337imc; Thu, 14 Mar 2019 06:50:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqwK58FxhFYcB0LhVdA7BrnvLIt01gEcL+G1Gs6fmZ9DFefkv7gnXiVSirJbKk7kcSfsEbOn X-Received: by 2002:a17:902:e50b:: with SMTP id ck11mr52409141plb.25.1552571410094; Thu, 14 Mar 2019 06:50:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552571410; cv=none; d=google.com; s=arc-20160816; b=Zs3VvDRxrmbU3Yz8514nZMDETmZNRN7OboBHNBFeVTy5IH1fxCxSTYFuvotXEXO1NM BqW/DQzSzA7R3x568HDswPUVi/IAr4KFKUO9L1EUrBW30bD8CmhxdyuMVTLtwGeO9tSE ZPKwFqT+VYarTK8N5WxAPbOivGvSl5L70Tj3pKebBqYsFQv30jzDiGhriBIkhCxrSKPW qaldLjuBpaHF5h9IijktZeSPFH5T6gJm8fanuVKA0qsW7rwQa8LJCb/FBoPcJw3CAYzI 9gSRX3PmS6IbY0TW84c4Q3R6S/ORO66TZVDafUdOfgswa6+41dcTs7g/Zsx3u35gdEcZ 7zdg== 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=jM7lEdNxFfAF3JC1tjnKk4YbFexy4cY2i7J2knNu5j8=; b=QWBm8wN8LfrGvKqtPjqfhMf1MWno/yS4CNzQtPjfeIJybokzyleFtrEydA669kr2++ ZYiz2WUr841Fb25JIepB07xUQ+IVuQ1AdkARPBwJtMT+7NU8mOk78WcnMbnqH1CnHbTw Qih9fKChYAH4/lL6fTuqnGbwbuv2VrhvGZ+YUiceTY6WTbHo3pVyoTULVtVWVkSIH47J tMlJn+8MtOKI2jIcVgLQgLQo923Nw5YAv4PIjV85jZyPSzIGPdSA4Ed6xFSf8db6+6EC a9y2ilSwarVK9WPawbEcgAcdrBs4EZIavijtKZ5Z98T52eIlxAIX75KyWFxjO1NOUtSV 2UOA== 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 g16si12563414pfd.263.2019.03.14.06.49.53; Thu, 14 Mar 2019 06:50:10 -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 S1727501AbfCNNtQ (ORCPT + 99 others); Thu, 14 Mar 2019 09:49:16 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44784 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726845AbfCNNtP (ORCPT ); Thu, 14 Mar 2019 09:49:15 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6E057307B494; Thu, 14 Mar 2019 13:49:15 +0000 (UTC) Received: from [10.72.12.71] (ovpn-12-71.pek2.redhat.com [10.72.12.71]) by smtp.corp.redhat.com (Postfix) with ESMTP id ABC525D73D; Thu, 14 Mar 2019 13:49:05 +0000 (UTC) Subject: Re: [RFC PATCH V2 0/5] vhost: accelerate metadata access through vmap() To: "Michael S. Tsirkin" , James Bottomley Cc: Christoph Hellwig , Andrea Arcangeli , David Miller , kvm@vger.kernel.org, virtualization@lists.linux-foundation.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, peterx@redhat.com, linux-mm@kvack.org, linux-arm-kernel@lists.infradead.org, linux-parisc@vger.kernel.org References: <20190311.111413.1140896328197448401.davem@davemloft.net> <6b6dcc4a-2f08-ba67-0423-35787f3b966c@redhat.com> <20190311235140-mutt-send-email-mst@kernel.org> <76c353ed-d6de-99a9-76f9-f258074c1462@redhat.com> <20190312075033-mutt-send-email-mst@kernel.org> <1552405610.3083.17.camel@HansenPartnership.com> <20190312200450.GA25147@redhat.com> <1552424017.14432.11.camel@HansenPartnership.com> <20190313160529.GB15134@infradead.org> <1552495028.3022.37.camel@HansenPartnership.com> <20190314064004-mutt-send-email-mst@kernel.org> From: Jason Wang Message-ID: <74015196-2e18-4fe0-50ac-0c9d497315c7@redhat.com> Date: Thu, 14 Mar 2019 21:49:03 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 MIME-Version: 1.0 In-Reply-To: <20190314064004-mutt-send-email-mst@kernel.org> 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.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Thu, 14 Mar 2019 13:49:15 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019/3/14 下午6:42, Michael S. Tsirkin wrote: >>>>> Which means after we fix vhost to add the flush_dcache_page after >>>>> kunmap, Parisc will get a double hit (but it also means Parisc >>>>> was the only one of those archs needed explicit cache flushes, >>>>> where vhost worked correctly so far.. so it kinds of proofs your >>>>> point of giving up being the safe choice). >>>> What double hit? If there's no cache to flush then cache flush is >>>> a no-op. It's also a highly piplineable no-op because the CPU has >>>> the L1 cache within easy reach. The only event when flush takes a >>>> large amount time is if we actually have dirty data to write back >>>> to main memory. >>> I've heard people complaining that on some microarchitectures even >>> no-op cache flushes are relatively expensive. Don't ask me why, >>> but if we can easily avoid double flushes we should do that. >> It's still not entirely free for us. Our internal cache line is around >> 32 bytes (some have 16 and some have 64) but that means we need 128 >> flushes for a page ... we definitely can't pipeline them all. So I >> agree duplicate flush elimination would be a small improvement. >> >> James > I suspect we'll keep the copyXuser path around for 32 bit anyway - > right Jason? Yes since we don't want to slow down 32bit. Thanks > So we can also keep using that on parisc... > > --