From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 95F8FC433FF for ; Thu, 15 Aug 2019 03:28:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6FDB3208C2 for ; Thu, 15 Aug 2019 03:28:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729812AbfHOD2N (ORCPT ); Wed, 14 Aug 2019 23:28:13 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60636 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727750AbfHOD2M (ORCPT ); Wed, 14 Aug 2019 23:28:12 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BD71CC055673; Thu, 15 Aug 2019 03:28:12 +0000 (UTC) Received: from [10.72.12.184] (ovpn-12-184.pek2.redhat.com [10.72.12.184]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8A9C85D9DC; Thu, 15 Aug 2019 03:28:07 +0000 (UTC) Subject: Re: [PATCH V5 0/9] Fixes for vhost metadata acceleration To: Christoph Hellwig , Jason Gunthorpe Cc: "Michael S. Tsirkin" , kvm@vger.kernel.org, virtualization@lists.linux-foundation.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org References: <20190809054851.20118-1-jasowang@redhat.com> <20190810134948-mutt-send-email-mst@kernel.org> <360a3b91-1ac5-84c0-d34b-a4243fa748c4@redhat.com> <20190812054429-mutt-send-email-mst@kernel.org> <20190812130252.GE24457@ziepe.ca> <9a9641fe-b48f-f32a-eecc-af9c2f4fbe0e@redhat.com> <20190813115707.GC29508@ziepe.ca> <20190813164105.GD22640@infradead.org> From: Jason Wang Message-ID: Date: Thu, 15 Aug 2019 11:28:05 +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: <20190813164105.GD22640@infradead.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.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Thu, 15 Aug 2019 03:28:12 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019/8/14 上午12:41, Christoph Hellwig wrote: > On Tue, Aug 13, 2019 at 08:57:07AM -0300, Jason Gunthorpe wrote: >> On Tue, Aug 13, 2019 at 04:31:07PM +0800, Jason Wang wrote: >> >>> What kind of issues do you see? Spinlock is to synchronize GUP with MMU >>> notifier in this series. >> A GUP that can't sleep can't pagefault which makes it a really weird >> pattern > get_user_pages/get_user_pages_fast must not be called under a spinlock. > We have the somewhat misnamed __get_user_page_fast that just does a > lookup for existing pages and never faults for a few places that need > to do that lookup from contexts where we can't sleep. Yes, I do use __get_user_pages_fast() in the code. Thanks