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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C749FC77B7E for ; Tue, 2 May 2023 13:58:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233958AbjEBN6T (ORCPT ); Tue, 2 May 2023 09:58:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54720 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229945AbjEBN6R (ORCPT ); Tue, 2 May 2023 09:58:17 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4576318E for ; Tue, 2 May 2023 06:57:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1683035856; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=BFKZppZmpvZn37NH6T+y3WQHfsa5GEZZMAq/yDgIM88=; b=SBQeuithexmoHOGfYqdB3Xg9kiLElAIoKMqwWx/eC/2oz9SJlx4j8O659/dars36YDBLCn WwffOlkt2KjmDQzY5rIO0qg5f40AtQmoKm6R1WKsaFTWaNvxpSTVPB8DAY7Y5EPtNMMwvw bAnUuXmUyiMKRIl+sH/rHtY6DGmUGV4= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-175-W2g_Ri3vMOiCumxDAU8ZMg-1; Tue, 02 May 2023 09:57:35 -0400 X-MC-Unique: W2g_Ri3vMOiCumxDAU8ZMg-1 Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-3f187a7a626so11546025e9.0 for ; Tue, 02 May 2023 06:57:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683035854; x=1685627854; h=content-transfer-encoding:in-reply-to:subject:organization:from :references:cc:to:content-language:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=BFKZppZmpvZn37NH6T+y3WQHfsa5GEZZMAq/yDgIM88=; b=Q5Yoa8tA6GqRwYT+lZUaxu53oYFk6s5S4NKDOiUvh39WLGQ7bqt5mM8qWofc/1as5X LXq3Wdea85t77+kkEXsQDdJ+LUeeNjiAdlXki9Ywcdxja03Nm/eqUbFEkQn7b07QWON+ VFcLtnlg3RsJm4p7ElfgDmcUFKSs7/XsOigmGekWVheCN8k9fbzPNGL3iPItWIke450I 3c/8uaWoB1/Zp7SZ2rre/TPVPJLVO9OxqXwtCMKvZ/GDUKAQuk+EUtY6RlSq29aBB4CU tjuXBtK2F9nyywv4d/aSolRH/tImbpCQd4PZGEpBIIM5FYethjsb9QLnejccnjCKaBbq u/mw== X-Gm-Message-State: AC+VfDwm7yEMjVzNcuEsmd6HFm71s2LTWVTOutdq45LtxRPfE9pFBK1t uLUc5gw3OLrhMKR1yBs6VcK0TcCJHSUMNyWbmeVD05ZuqSAh4HgiHSp6I4ZjRKPZNGbosBGW3Jk G8u+IkTXR8e3VtGcDWHoyUvI3zzM1gg== X-Received: by 2002:a05:600c:3787:b0:3f1:9540:d5fe with SMTP id o7-20020a05600c378700b003f19540d5femr11730772wmr.21.1683035853683; Tue, 02 May 2023 06:57:33 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4h+z02B2dd70XZKfnqJ5spQ0OHCTBKNIKA8Em6ryzkITiNSlT8DvH2K/BVtegqd1JIECFQbA== X-Received: by 2002:a05:600c:3787:b0:3f1:9540:d5fe with SMTP id o7-20020a05600c378700b003f19540d5femr11730752wmr.21.1683035853338; Tue, 02 May 2023 06:57:33 -0700 (PDT) Received: from ?IPV6:2003:cb:c700:2400:6b79:2aa:9602:7016? (p200300cbc70024006b7902aa96027016.dip0.t-ipconnect.de. [2003:cb:c700:2400:6b79:2aa:9602:7016]) by smtp.gmail.com with ESMTPSA id p8-20020a05600c358800b003f1738d0d13sm51382271wmq.1.2023.05.02.06.57.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 02 May 2023 06:57:32 -0700 (PDT) Message-ID: <1ffbbfb7-6bca-0ab0-1a96-9ca81d5fa373@redhat.com> Date: Tue, 2 May 2023 15:57:30 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Content-Language: en-US To: Jason Gunthorpe Cc: Matthew Rosato , Christian Borntraeger , Lorenzo Stoakes , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrew Morton , Jens Axboe , Matthew Wilcox , Dennis Dalessandro , Leon Romanovsky , Christian Benvenuti , Nelson Escobar , Bernard Metzler , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Ian Rogers , Adrian Hunter , Bjorn Topel , Magnus Karlsson , Maciej Fijalkowski , Jonathan Lemon , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Christian Brauner , Richard Cochran , Alexei Starovoitov , Daniel Borkmann , Jesper Dangaard Brouer , John Fastabend , linux-fsdevel@vger.kernel.org, linux-perf-users@vger.kernel.org, netdev@vger.kernel.org, bpf@vger.kernel.org, Oleg Nesterov , John Hubbard , Jan Kara , "Kirill A . Shutemov" , Pavel Begunkov , Mika Penttila , Dave Chinner , Theodore Ts'o , Peter Xu References: <7d56b424-ba79-4b21-b02c-c89705533852@lucifer.local> From: David Hildenbrand Organization: Red Hat Subject: Re: [PATCH v6 3/3] mm/gup: disallow FOLL_LONGTERM GUP-fast writing to file-backed mappings In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-perf-users@vger.kernel.org On 02.05.23 15:50, Jason Gunthorpe wrote: > On Tue, May 02, 2023 at 03:47:43PM +0200, David Hildenbrand wrote: >>> Eventually we want to implement a mechanism where we can dynamically pin in response to RPCIT. >> >> Okay, so IIRC we'll fail starting the domain early, that's good. And if we >> pin all guest memory (instead of small pieces dynamically), there is little >> existing use for file-backed RAM in such zPCI configurations (because memory >> cannot be reclaimed either way if it's all pinned), so likely there are no >> real existing users. > > Right, this is VFIO, the physical HW can't tolerate not having pinned > memory, so something somewhere is always pinning it. > > Which, again, makes it weird/wrong that this KVM code is pinning it > again :\ IIUC, that pinning is not for ordinary IOMMU / KVM memory access. It's for passthrough of (adapter) interrupts. I have to speculate, but I guess for hardware to forward interrupts to the VM, it has to pin the special guest memory page that will receive the indications, to then configure (interrupt) hardware to target the interrupt indications to that special guest page (using a host physical address). -- Thanks, David / dhildenb