Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp6908162rwr; Tue, 2 May 2023 07:08:23 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4nz5LsIWCFVqttcMfo9O3ZWL1B1diCuT0T4jP5yf0xDDxq9rACNiTp/3puIs818dwogoSW X-Received: by 2002:a17:902:f548:b0:1aa:e0c4:54e8 with SMTP id h8-20020a170902f54800b001aae0c454e8mr11119026plf.28.1683036503206; Tue, 02 May 2023 07:08:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683036503; cv=none; d=google.com; s=arc-20160816; b=gtOUOLbDJFXQTl1mw9/dB+yykTcWlE4fL5E8MrT+U8z4y5x1fxUEM+eKiyxK3rm3ub 79uCDuvkQjn0ZyeWDLepI4BbwEmOe0i4qQYb55Af06bfmeK3CSm442w5OolPFk8oY8wU si/0IpcODoo4ZgOdmhRKCjNTiLoDCYRSuifkrNjcSGggtFF34mL8L6m3cjlXv9tOmLis 5ze+2g44/xfbix2I/KSEsxKpa05ztVuyJLhnGdZ9KK9ohtUezVjGytmsS/V8Efi+8kZ/ Ml7ECJVr7PokKMp2a/kdVmzq3Zdo1lo38yuhJlVppFw8Xovw7ZVIEko7LvFzsg4o6geL 7ONw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:subject :organization:from:references:cc:to:content-language:user-agent :mime-version:date:message-id:dkim-signature; bh=BFKZppZmpvZn37NH6T+y3WQHfsa5GEZZMAq/yDgIM88=; b=LJptajrUHGnuHGPdWUDaL1Gxv3AVkCqW0d+HbW2hpYapn1HTGbq272dYsXg7rK7EcX g5FubwCm+JLtGuY+8Y5aqTiYyCA1IzkeMGYpiQh1LD6f9ebtFKJjgcApqHszYq+rjk9d Nk22OB2D2jdgb9MylsDPZu0zAI9hnrws0FpvpS++4BwW1nHeiyx5JLLy17ntCc4OzIb2 5YnatW+18N4ylKMRq1wXvrvuxVXUXY2jOJ/+lyGeZMSsOuiXIR7DSMabVFx60cJ3A2im zucT0Ndg5GUuOlw4k4I3XY6S0UyazCfucsqnLdKfvFcKQcjOu3/kY5GTjzgy1HoH9JgO I3qQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=SBQeuith; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id li12-20020a170903294c00b001a8102f5d7fsi26388674plb.504.2023.05.02.07.08.08; Tue, 02 May 2023 07:08:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=SBQeuith; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234420AbjEBN60 (ORCPT + 99 others); Tue, 2 May 2023 09:58:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54714 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233998AbjEBN6Y (ORCPT ); Tue, 2 May 2023 09:58:24 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 31B6A180 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-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-412-tGLJ5JpVO6ypYOU_oiV1wg-1; Tue, 02 May 2023 09:57:34 -0400 X-MC-Unique: tGLJ5JpVO6ypYOU_oiV1wg-1 Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-3f187a7a626so11545945e9.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=1683035853; x=1685627853; 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=NoqmdlQ35xDj/c1w4RlaTN8QCKOMgNWfwFhrKVJZoDHH/nWvifuBQk5g5Og6LVMg4F 1bBK80PR8V51hQplG9SGKGglIgebYfl+vNRJUkr3GTA6cNN5uIcTrilw1eGyLxZz7ppd LKzipPuK7zSBTq+EfOLJDvtK4jf3CQJd3JLJWiqRXmaMkc/WFPFXWWbIzeG0H9GEf6T4 mf3H6I2V8Ivzcv9FYUIYCpugghelT59tY6maWBWEhBWlRa+sBvYlLRjbMMnr+d5G2Bk9 eglCOkwUCuzinYW2O8URmipaIKLXTqDmV8dTH3R3WWYdKeNjbxFWbVCC3OJRxsXmPkoa SKMg== X-Gm-Message-State: AC+VfDyoEVCku19acS5315idnWPMZL1cm7AuKvhOGtI4EYkBjF5QfJs9 HjwJFEZLMYPHv28dmPC5Qk0u9912zC+c5Hsg2UgBwJDpcWdHcquaIZr5rSh8u1xAlG9TQ5RmH6K IEzY2DeQml7k42a39kTMNdvSH X-Received: by 2002:a05:600c:3787:b0:3f1:9540:d5fe with SMTP id o7-20020a05600c378700b003f19540d5femr11730780wmr.21.1683035853688; Tue, 02 May 2023 06:57:33 -0700 (PDT) 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 X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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