Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp6997427rwr; Tue, 2 May 2023 08:11:04 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4xGovNUy3BlY5s5OcQ1032sWey7KwKGHyoEZw6IUaDPXFZl+CbB6HuVR7mkbceAheIt5UN X-Received: by 2002:a05:6830:1009:b0:6a4:28e5:8a8d with SMTP id a9-20020a056830100900b006a428e58a8dmr8797199otp.10.1683040264166; Tue, 02 May 2023 08:11:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683040264; cv=none; d=google.com; s=arc-20160816; b=c4h240n0Jy+xsiEqfUaEedEmZHFpnNBV+IS8f+/JTkgEQYLsE+uBXgxnsbvPNdyDO2 I4ZQngkQtnoxD+5BIc1OVnzNhY9zUMq4VxiMKLA586ayfjsWzTSzE1C6wnvL7VOp4eSY yQyFWg+wYJiwSDZEXYBUYN6VtsaIQI07Hhdk7XU/ftt4tPhbNg55IePvqhQbu2p+fFNB BwHSHdYVrcOWpRAW10cLKmU2CYD00JJHiW3xDGcOb67IeEheIhEcDvZ1l4XJgV1zWAVP vcg8KqVVFRYxlNzKm9zuwI1lydsnLDEp5+cKqBJkaE4Rh1YI+/tPCEHjZ8MgZ9yVf5h7 SQrw== 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 :organization:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id:dkim-signature; bh=bRYNJVFhwseCiL0jjUQStKX5TCOrfxvVONgPXFtg6uM=; b=BAV1DoPIf7fpCVY+ZomQoEw8k+ZZSXO8T5kNTxHLP374E7PAaT6V+O2jQhlDqvAfKy tXIX6IIy/U5EiFAn0PjOl05VY/0UE/o3FQpEx4zfrtRYHXKt3aUjA94nOpIvjkkrNwWw ajeAHcwLUCchWzv9NFrmCEIiAxMzyRzoMYaGHYTosPainvwaiZ5hG39/xzaeuuxgSUcg ExD4iHz45HJcj4crDBYNwnmN354ovFf39XNHb9IpqubeF2VZYcXu6qjdgW6rxkRTLjI5 Amc0l5OvvV3Q6OMQl+pGxFMN6VLl94uLxOj1qYxKbZb8Gf6Y1J4+mNWZ0GtM7nnsfMSl vgwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=U6Tlpe1Q; 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 bm5-20020a056830374500b0069e3617f020si25841763otb.87.2023.05.02.08.10.38; Tue, 02 May 2023 08:11:04 -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=U6Tlpe1Q; 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 S234383AbjEBPKC (ORCPT + 99 others); Tue, 2 May 2023 11:10:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33596 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233018AbjEBPKA (ORCPT ); Tue, 2 May 2023 11:10:00 -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 E64EA1704 for ; Tue, 2 May 2023 08:09:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1683040152; 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=bRYNJVFhwseCiL0jjUQStKX5TCOrfxvVONgPXFtg6uM=; b=U6Tlpe1QEyLPp0YTIahZfoo/tsYkUv/lvras/iPK2A2wP625/6bWXq5DVf9gLJpVta+Yvm nYwctwY16+CNUVrR1V9UoK0Lb9dFIWKxcCVB303G9N93x1mWmSOwbGewrA4s6NeeFG/p7R zh5xFT66VZJKOeR4AhqkNB49KU6I2KQ= 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-292-QyZ-7Kt-OhSuMSgZTUXduA-1; Tue, 02 May 2023 11:09:11 -0400 X-MC-Unique: QyZ-7Kt-OhSuMSgZTUXduA-1 Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-3f16ef3bf06so12356605e9.3 for ; Tue, 02 May 2023 08:09:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683040150; x=1685632150; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=bRYNJVFhwseCiL0jjUQStKX5TCOrfxvVONgPXFtg6uM=; b=Z8EiE1W/jJHp7KJAcqUp5Yez283ekwgWG5UD9HZXyKZ8Bs9wun63deMyiRpfGRaiaB a7pj10fpUmQmAo6Jn+kj2mvPOFrNgy3iIukzEpqMNS4DqpjAghDS8wpYwe6z9MpzBfUX iAsoBkzpUPV/hyDCEhU5UHaZ0VuM6vSNQhuq3HKtdN/BWLc3X4mwT0sZpYHP1N+hMGED sVlFsKycGdBPVfZ51Tj1SO/N7TodofkyaJ5CclUTj0bivVmhFo23kKkzI1cpfKlm9FF1 nJw0Wpk/vdyKQZPaopRVuVLHdjcGTKif/laefOGEcCPt57OsdA8EVMnPTpCOVya5qYVn Fxtg== X-Gm-Message-State: AC+VfDxtgyuxMddZLhuh+Frv5npxbBcf9JwOyTxY2N6kvDWwDNq3L85z wfQ7/7lalchIMD1zI9DqCjCx9TTCM/7UnAoBtuUOrMHi5g74xm+Z2lcBdj8DAmgBwQD/NYsYqYk beWKDzuqthhMWY4Tve+55UdoJ X-Received: by 2002:a1c:7710:0:b0:3f1:6527:df05 with SMTP id t16-20020a1c7710000000b003f16527df05mr13078905wmi.22.1683040149578; Tue, 02 May 2023 08:09:09 -0700 (PDT) X-Received: by 2002:a1c:7710:0:b0:3f1:6527:df05 with SMTP id t16-20020a1c7710000000b003f16527df05mr13078837wmi.22.1683040149211; Tue, 02 May 2023 08:09:09 -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 d23-20020a1c7317000000b003f325f0e020sm13416157wmb.47.2023.05.02.08.09.06 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 02 May 2023 08:09:08 -0700 (PDT) Message-ID: <1f3231c0-34b2-1e78-0bf0-f32d5b67811d@redhat.com> Date: Tue, 2 May 2023 17:09:06 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: [PATCH v6 3/3] mm/gup: disallow FOLL_LONGTERM GUP-fast writing to file-backed mappings Content-Language: en-US To: Matthew Rosato , Jason Gunthorpe Cc: 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> <1d4c9258-9423-7411-e722-8f6865b18886@linux.ibm.com> From: David Hildenbrand Organization: Red Hat In-Reply-To: <1d4c9258-9423-7411-e722-8f6865b18886@linux.ibm.com> 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=unavailable 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:56, Matthew Rosato wrote: > On 5/2/23 9:50 AM, 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. > > I might have mis-explained above. > > With iommufd nesting, we will pin everything upfront as a starting point. > > The current usage of vfio type1 iommu for s390 does not pin the entirety of guest memory upfront, it happens as guest RPCITs occur / type1 mappings are made. ... so, after the domain started successfully on the libvirt/QEMU side ? :/ It would be great to confirm that. There might be a BUG in patch #2 (see my reply to patch #2) that might not allow you to reproduce it right now. -- Thanks, David / dhildenb