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 D9FCEC77B7E for ; Tue, 2 May 2023 15:09:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233986AbjEBPJy (ORCPT ); Tue, 2 May 2023 11:09:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33588 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233771AbjEBPJx (ORCPT ); Tue, 2 May 2023 11:09:53 -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 E5E06A6 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-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-292-bqYKY0A4O4-pPe1ufRjL_w-1; Tue, 02 May 2023 11:09:10 -0400 X-MC-Unique: bqYKY0A4O4-pPe1ufRjL_w-1 Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-3f16ef3bf06so12356595e9.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=CK8/rRe+UrCdLTmDE2HiXT8MZImlQrECRCMqOUgO24hXZ61fH+3twVfAFe6MXCZDh3 095cHbW+J3IZLUVseSBooYZqCgCPmTfdIzFxZGt6e0DI01jaHPZLHniQrxiuMGBk5unQ pcIMqYZ66LWJE5+foyQ11bGc1WiCIMsf1sW5sI3/dVmXn8mSQ2c7bKpK/twGEOkQJ3o1 atQqPD9AlSleAOM3PLxwA14TIG6FhlNxsLeQ6UXvbiZMTDWHUA9LVCvEN4RtLOoLbAjJ 5EoiXS+F73MKN/q8gGA4kF2i8kRa4AqtMSJBL/BZdLAztckKPo2QUpjTKJ7L7HaZeKz3 shBg== X-Gm-Message-State: AC+VfDy/OVN551hn0Et6jUJ81JPA4XoSyxBGrGLqkDeRR9vvVjlC1Tn1 ZL6tetUHofiP/U3ZghwKd1q+XltB1uQJZVIbG+m8Pwa0B0uM7hSYU+gjMzOGy0dNisjplqw4lth TigrleE6Y2ywUzdG6HzPJDc+NxvNIIg== X-Received: by 2002:a1c:7710:0:b0:3f1:6527:df05 with SMTP id t16-20020a1c7710000000b003f16527df05mr13078887wmi.22.1683040149571; Tue, 02 May 2023 08:09:09 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6fWNjXb+x1RTqs+C4cbBtsb27FdAaquHZ29RbX4irITUmwGCH1YeZ2ULrHO1qwL0l1qzelew== 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 Precedence: bulk List-ID: X-Mailing-List: linux-perf-users@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