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 43203C433F5 for ; Tue, 23 Nov 2021 17:01:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238799AbhKWREI (ORCPT ); Tue, 23 Nov 2021 12:04:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42484 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236804AbhKWREH (ORCPT ); Tue, 23 Nov 2021 12:04:07 -0500 Received: from mail-qk1-x729.google.com (mail-qk1-x729.google.com [IPv6:2607:f8b0:4864:20::729]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D4B5CC06173E for ; Tue, 23 Nov 2021 09:00:58 -0800 (PST) Received: by mail-qk1-x729.google.com with SMTP id p4so22557322qkm.7 for ; Tue, 23 Nov 2021 09:00:58 -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=Lb8/0zR76+cjF5inFHB6bFV/QO8Ei/XhMfH8H/h/NmMRu1GK2jYlUK4MOm+i1uKoqt /L+iU+rC94MLdHHSwpSJNxgAM5vAD8lhj75w9JYhWi8n5PvD2F1ee1O96faA790g2Fgs w2bnlXM1TGojhVq/E2q2BJCNa0f4+4QJeNHSpaOLD23jCjMXACQ6ABnVvgqKpKSXNkGl 4wh3Kq9bGxCvKUarrTlhy3lJ2tKjrDm87uc+s7M7suSjyoctZPhSV33Deu/yXetm/vo9 LR5fthh781TXZz4ylAHdMhM34LbAQmWjxTs8Zuio7svvGo4ROtZQ4VydiUwDAlRfm8p4 TImw== X-Gm-Message-State: AOAM5313/goGLlXhgFgiQ0SBer/kKoXCmua4pOI6f0rhodSatcWPjjRZ l95jCT4nFb0pU96ejxMKr7rLZQ== 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: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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