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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6BBBEC77B73 for ; Tue, 2 May 2023 15:19:13 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D70646B0078; Tue, 2 May 2023 11:19:12 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D201D6B007B; Tue, 2 May 2023 11:19:12 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C3661900002; Tue, 2 May 2023 11:19:12 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) by kanga.kvack.org (Postfix) with ESMTP id 717C86B0078 for ; Tue, 2 May 2023 11:19:12 -0400 (EDT) Received: by mail-wm1-f50.google.com with SMTP id 5b1f17b1804b1-3f19ab994ccso40909975e9.2 for ; Tue, 02 May 2023 08:19:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683040752; x=1685632752; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=EMDcO9JRQp+eGZiLNGZuH9Z/nD7SGrXL+vGe1dHac2k=; b=TVnRsHX/cp5Qtg8lp16YUG02NC+ZrJi3caXZ7nPAEPhvOTz7029SyJjN4SdD1ve/Mz E2FjKLDfXqedBtpVyH4iFb5Vc6Un6qVQCYpg7kC6HpP4DS5ap6sUvqQc+3vOqTtyexOy E0AZBEPb3/daR7pMj8kwx9zzXFy/2JyYkmknjhAETBLzhUSGINMmPk28zqZFJUQkGqeU b2lSDb0GDJNz1ruNMmIPcKianju4nA+zTsMbvsg3rpXCiYvCDVBO1qkVZwqa8x1Z+MeY bedHMZGV01ddupOGqImeMvtEN0tEkPBNAvC/pG4uxmSQ8ASRSZNba5suyzgqpTS/cF96 EWfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683040752; x=1685632752; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=EMDcO9JRQp+eGZiLNGZuH9Z/nD7SGrXL+vGe1dHac2k=; b=STncHv/xbZSEa/kfc1d75Mup1v+PWTuE3yFN3dvOBV6+GGPk9jI8Wx56HaUX6S9ZhR fJ8B5Hf4O2BNi09ehSamygTRb9sDIVtR6B25EGIGrSZ6yr1qhyqgV5spJXuMKYiN+CeS znGemrRrCNWVEVT3AF9RpRTOCkjyB/0S4ivZC6ZYZn0jmsX9r03fa0hYRk4tb9mWP0yc X2NRwj0B7hpfvFa45R9by53mnPeOTrG5i1GTasGWepOew7PMrgP8UQSpGHxn/BhMkR+B b3u/g+ghkozBEGWa74rFg0jFjLylGqOPQUdTzkYznd9DLD7m6peHiFyPO+s8K+R/yyUX 247w== X-Gm-Message-State: AC+VfDzXQCY2GkP6gY+L0Bc0NvL0z3oOVL3CcB2dkYzkVNv7N4mSZ0mi nKZ03lDIgAXnrCUGoMWxPBg= X-Google-Smtp-Source: ACHHUZ7hz/4x5oSKMo0hPlxgSGnmN/QIy7aFzU1N2reK24btMnDSCCKYUee82DSZE/vTzGS2+EiGEQ== X-Received: by 2002:a1c:ed0e:0:b0:3f1:7372:66d1 with SMTP id l14-20020a1ced0e000000b003f1737266d1mr12372603wmh.0.1683040751465; Tue, 02 May 2023 08:19:11 -0700 (PDT) Received: from localhost (host86-156-84-164.range86-156.btcentralplus.com. [86.156.84.164]) by smtp.gmail.com with ESMTPSA id o3-20020a05600c378300b003ef5f77901dsm35698904wmr.45.2023.05.02.08.19.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 May 2023 08:19:10 -0700 (PDT) Date: Tue, 2 May 2023 16:19:10 +0100 From: Lorenzo Stoakes To: David Hildenbrand Cc: Matthew Rosato , Jason Gunthorpe , Christian Borntraeger , 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 Subject: Re: [PATCH v6 3/3] mm/gup: disallow FOLL_LONGTERM GUP-fast writing to file-backed mappings Message-ID: <25b7aa40-fad0-4886-90b2-c5d68d75d28b@lucifer.local> References: <1d4c9258-9423-7411-e722-8f6865b18886@linux.ibm.com> <1f3231c0-34b2-1e78-0bf0-f32d5b67811d@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1f3231c0-34b2-1e78-0bf0-f32d5b67811d@redhat.com> X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Tue, May 02, 2023 at 05:09:06PM +0200, David Hildenbrand wrote: > 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. > Yes apologies - thank you VERY much for doing this Matthew, but apologies, I made rather a clanger in patch 2 which would mean fast patch degrading to slow path would pass even for file-backed. Will respin a v7 + cc you on that, if you could be so kind as to test that? > -- > Thanks, > > David / dhildenb >