Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp45827ybg; Mon, 27 Jul 2020 22:59:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzPK2EA47ga9p48LJR186O1hW4onaYwvoo3kO7AkpHHsP0E9lJiGFa8GLZfTSt5eND1kxIU X-Received: by 2002:a17:906:a4b:: with SMTP id x11mr6464405ejf.83.1595915978280; Mon, 27 Jul 2020 22:59:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595915978; cv=none; d=google.com; s=arc-20160816; b=k597CBE9H1lhT+ZqEwhpTMqdWPLxrzqhAYmA8iqfCRHv275OrnJX4PToKDXc2A/HuH iLqE/64ySzDcA5OI8Uo8wU+F2fc/h2qqGcJNBGnkEbWvZFQvS83t2a7R93HgcJ5p7sop RBdOtpgRdOVtL4ZCg+5/CSCHrEWP3y7DbsSYa6Afkf/sqk/CdAm8pfknIGyiNVmLNwe8 QYZIUTt1+l3npJdmz9qWUI5/mFbaGvnXeP7hmyFBhCbfYJCocYs7tFy6vcNZi11Zx7ir dnHYGrxkIxemkIlEdyzclr2x3iD3XOSSfY+K2itM/Q7HFpe0lQsqMeIzh8VqxRXW0HUE rO2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=ssMryeMJVP9T50kWPf+kILZA0B0gaRxnc+V0vfhJqmE=; b=xwJv9div0ze81DsKJvIUHUE+HNTa0l83OMSRcQxeD4bo5+LC3U4fbyCMvp2zH51IGi wGMk140lqMVguiNANZqamVsCN+XqlZTWFn08z0GsGKrNFB0Fqwc54iqKs1Ae0bqJBRY6 PbyWvnxB+8kBglDmokATYrAKiCtTWE2VMbfa+RropTuYza/P4VVU3R9IK8gEsuHADCf9 aA4kHJRJ7n1nS/S1KqHSLXkAOl7IeVscY0vhSwY7XAW3jopeB1+ZBiWkYdjA4pgG7d2V v1Gv1BZKxRVvo9sJyuSB2DAkVpNPwqUJ0lDR6G1tFfdvexSnchKU0HHY4JXim5rYy7XQ z74w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=WPu4exfP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r22si6766347edq.411.2020.07.27.22.59.14; Mon, 27 Jul 2020 22:59:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=WPu4exfP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726847AbgG1F6v (ORCPT + 99 others); Tue, 28 Jul 2020 01:58:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41212 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726299AbgG1F6v (ORCPT ); Tue, 28 Jul 2020 01:58:51 -0400 Received: from mail-qv1-xf44.google.com (mail-qv1-xf44.google.com [IPv6:2607:f8b0:4864:20::f44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E7573C061794; Mon, 27 Jul 2020 22:58:50 -0700 (PDT) Received: by mail-qv1-xf44.google.com with SMTP id m9so8637646qvx.5; Mon, 27 Jul 2020 22:58:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ssMryeMJVP9T50kWPf+kILZA0B0gaRxnc+V0vfhJqmE=; b=WPu4exfP0hJwJ01RuaoTISqQHtYweUT1uR7yRPh4C0Nvh5Vkb0dumm3C6rWycOzyvq B9zfKILgBZQZSnAGvdOmB4tB73zYayjmJbfDixD0aUySMwetn+lDgJl/ANEVo7HrrTF3 kRoQUSgzkoGgSPn2AKdLz+wUktDQ1Cs0tJrIiWX2baT9J5hfsX7Z3+ECCFdBeC1WvAHV X/iqw6Nyje4gHJQzqWsDadOOu6DYRa37WoLPTMHkfSUuUFLDnhlZHgXs9JDWwa3Yptwl qXRCcka+zoLyhkwp1Tbos39gjf7XmiWgbQFzWCalZ5HkIA5TK/eL5Mfy44On2Ys+sc8R aVeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ssMryeMJVP9T50kWPf+kILZA0B0gaRxnc+V0vfhJqmE=; b=LiJiNZaGC/vP+YEx5jW07Omjtd7gsuB75fzI3L23Y2mAy1lsz9jDrR5O/MIn0nTAG5 UrhLFyVv3xuB2DBS+OMMGU7VfC3d4A3YXfC2zAXg16GY/lWL2vSVwmJVIHskny0Uc4dR BYWLryo2jMoWKS4hK7KvlcB1llN/VhY4rM3Mk2+fXKNV/z6Lgyk0H37K0C7V0njElRI8 UwM7KiIAgwSEnll8tBSVaLbYi38CiYgM0PsqpuFwHfLZHVlb7BNhFT33qrPhdpaAQmhr VkNmv5YuxplwqE688Gl5r8hhvGuRfYawg8CHH6t/2FJOUWFMno414e0WS7CpvraHWJVI K8/g== X-Gm-Message-State: AOAM5327icRL8qcURc8xz/tkTByUKEj+/Yu4/MvP9+A4kbwuKIMH1d5p Xd9L2Scj2twgIsa/hEWRxSA5bYEXTE2Gn1ZRJKw= X-Received: by 2002:a0c:9ae2:: with SMTP id k34mr25134238qvf.247.1595915930082; Mon, 27 Jul 2020 22:58:50 -0700 (PDT) MIME-Version: 1.0 References: <20200727184506.2279656-1-guro@fb.com> <20200727184506.2279656-28-guro@fb.com> In-Reply-To: From: Andrii Nakryiko Date: Mon, 27 Jul 2020 22:58:39 -0700 Message-ID: Subject: Re: [PATCH bpf-next v2 27/35] bpf: eliminate rlimit-based memory accounting infra for bpf maps To: Song Liu Cc: Roman Gushchin , bpf , Networking , Alexei Starovoitov , Daniel Borkmann , Kernel Team , open list Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 27, 2020 at 10:47 PM Song Liu wrote: > > On Mon, Jul 27, 2020 at 12:26 PM Roman Gushchin wrote: > > > > Remove rlimit-based accounting infrastructure code, which is not used > > anymore. > > > > Signed-off-by: Roman Gushchin > [...] > > > > static void bpf_map_put_uref(struct bpf_map *map) > > @@ -541,7 +484,7 @@ static void bpf_map_show_fdinfo(struct seq_file *m, struct file *filp) > > "value_size:\t%u\n" > > "max_entries:\t%u\n" > > "map_flags:\t%#x\n" > > - "memlock:\t%llu\n" > > + "memlock:\t%llu\n" /* deprecated */ > > I am not sure whether we can deprecate this one.. How difficult is it > to keep this statistics? > It's factually correct now, that BPF map doesn't use any memlock memory, no? This is actually one way to detect whether RLIMIT_MEMLOCK is necessary or not: create a small map, check if it's fdinfo has memlock: 0 or not :) > Thanks, > Song