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 B0648C4332F for ; Wed, 24 Nov 2021 00:00:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240384AbhKXADL (ORCPT ); Tue, 23 Nov 2021 19:03:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53788 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238787AbhKXADE (ORCPT ); Tue, 23 Nov 2021 19:03:04 -0500 Received: from mail-qt1-x833.google.com (mail-qt1-x833.google.com [IPv6:2607:f8b0:4864:20::833]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 25229C06173E for ; Tue, 23 Nov 2021 15:59:56 -0800 (PST) Received: by mail-qt1-x833.google.com with SMTP id m25so911216qtq.13 for ; Tue, 23 Nov 2021 15:59:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=JWwXPG24ltmWOflqT79hbe7WHAGSXzFDRpPzyqTCphM=; b=SM7g2CC2T7HtEJAOomAVVeoee9cBvpCmPhxJgr3oGO8VH5HDRMkKwuNnBdd/tdtLra ix57VCmhP/D7B7OeCzH8s3rrnpADi75OMdOMFwELa15V0MBJDAvel4bfDue625PHX6OG hS6h6+fJuNRKIYJkla2s/iTwTYPHWRYYa0/1VdGXSQPkR5SOAWvSE54rNRYV4UTL/pyB YKJ7Wzj0llu879N5OsWvxcLn+Em+r+KowY4iabzniDrrl1UmaTxLZD4jvwTpO97ItqwK HI8tPMYfGiMInv0fc7x84iaO3eiMci7X4scAZRwoS8d5ff2O7cTzDrXSvh/sNXeg6f9H 8O4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=JWwXPG24ltmWOflqT79hbe7WHAGSXzFDRpPzyqTCphM=; b=JoSKeO2EKE6D5kS09jG09eUIJXoP7rcGVzAXsGQJuFatUQtSDYOv4ao2R3XKJsQVtV /0R8JUhN045oPVOZBJtTDHvFgXBsIl9cOXyDVkCOUbCSbkBbSETDJMtkFbzf1f35rZmH kl9X98rWBEX5bMBWfnkWhRhs9JuA+d/ZvkT/14pFOYBq2nWooSJieCJhlGkff60cZ/V3 LSfGrCCy8gJf2NC6EGScb4lZaKqrpH3Bl4Zzq3Z6Re4940KGd/9Am2VduaR5CwlraZxv cjyc1kQWHWVGnEPZjIAtNbAYsJyW4OyzBcHYt/vwSHM3OVRtuP7cLoto+KDhHcorJsiB m9Dg== X-Gm-Message-State: AOAM530QD7sCNfIeKfkBf+JndWgxkBiJhGwGiI41W6YGcPqSK2X3CsPA 70dqvOdI5UcNl7JhyuPwbJGrSg== X-Google-Smtp-Source: ABdhPJxUUgxbyWZyuW6Sl74vLoLYpS/heqCJSK/6Ktu0i9Jt6ejBXXhBIGBoXvKcqrkbxigSQu4NJg== X-Received: by 2002:a05:622a:1901:: with SMTP id w1mr1756372qtc.134.1637711995285; Tue, 23 Nov 2021 15:59:55 -0800 (PST) Received: from ziepe.ca (hlfxns017vw-142-162-113-129.dhcp-dynamic.fibreop.ns.bellaliant.net. [142.162.113.129]) by smtp.gmail.com with ESMTPSA id f16sm6699243qkk.16.2021.11.23.15.59.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Nov 2021 15:59:54 -0800 (PST) Received: from jgg by mlx with local (Exim 4.94) (envelope-from ) id 1mpfhZ-000naV-I3; Tue, 23 Nov 2021 19:59:53 -0400 Date: Tue, 23 Nov 2021 19:59:53 -0400 From: Jason Gunthorpe To: Vlastimil Babka Cc: David Hildenbrand , Jens Axboe , Andrew Dona-Couch , Andrew Morton , Drew DeVault , Ammar Faizi , linux-kernel@vger.kernel.org, linux-api@vger.kernel.org, io_uring Mailing List , Pavel Begunkov , linux-mm@kvack.org Subject: Re: [PATCH] Increase default MLOCK_LIMIT to 8 MiB Message-ID: <20211123235953.GF5112@ziepe.ca> References: <8f219a64-a39f-45f0-a7ad-708a33888a3b@www.fastmail.com> <333cb52b-5b02-648e-af7a-090e23261801@redhat.com> <5f998bb7-7b5d-9253-2337-b1d9ea59c796@redhat.com> <20211123132523.GA5112@ziepe.ca> <10ccf01b-f13a-d626-beba-cbee70770cf1@redhat.com> <20211123140709.GB5112@ziepe.ca> <20211123170056.GC5112@ziepe.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 23, 2021 at 11:04:04PM +0100, Vlastimil Babka wrote: > On 11/23/21 18:00, Jason Gunthorpe wrote: > > > >> believe what you say and I trust your experience :) So could as well be > >> that on such a "special" (or not so special) systems there should be a > >> way to restrict it to privileged users only. > > > > At this point RDMA is about as "special" as people running large > > ZONE_MOVABLE systems, and the two are going to start colliding > > heavily. The RDMA VFIO migration driver should be merged soon which > > makes VMs using this stuff finally practical. > > How does that work, I see the word migration, so does it cause pages to Sorry I mean what is often called "VM live migration". Typically that cannot be done if a PCI device is assigned to the VM as suspending and the migrating a PCI device to another server is complicated. With forthcoming hardware mlx5 can do this and thus the entire RDMA stack becomes practically usable and performant within a VM. > be migrated out of ZONE_MOVABLE before they are pinned? GUP already does this automatically for FOLL_LONGTERM. > Similarly for io-uring we could be migrating pages to be pinned so that > the end up consolidated close together, and prevent pathologic > situations like in David's reproducer. It is an interesting idea to have GUP do some kind of THP preserving migration. Jason