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 7DC2FC433EF for ; Wed, 24 Nov 2021 00:02:46 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E3D066B0075; Tue, 23 Nov 2021 19:02:30 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id DECB56B0078; Tue, 23 Nov 2021 19:02:30 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C8D2F6B007B; Tue, 23 Nov 2021 19:02:30 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0152.hostedemail.com [216.40.44.152]) by kanga.kvack.org (Postfix) with ESMTP id BBE2A6B0075 for ; Tue, 23 Nov 2021 19:02:30 -0500 (EST) Received: from smtpin21.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 886881802ACBD for ; Wed, 24 Nov 2021 00:02:20 +0000 (UTC) X-FDA: 78841871682.21.8E3B857 Received: from mail-qt1-f180.google.com (mail-qt1-f180.google.com [209.85.160.180]) by imf22.hostedemail.com (Postfix) with ESMTP id DBD4F3839 for ; Wed, 24 Nov 2021 00:01:14 +0000 (UTC) Received: by mail-qt1-f180.google.com with SMTP id j17so968779qtx.2 for ; Tue, 23 Nov 2021 16:01:14 -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=M4LWcNnjkUFcmV2WdRek73cG4wbja5KfujJwWHuZsWEfOU4spj86lhFAWPrx2g1OHL +nCE3Ijf0E/Kuknpgb77qTzxyAowJAZWx8dsW4F16odJj9Zmuu7THc0R0egihvm6ZYbp DItjZf1CfB+aibUz1E/pvjz4bkI8GhcOdW2Sn27uhLwgCEQFAxHV2zqwV6AkreXCC4yb DOeOIESmX/FKTQrlohrx50S6lfN5dAa3FNHXs4fLDiAdBNILD4ypn2NxohuwWs4GJ6Jg vM1KvJ7DrzHpnfG/QpsFYO9x3QW4IxYBJwxq1D6dsradKo2fsvNkZ1iuiSXSAQ9VEFo8 QlRw== X-Gm-Message-State: AOAM530q8Wr3vW6ub4b7/Ir7vq3haKuDPkVC+bCd2tyCp50wJjYcbFHj TC+CwWMWGUmWL2eJnIvWaqbjOw== 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: X-Stat-Signature: 1qnxfiuhesknrttxnc95qinu7yzwifpm Authentication-Results: imf22.hostedemail.com; dkim=pass header.d=ziepe.ca header.s=google header.b=SM7g2CC2; dmarc=none; spf=pass (imf22.hostedemail.com: domain of jgg@ziepe.ca designates 209.85.160.180 as permitted sender) smtp.mailfrom=jgg@ziepe.ca X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: DBD4F3839 X-HE-Tag: 1637712074-19622 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, 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