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 ABED9C77B7E for ; Tue, 2 May 2023 13:58:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234357AbjEBN60 (ORCPT ); Tue, 2 May 2023 09:58:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54736 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234190AbjEBN6Y (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 454A51A5 for ; Tue, 2 May 2023 06:57:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1683035857; 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=TaWpP3nmZuZCvQS2931VuARTiJGdfr0AhVexiQbPNJq5oZ5j3xnF+j8mIvZnnh2RP7K9jX TnTy8xAhoPargvqGOtBq6z3EiRtDhLAoltqQRVSxvN6D61V07WBMa2EhwhokFU9DcTfr5X TD9NhIdMTPYAhCAU8amSMzRh+99Dq8U= 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-600-E5cGb4k8M3iy-Vfuan27eQ-1; Tue, 02 May 2023 09:57:34 -0400 X-MC-Unique: E5cGb4k8M3iy-Vfuan27eQ-1 Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-3f187a7a626so11545975e9.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=IziW+vAROGL7f1QzrPEeG16qnh5RfuLrKyqf9NQ449C7s+a2SYvWr0V7KdXq9HgttW LqBEO7ZhWPPlbI9fC4ChLQRw1yv3ySex3PTrWyb5BOUbE9pPXkgSgPK4agn13gNWd6lM QGCrrjmjg1rG6DGsRBuKlQjHJOJpyRYZHntSOFfQ79KursyNpR6Ji2HN4Ax0syzsfXkk e6B0Ljz87auQTG+bPVMRK9gkpFQxbZyAT3HbDgbhULoeSWskUGbDmLSazPBrRM0HV+b4 y0/t/IJPe5vsjvrJD+NLBxnJIaBmQ6tuwqueJwWluSpk80p7ehYI/BUVpToWwEa7Twal TGeg== X-Gm-Message-State: AC+VfDwn5WlUOvDSwEyLMoDkOz+ZhqeWkT9rxhSds5xnQq3aRtTZ7fEV ZwW3suRZBGYbKT0Gfj/uVYg9Y0BD3IM9lCcoSekZS0S9KhIdNQBgDgSzmP+lItK4hA3sQvDwJ6V xOLDQ9b55pKPR+mDbKYvLh4uXfQ== X-Received: by 2002:a05:600c:3787:b0:3f1:9540:d5fe with SMTP id o7-20020a05600c378700b003f19540d5femr11730798wmr.21.1683035853693; 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-fsdevel@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