LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Roman Gushchin <guro@fb.com>
To: Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>, <bpf@vger.kernel.org>
Cc: <kernel-team@fb.com>, <linux-kernel@vger.kernel.org>,
Roman Gushchin <guro@fb.com>
Subject: [PATCH bpf-next 0/5] bpf: bpf maps memory accounting cleanup
Date: Wed, 29 May 2019 18:03:54 -0700 [thread overview]
Message-ID: <20190530010359.2499670-1-guro@fb.com> (raw)
During my work on memcg-based memory accounting for bpf maps
I've done some cleanups and refactorings of the existing
memlock rlimit-based code. It makes it more robust, unifies
size to pages conversion, size checks and corresponding error
codes. Also it adds coverage for cgroup local storage and
socket local storage maps.
It looks like some preliminary work on the mm side might be
required to start working on the memcg-based accounting,
so I'm sending these patches as a separate patchset.
Roman Gushchin (5):
bpf: add memlock precharge check for cgroup_local_storage
bpf: add memlock precharge for socket local storage
bpf: group memory related fields in struct bpf_map_memory
bpf: rework memlock-based memory accounting for maps
bpf: move memory size checks to bpf_map_charge_init()
include/linux/bpf.h | 15 ++++--
kernel/bpf/arraymap.c | 18 ++++----
kernel/bpf/cpumap.c | 9 ++--
kernel/bpf/devmap.c | 14 +++---
kernel/bpf/hashtab.c | 14 ++----
kernel/bpf/local_storage.c | 13 ++++--
kernel/bpf/lpm_trie.c | 8 +---
kernel/bpf/queue_stack_maps.c | 13 +++---
kernel/bpf/reuseport_array.c | 17 +++----
kernel/bpf/stackmap.c | 28 ++++++-----
kernel/bpf/syscall.c | 87 ++++++++++++++++++-----------------
kernel/bpf/xskmap.c | 10 ++--
net/core/bpf_sk_storage.c | 12 ++++-
net/core/sock_map.c | 9 +---
14 files changed, 132 insertions(+), 135 deletions(-)
--
2.20.1
next reply other threads:[~2019-05-30 1:04 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-30 1:03 Roman Gushchin [this message]
2019-05-30 1:03 ` [PATCH bpf-next 1/5] bpf: add memlock precharge check for cgroup_local_storage Roman Gushchin
2019-05-30 18:26 ` Song Liu
2019-05-30 1:03 ` [PATCH bpf-next 2/5] bpf: add memlock precharge for socket local storage Roman Gushchin
2019-05-30 18:26 ` Song Liu
2019-05-30 1:03 ` [PATCH bpf-next 3/5] bpf: group memory related fields in struct bpf_map_memory Roman Gushchin
2019-05-30 18:53 ` Song Liu
2019-05-30 1:03 ` [PATCH bpf-next 4/5] bpf: rework memlock-based memory accounting for maps Roman Gushchin
2019-05-30 18:52 ` Song Liu
2019-05-30 1:03 ` [PATCH bpf-next 5/5] bpf: move memory size checks to bpf_map_charge_init() Roman Gushchin
2019-05-30 18:56 ` Song Liu
2019-05-30 19:09 ` Roman Gushchin
2019-06-01 0:00 ` [PATCH bpf-next 0/5] bpf: bpf maps memory accounting cleanup Alexei Starovoitov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190530010359.2499670-1-guro@fb.com \
--to=guro@fb.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=kernel-team@fb.com \
--cc=linux-kernel@vger.kernel.org \
--subject='Re: [PATCH bpf-next 0/5] bpf: bpf maps memory accounting cleanup' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).