On Mon, Jul 27, 2020 at 10:47 PM Song Liu <s...@kernel.org> wrote:
>
> On Mon, Jul 27, 2020 at 12:26 PM Roman Gushchin <g...@fb.com> wrote:
> >
> > Remove rlimit-based accounting infrastructure code, which is not used
> > anymore.
> >
> > Signed-off-by: Roman Gushchin <g...@fb.com>
> [...]
> >
> >  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

Reply via email to