Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp7013031rwr; Tue, 2 May 2023 08:21:20 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7hi5V2yO7pd9UTBqDC1pCAqn+BkXFna/H6DAgxLR58sIeNZSbPp2W29bedK6QF5d5wYhaf X-Received: by 2002:a17:903:2804:b0:1aa:fe40:6f96 with SMTP id kp4-20020a170903280400b001aafe406f96mr5546384plb.23.1683040880670; Tue, 02 May 2023 08:21:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683040880; cv=none; d=google.com; s=arc-20160816; b=g90ULrTAqHE9S6+HIWIqGHhCYPTuLJKSZnnrWtuquM3dLha2u0z2KAOrnpdyeAaq7e X/glSX65Dx+Yr7usVLCTwwl2tUXPQFahLXGBKMqWU7yRYWPJmzTklHmnHtR5BpV1M8SI apEtKBqg1/NkYtYPSEzsKHa2yoX/dzOaHjFdwKhJS5hmNVF9FuzhFoOjbG5KbaO3NpOe 2KwHdFisjNcbB5hfTj269hTKM64KafDQ/wiDFMGMBpj3We18KERJxcu14JdY1tlHRCQo khiNiqNfDCh6dMq/Wto/bEcqcIE6zNW5s81vcxJO2IjsJ1Ngqc/kc4ZOCiyWDMd6GUQb uh8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=EMDcO9JRQp+eGZiLNGZuH9Z/nD7SGrXL+vGe1dHac2k=; b=o5vRCUYcgGQqTBgK4BWW9ahnfjgs0MnNT6AU0AOCz9WpYvsaxS2L6toRKZlmo8YKI9 LhUn3dua09oGkiY+LZ9nAYZU1qg/XHv3DV4X306Dq3KIncwPDMC2i4NKh/n/pX4U9rFD EAQEBSua0GvpJ4bGXJMS9tcBjmtnwemUw6WGQ5eRZshF27X0r616JP5g8gfahUaBcEmS cumsIjZ+pCSObTZaj1m7bALs+tnQL0HaeQpTTQhZRzM5m+0zIshv47NOfRJSDo2qSuWk +201Wi2q9vvZY4SPQeLDnX0f909NnZMdeCqsS0SPTxhgWw5nRlHpXiCZFK6w5KP29g9f K+PA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b="TVnRsHX/"; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bi7-20020a170902bf0700b0019c3ce49a13si30771338plb.372.2023.05.02.08.21.06; Tue, 02 May 2023 08:21:20 -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=@gmail.com header.s=20221208 header.b="TVnRsHX/"; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234324AbjEBPTS (ORCPT + 99 others); Tue, 2 May 2023 11:19:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36890 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233434AbjEBPTO (ORCPT ); Tue, 2 May 2023 11:19:14 -0400 Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4EFF11704; Tue, 2 May 2023 08:19:13 -0700 (PDT) Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-3f09b4a1527so41041885e9.0; Tue, 02 May 2023 08:19:13 -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=NtgVHL2qa3evtjR/ZczCQ8MFBUiHgyEglhFAYE+mgIpQqtqQ/jZocsqzvfnxInMM+6 LFwpWay9SFnj0h898aa12Q5yx3qSVSavl3iHB33NRQGx/1FC5w2nWZ0uyAfXtKaNmJCZ rjX45BWOZC3JYioGiwan8wQKGtUQaF9B7uLtaojXkd0UVeV4+ReqZDrEgbR+Xhd3MNU0 pjV+eqJcdcIw2zjFJoN/dsUVRqmuXbV8vkidotQ2EZiW8uEnPQe9RBWTV9tbDDh+jFcC jxuvU/ma/D0HTEqvtICmGE8HNIvf1HtPVUbwT5EtNM8J1YM+OnLiUeP0tgSu+OOiM8V/ 4LlQ== X-Gm-Message-State: AC+VfDzGt1d/+3Neq/aQqWrtIISCUultHemIrc7GShRtDBpduxkEazUm +mvWtOyuICAuen9WAY/+xXs= 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-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,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 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 >