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 4C949C433EF for ; Tue, 23 Nov 2021 17:05:55 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id BCA9C6B006C; Tue, 23 Nov 2021 12:05:39 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id B54AC6B0071; Tue, 23 Nov 2021 12:05:39 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9A7226B0072; Tue, 23 Nov 2021 12:05:39 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0086.hostedemail.com [216.40.44.86]) by kanga.kvack.org (Postfix) with ESMTP id 8383B6B006C for ; Tue, 23 Nov 2021 12:05:39 -0500 (EST) Received: from smtpin22.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 4291F181C98F6 for ; Tue, 23 Nov 2021 17:05:29 +0000 (UTC) X-FDA: 78840821178.22.640E548 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf04.hostedemail.com (Postfix) with ESMTP id 53B78500478A for ; Tue, 23 Nov 2021 17:04:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1637687061; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=7kByPH5nF0InwM69v4kGnfWv6NJm9wrS3dWWDwL74Lw=; b=ZYSS2FgD8AR3k803S9/nmpdN8bAbcrApxvY+fZPev90nUTs/iwt1gqoBCQk6jo2fUhw81y hjfvkY24xBUUcrnY303WQcOh64rEkeT3BZnGlgiNyLgXEQRnCvT4juSnLJ802oUaB/ckU7 w1wlUTNw5nB2x2o+8SgzizrdkGfo2DA= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-26-RLLsw9p6Oi--Is7qK2MOVw-1; Tue, 23 Nov 2021 12:04:20 -0500 X-MC-Unique: RLLsw9p6Oi--Is7qK2MOVw-1 Received: by mail-wm1-f70.google.com with SMTP id j193-20020a1c23ca000000b003306ae8bfb7so8738305wmj.7 for ; Tue, 23 Nov 2021 09:04:19 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:organization:in-reply-to :content-transfer-encoding; bh=7kByPH5nF0InwM69v4kGnfWv6NJm9wrS3dWWDwL74Lw=; b=ro39gxplPav+BF/Gz+Dk0CakFk/kKE5YVWd/iyceB8Svk7AluTBn8tO0E/br6jS6Bs EZ5kumqISoQyyGo7CDFI/kNDgTkD02wZcJjehgsb//+s16WL9bexl580s2oWDkHTrQIg wHBawcqZYqPhGih6cEYVPQ5c2SQOiY07HSMy2rcA25tGLXreDWk7Mm+WtVDXwR8UykQH JQsRruB2n31hzegCQcpPt38IaTjTa0QXiR+oa/mfPzoWgC2P2gSMlBk7J5Oo7+W+ZgQB 2dbYcJmwm5Ve/wR7KjfcuuJE9Pe5Uz1XVrne/vHhczT5FsiBVVdFEihB7g1tp/ajyGW2 dfsA== X-Gm-Message-State: AOAM533rd0ra1JVIeLxXs917div4yfLnc8WyufxfXwwyVw6kTUdR/eTH UHosXhNghGCoKYjXdvJvk/fh7Ig2iimCjHweeaHNf0vIOuufksp7Eb663+BZACtoRmFkFMkUuTY YiN/V9o+4dYo= X-Received: by 2002:adf:ec45:: with SMTP id w5mr8994356wrn.183.1637687059002; Tue, 23 Nov 2021 09:04:19 -0800 (PST) X-Google-Smtp-Source: ABdhPJykyScG+fmWu1ZxlpPcTdQ5mn0yh6fhIHez7GTidDv3h8Ip176ypu5cz+undY5/dGCL1kztVw== X-Received: by 2002:adf:ec45:: with SMTP id w5mr8994305wrn.183.1637687058753; Tue, 23 Nov 2021 09:04:18 -0800 (PST) Received: from [192.168.3.132] (p5b0c6765.dip0.t-ipconnect.de. [91.12.103.101]) by smtp.gmail.com with ESMTPSA id 38sm13027369wrc.1.2021.11.23.09.04.17 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 23 Nov 2021 09:04:18 -0800 (PST) Message-ID: <98470479-7ba9-9f05-e597-e5afeb3464a3@redhat.com> Date: Tue, 23 Nov 2021 18:04:16 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0 Subject: Re: [PATCH] Increase default MLOCK_LIMIT to 8 MiB To: Jason Gunthorpe 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 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> <20211123170056.GC5112@ziepe.ca> From: David Hildenbrand Organization: Red Hat In-Reply-To: <20211123170056.GC5112@ziepe.ca> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Rspamd-Server: rspam11 X-Rspamd-Queue-Id: 53B78500478A X-Stat-Signature: krs3mbhcwd3bjc14royb3xbdtaucwyz9 Authentication-Results: imf04.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=ZYSS2FgD; spf=none (imf04.hostedemail.com: domain of david@redhat.com has no SPF policy when checking 170.10.133.124) smtp.mailfrom=david@redhat.com; dmarc=pass (policy=none) header.from=redhat.com X-HE-Tag: 1637687059-396169 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 23.11.21 18:00, Jason Gunthorpe wrote: > 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. Sounds like fun. At least we documented it already ;) https://www.kernel.org/doc/html/latest/admin-guide/mm/memory-hotplug.html#zone-movable-sizing-considerations -- Thanks, David / dhildenb