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 A6F1EC433EF for ; Tue, 23 Nov 2021 17:01:28 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D7D7C6B0072; Tue, 23 Nov 2021 12:01:12 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id D2DD46B0074; Tue, 23 Nov 2021 12:01:12 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BF5A66B0075; Tue, 23 Nov 2021 12:01:12 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0163.hostedemail.com [216.40.44.163]) by kanga.kvack.org (Postfix) with ESMTP id ACB426B0072 for ; Tue, 23 Nov 2021 12:01:12 -0500 (EST) Received: from smtpin20.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 7113E1828C62E for ; Tue, 23 Nov 2021 17:01:02 +0000 (UTC) X-FDA: 78840809964.20.7436B1A Received: from mail-qk1-f179.google.com (mail-qk1-f179.google.com [209.85.222.179]) by imf15.hostedemail.com (Postfix) with ESMTP id 674E9D0004A3 for ; Tue, 23 Nov 2021 17:00:57 +0000 (UTC) Received: by mail-qk1-f179.google.com with SMTP id de30so22582638qkb.0 for ; Tue, 23 Nov 2021 09:01:01 -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=CFoLHMr/Z5LPCRYETT9tnpkqBCibUyTd4qK2BHV8DYk=; b=nsTjfm6OvGB4aoB+P4zzFpoqRZc3fzSiLrwe7bKf9EdkEG0SLPsMrmMS6ZjUURyCs3 RxG6LDALb0mczy36TEMfAQizjbQjSmNM8TDLDrr2PHheidsM/LJ7jreKQ7FPQrSkIwd9 bQkQhZ8K8s4FOG9Wysbdf6aDQOohs78VY/ASSL/i5NoBuVVK4I5NGTSV/ap+e1DfZ++x 2zligQ2hDJMjp8KKaESDPSxfJqaM2DAj9xa0dXU4Ms59fPVMQhLcgT26gsWkwWKQk9Ve xuU0hiF5d/iAnyCa6OrGGGGehHz9gSJLW1GdYm3YqlYvOEHwNIez3YoMJpI24eW2JjLG w6tw== 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=CFoLHMr/Z5LPCRYETT9tnpkqBCibUyTd4qK2BHV8DYk=; b=mPMcB0Ng4xIAYFrstO1j5b1noucqFxd3GfYFfDd9Ptet0jNgtHdisksYua21RqrtXE RVKl85SjzyTelYsekDn5N9h+qWed3t2+IRwjQzyCwnHfBtljlrG5LX7R7Pem7iNASB6y JFe6ySp+J8PMKUv/2wD6I+2H7a6iHeCGUGX5UWq9MGsVDtZ/aks7blqfdEzVnTTF8dNo w8NCbgmSa7CK/xeqPlC3za4hDYt4lqARXPMDnRn1/30ik79EC1oH3GIbuZxDwVt5oUGU I8JLdbcsLF5YH6Yo1Gl3hc1l/cbRYBYj5dLRpTy6OnS21ChQGX5KFZbDPNM3HxTz9kQe kgSA== X-Gm-Message-State: AOAM531CZQG4vqVm4SxEXnSqfUGnx/H1dlpjPCXFqhRELG+k5rH88TMq G7FqrOlTtwh1r7oRQhHJib7SNg== X-Google-Smtp-Source: ABdhPJyCfsuzW9aNgeEoX01aT+J8AVygOW5MKRGQDmf+YbVxdYXAAzkQAco6yirK4ymbFWhPkmfgWg== X-Received: by 2002:a05:620a:288c:: with SMTP id j12mr6002351qkp.103.1637686858082; Tue, 23 Nov 2021 09:00:58 -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 q20sm6629100qkl.53.2021.11.23.09.00.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Nov 2021 09:00:57 -0800 (PST) Received: from jgg by mlx with local (Exim 4.94) (envelope-from ) id 1mpZA8-000DRS-L5; Tue, 23 Nov 2021 13:00:56 -0400 Date: Tue, 23 Nov 2021 13:00:56 -0400 From: Jason Gunthorpe To: David Hildenbrand Cc: 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: <20211123170056.GC5112@ziepe.ca> References: <20211116133750.0f625f73a1e4843daf13b8f7@linux-foundation.org> <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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: 674E9D0004A3 X-Stat-Signature: u13qwqnnk5yj99f6oh4df8q4qpj8ph4n Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=ziepe.ca header.s=google header.b=nsTjfm6O; dmarc=none; spf=pass (imf15.hostedemail.com: domain of jgg@ziepe.ca designates 209.85.222.179 as permitted sender) smtp.mailfrom=jgg@ziepe.ca X-HE-Tag: 1637686857-22084 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 03:44:03PM +0100, David Hildenbrand wrote: > On 23.11.21 15:07, Jason Gunthorpe wrote: > > On Tue, Nov 23, 2021 at 02:39:19PM +0100, David Hildenbrand wrote: > >>> > >>>> 2) Could be provide a mmu variant to ordinary users that's just good > >>>> enough but maybe not as fast as what we have today? And limit > >>>> FOLL_LONGTERM to special, privileged users? > >>> > >>> rdma has never been privileged > >> > >> Feel free to correct me if I'm wrong: it requires special networking > >> hardware and the admin/kernel has to prepare the system in a way such > >> that it can be used. > > > > Not really, plug in the right PCI card and it works > > Naive me would have assumed that the right modules have to be loaded > (and not blacklisted), that there has to be an rdma service installed > and running, that the NIC has to be configured in some way, and that > there is some kind of access control which user can actually use which > NIC. Not really, we've worked hard that it works as well as any other HW device. Plug it in and it works. There is no systemd service, or special mandatory configuration, for instance. > For example, I would have assume from inside a container it usually > wouldn't just work. Nope, RDMA follows the net namespaces of its ethernet port, so it just works in containers too. > 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. Jason