Since bpf is not using memlock rlimit for memory accounting,
there are no more reasons to bump the limit.
Signed-off-by: Roman Gushchin
---
tools/bpf/runqslower/runqslower.c | 16
1 file changed, 16 deletions(-)
diff --git a/tools/bpf/runqslower/runqslower.c
b/tools/bpf
Do not use rlimit-based memory accounting for lpm_trie maps.
It has been replaced with the memcg-based memory accounting.
Signed-off-by: Roman Gushchin
---
kernel/bpf/lpm_trie.c | 13 -
1 file changed, 13 deletions(-)
diff --git a/kernel/bpf/lpm_trie.c b/kernel/bpf/lpm_trie.c
index
remaining rlimit-based accounting
for sockhash maps
Roman Gushchin (35):
bpf: memcg-based memory accounting for bpf progs
bpf: memcg-based memory accounting for bpf maps
bpf: refine memcg-based memory accounting for arraymap maps
bpf: refine memcg-based memory accounting for cpumap
Since bpf stopped using memlock rlimit to limit the memory usage,
there is no more reason for perf to alter its own limit.
Signed-off-by: Roman Gushchin
---
tools/perf/builtin-trace.c | 10 --
tools/perf/tests/builtin-test.c | 6 --
tools/perf/util/Build | 1
Since bpf stopped using memlock rlimit to limit the memory usage,
there is no more reason for bpftool to alter its own limits.
Signed-off-by: Roman Gushchin
---
tools/bpf/bpftool/common.c | 7 ---
tools/bpf/bpftool/feature.c| 2 --
tools/bpf/bpftool/main.h | 2 --
tools/bpf
Remove rlimit-based accounting infrastructure code, which is not used
anymore.
Signed-off-by: Roman Gushchin
---
include/linux/bpf.h | 12
kernel/bpf/syscall.c | 64 +--
.../selftests/bpf/progs/map_ptr_kern.c| 5
Do not use rlimit-based memory accounting for cgroup storage maps.
It has been replaced with the memcg-based memory accounting.
Signed-off-by: Roman Gushchin
---
kernel/bpf/local_storage.c | 21 +
1 file changed, 1 insertion(+), 20 deletions(-)
diff --git a/kernel/bpf
As rlimit-based memory accounting is not used by bpf anymore,
there are no more reasons to play with memlock rlimit.
Delete bpf_rlimit.h which contained a code to bump the limit.
Signed-off-by: Roman Gushchin
---
samples/bpf/hbm.c | 1 -
tools/testing/selftests/bpf
Do not use rlimit-based memory accounting for xskmap maps.
It has been replaced with the memcg-based memory accounting.
Signed-off-by: Roman Gushchin
---
net/xdp/xskmap.c | 10 +-
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/net/xdp/xskmap.c b/net/xdp/xskmap.c
index
Do not use rlimit-based memory accounting for queue_stack maps.
It has been replaced with the memcg-based memory accounting.
Signed-off-by: Roman Gushchin
---
kernel/bpf/queue_stack_maps.c | 16
1 file changed, 4 insertions(+), 12 deletions(-)
diff --git a/kernel/bpf
Account memory used by cgroup storage maps including the percpu memory
for the percpu flavor of cgroup storage and map metadata.
Signed-off-by: Roman Gushchin
---
kernel/bpf/local_storage.c | 17 -
1 file changed, 8 insertions(+), 9 deletions(-)
diff --git a/kernel/bpf
Include lpm trie and lpm trie node objects into the memcg-based memory
accounting.
Signed-off-by: Roman Gushchin
---
kernel/bpf/lpm_trie.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/bpf/lpm_trie.c b/kernel/bpf/lpm_trie.c
index 44474bf3ab7a..d85e0fc2cafc
As bpf is not using memlock rlimit for memory accounting anymore,
let's remove the related code from libbpf.
Bpf operations can't fail because of exceeding the limit anymore.
Signed-off-by: Roman Gushchin
---
tools/lib/bpf/libbpf.c | 31 +--
tools/lib/bpf/libbpf.h
Do not use rlimit-based memory accounting for socket storage maps.
It has been replaced with the memcg-based memory accounting.
Signed-off-by: Roman Gushchin
---
net/core/bpf_sk_storage.c | 11 ---
1 file changed, 11 deletions(-)
diff --git a/net/core/bpf_sk_storage.c b/net/core
This patch enables memcg-based memory accounting for memory allocated
by __bpf_map_area_alloc(), which is used by most map types for
large allocations.
Following patches in the series will refine the accounting for
some map types.
Signed-off-by: Roman Gushchin
---
kernel/bpf/syscall.c | 2
Do not use rlimit-based memory accounting for reuseport_array maps.
It has been replaced with the memcg-based memory accounting.
Signed-off-by: Roman Gushchin
---
kernel/bpf/reuseport_array.c | 12 ++--
1 file changed, 2 insertions(+), 10 deletions(-)
diff --git a/kernel/bpf
Do not use rlimit-based memory accounting for stackmap maps.
It has been replaced with the memcg-based memory accounting.
Signed-off-by: Roman Gushchin
---
kernel/bpf/stackmap.c | 16 +++-
1 file changed, 3 insertions(+), 13 deletions(-)
diff --git a/kernel/bpf/stackmap.c b/kernel
Since bpf is not using memlock rlimit for memory accounting,
there are no more reasons to bump the limit.
Signed-off-by: Roman Gushchin
---
tools/testing/selftests/bpf/bench.c | 16 ---
.../selftests/bpf/progs/bpf_iter_bpf_map.c| 5 ++---
tools/testing/selftests/bpf
Do not use rlimit-based memory accounting for bpf progs. It has been
replaced with memcg-based memory accounting.
Signed-off-by: Roman Gushchin
---
include/linux/bpf.h | 11 --
kernel/bpf/core.c| 12 ++-
kernel/bpf/syscall.c | 86 ++--
3
Do not use rlimit-based memory accounting for bpf_struct_ops maps.
It has been replaced with the memcg-based memory accounting.
Signed-off-by: Roman Gushchin
---
kernel/bpf/bpf_struct_ops.c | 19 +++
1 file changed, 3 insertions(+), 16 deletions(-)
diff --git a/kernel/bpf
Do not use rlimit-based memory accounting for sockmap and sockhash maps.
It has been replaced with the memcg-based memory accounting.
Signed-off-by: Roman Gushchin
---
net/core/sock_map.c | 33 ++---
1 file changed, 6 insertions(+), 27 deletions(-)
diff --git a/net
a couple of lines in
ringbuf_map_alloc() and also makes it look similar to other memory
allocating function like kmalloc().
Signed-off-by: Roman Gushchin
---
kernel/bpf/ringbuf.c | 24
1 file changed, 4 insertions(+), 20 deletions(-)
diff --git a/kernel/bpf/ringbuf.c b
Include percpu arrays and auxiliary data into the memcg-based memory
accounting.
Signed-off-by: Roman Gushchin
---
kernel/bpf/arraymap.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/kernel/bpf/arraymap.c b/kernel/bpf/arraymap.c
index 8ff419b632a6..9597fecff8da
Include memory used by bpf programs into the memcg-based accounting.
This includes the memory used by programs itself, auxiliary data
and statistics.
Signed-off-by: Roman Gushchin
---
kernel/bpf/core.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/kernel/bpf/core.c
Include map metadata and the node size (struct bpf_dtab_netdev) on
element update into the accounting.
Signed-off-by: Roman Gushchin
---
kernel/bpf/devmap.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/kernel/bpf/devmap.c b/kernel/bpf/devmap.c
index 10abb06065bb
Do not use rlimit-based memory accounting for hashtab maps.
It has been replaced with the memcg-based memory accounting.
Signed-off-by: Roman Gushchin
---
kernel/bpf/hashtab.c | 19 +--
1 file changed, 1 insertion(+), 18 deletions(-)
diff --git a/kernel/bpf/hashtab.c b/kernel
Do not use rlimit-based memory accounting for arraymap maps.
It has been replaced with the memcg-based memory accounting.
Signed-off-by: Roman Gushchin
---
kernel/bpf/arraymap.c | 24
1 file changed, 4 insertions(+), 20 deletions(-)
diff --git a/kernel/bpf/arraymap.c b
Enable the memcg-based memory accounting for the memory used by
the bpf ringbuffer.
Signed-off-by: Roman Gushchin
---
kernel/bpf/ringbuf.c | 9 +
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/kernel/bpf/ringbuf.c b/kernel/bpf/ringbuf.c
index 002f8a5c9e51..e8e2c39cbdc9
Include metadata and percpu data into the memcg-based memory accounting.
Signed-off-by: Roman Gushchin
---
kernel/bpf/cpumap.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/bpf/cpumap.c b/kernel/bpf/cpumap.c
index f1c46529929b..74ae9fcbe82e 100644
--- a/kernel
This patch enables memcg-based memory accounting for memory allocated
by __bpf_map_area_alloc(), which is used by most map types for
large allocations.
Following patches in the series will refine the accounting for
some map types.
Signed-off-by: Roman Gushchin
---
kernel/bpf/syscall.c | 2
Include percpu objects and the size of map metadata into the
accounting.
Signed-off-by: Roman Gushchin
---
kernel/bpf/hashtab.c | 14 +++---
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/kernel/bpf/hashtab.c b/kernel/bpf/hashtab.c
index 024276787055..9d0432170812 100644
Do not use rlimit-based memory accounting for arraymap maps.
It has been replaced with the memcg-based memory accounting.
Signed-off-by: Roman Gushchin
---
kernel/bpf/arraymap.c | 24
1 file changed, 4 insertions(+), 20 deletions(-)
diff --git a/kernel/bpf/arraymap.c b
Include sockmap internal metadata into the memcg-based memory
accounting. Also include the memory allocated on updating an element.
Signed-off-by: Roman Gushchin
---
net/core/sock_map.c | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/net/core/sock_map.c b/net/core
way to get the current value and statistics.
The patchset consists of the following parts:
1) memcg-based accounting for various bpf objects: progs and maps
2) removal of the rlimit-based accounting
3) removal of rlimit adjustments in userspace tools and tests
Roman Gushchin (35):
bpf: memcg-ba
Include lpm trie and lpm trie node objects into the memcg-based memory
accounting.
Signed-off-by: Roman Gushchin
---
kernel/bpf/lpm_trie.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/bpf/lpm_trie.c b/kernel/bpf/lpm_trie.c
index 44474bf3ab7a..d85e0fc2cafc
Do not use rlimit-based memory accounting for cgroup storage maps.
It has been replaced with the memcg-based memory accounting.
Signed-off-by: Roman Gushchin
---
kernel/bpf/local_storage.c | 21 +
1 file changed, 1 insertion(+), 20 deletions(-)
diff --git a/kernel/bpf
Do not use rlimit-based memory accounting for socket storage maps.
It has been replaced with the memcg-based memory accounting.
Signed-off-by: Roman Gushchin
---
net/core/bpf_sk_storage.c | 11 ---
1 file changed, 11 deletions(-)
diff --git a/net/core/bpf_sk_storage.c b/net/core
Do not use rlimit-based memory accounting for queue_stack maps.
It has been replaced with the memcg-based memory accounting.
Signed-off-by: Roman Gushchin
---
kernel/bpf/queue_stack_maps.c | 16
1 file changed, 4 insertions(+), 12 deletions(-)
diff --git a/kernel/bpf
Include percpu arrays and auxiliary data into the memcg-based memory
accounting.
Signed-off-by: Roman Gushchin
---
kernel/bpf/arraymap.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/kernel/bpf/arraymap.c b/kernel/bpf/arraymap.c
index 8ff419b632a6..9597fecff8da
Do not use rlimit-based memory accounting for lpm_trie maps.
It has been replaced with the memcg-based memory accounting.
Signed-off-by: Roman Gushchin
---
kernel/bpf/lpm_trie.c | 13 -
1 file changed, 13 deletions(-)
diff --git a/kernel/bpf/lpm_trie.c b/kernel/bpf/lpm_trie.c
index
Account memory used by cgroup storage maps including the percpu memory
for the percpu flavor of cgroup storage and map metadata.
Signed-off-by: Roman Gushchin
---
kernel/bpf/local_storage.c | 17 -
1 file changed, 8 insertions(+), 9 deletions(-)
diff --git a/kernel/bpf
Do not use rlimit-based memory accounting for bpf progs. It has been
replaced with memcg-based memory accounting.
Signed-off-by: Roman Gushchin
---
include/linux/bpf.h | 11 --
kernel/bpf/core.c| 12 ++-
kernel/bpf/syscall.c | 86 ++--
3
Do not use rlimit-based memory accounting for hashtab maps.
It has been replaced with the memcg-based memory accounting.
Signed-off-by: Roman Gushchin
---
kernel/bpf/hashtab.c | 19 +--
1 file changed, 1 insertion(+), 18 deletions(-)
diff --git a/kernel/bpf/hashtab.c b/kernel
Account memory used by the socket storage.
Signed-off-by: Roman Gushchin
---
net/core/bpf_sk_storage.c | 12 +++-
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/net/core/bpf_sk_storage.c b/net/core/bpf_sk_storage.c
index eafcd15e7dfd..fbcd03cd00d3 100644
--- a/net/core
Do not use rlimit-based memory accounting for xskmap maps.
It has been replaced with the memcg-based memory accounting.
Signed-off-by: Roman Gushchin
---
net/xdp/xskmap.c | 10 +-
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/net/xdp/xskmap.c b/net/xdp/xskmap.c
index
Since bpf stopped using memlock rlimit to limit the memory usage,
there is no more reason for perf to alter its own limit.
Signed-off-by: Roman Gushchin
---
tools/perf/builtin-trace.c | 10 --
tools/perf/tests/builtin-test.c | 6 --
tools/perf/util/Build | 1
Do not use rlimit-based memory accounting for stackmap maps.
It has been replaced with the memcg-based memory accounting.
Signed-off-by: Roman Gushchin
---
kernel/bpf/stackmap.c | 16 +++-
1 file changed, 3 insertions(+), 13 deletions(-)
diff --git a/kernel/bpf/stackmap.c b/kernel
Do not use rlimit-based memory accounting for sock_map maps.
It has been replaced with the memcg-based memory accounting.
Signed-off-by: Roman Gushchin
---
net/core/sock_map.c | 21 ++---
1 file changed, 6 insertions(+), 15 deletions(-)
diff --git a/net/core/sock_map.c b/net
Include map metadata and the node size (struct bpf_dtab_netdev) on
element update into the accounting.
Signed-off-by: Roman Gushchin
---
kernel/bpf/devmap.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/kernel/bpf/devmap.c b/kernel/bpf/devmap.c
index 10abb06065bb
Do not use rlimit-based memory accounting for bpf_struct_ops maps.
It has been replaced with the memcg-based memory accounting.
Signed-off-by: Roman Gushchin
---
kernel/bpf/bpf_struct_ops.c | 19 +++
1 file changed, 3 insertions(+), 16 deletions(-)
diff --git a/kernel/bpf
Remove rlimit-based accounting infrastructure code, which is not used
anymore.
Signed-off-by: Roman Gushchin
---
include/linux/bpf.h | 12
kernel/bpf/syscall.c | 64 +--
.../selftests/bpf/progs/map_ptr_kern.c| 5
a couple of lines in
ringbuf_map_alloc() and also makes it look similar to other memory
allocating function like kmalloc().
Signed-off-by: Roman Gushchin
---
kernel/bpf/ringbuf.c | 24
1 file changed, 4 insertions(+), 20 deletions(-)
diff --git a/kernel/bpf/ringbuf.c b
Enable the memcg-based memory accounting for the memory used by
the bpf ringbuffer.
Signed-off-by: Roman Gushchin
---
kernel/bpf/ringbuf.c | 9 +
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/kernel/bpf/ringbuf.c b/kernel/bpf/ringbuf.c
index 002f8a5c9e51..e8e2c39cbdc9
Do not use rlimit-based memory accounting for reuseport_array maps.
It has been replaced with the memcg-based memory accounting.
Signed-off-by: Roman Gushchin
---
kernel/bpf/reuseport_array.c | 12 ++--
1 file changed, 2 insertions(+), 10 deletions(-)
diff --git a/kernel/bpf
Do not use rlimit-based memory accounting for devmap maps.
It has been replaced with the memcg-based memory accounting.
Signed-off-by: Roman Gushchin
---
kernel/bpf/devmap.c | 18 ++
1 file changed, 2 insertions(+), 16 deletions(-)
diff --git a/kernel/bpf/devmap.c b/kernel/bpf
Do not use rlimit-based memory accounting for cpumap maps.
It has been replaced with the memcg-based memory accounting.
Signed-off-by: Roman Gushchin
---
kernel/bpf/cpumap.c | 16 +---
1 file changed, 1 insertion(+), 15 deletions(-)
diff --git a/kernel/bpf/cpumap.c b/kernel/bpf
Since bpf is not using rlimit memlock for the memory accounting
and control, do not change the limit in sample applications.
Signed-off-by: Roman Gushchin
---
samples/bpf/map_perf_test_user.c| 11 ---
samples/bpf/offwaketime_user.c | 2 --
samples/bpf/sockex2_user.c
Since bpf stopped using memlock rlimit to limit the memory usage,
there is no more reason for bpftool to alter its own limits.
Signed-off-by: Roman Gushchin
---
tools/bpf/bpftool/common.c | 7 ---
tools/bpf/bpftool/feature.c| 2 --
tools/bpf/bpftool/main.h | 2 --
tools/bpf
Since bpf is not using memlock rlimit for memory accounting,
there are no more reasons to bump the limit.
Signed-off-by: Roman Gushchin
---
tools/bpf/runqslower/runqslower.c | 16
1 file changed, 16 deletions(-)
diff --git a/tools/bpf/runqslower/runqslower.c
b/tools/bpf
As rlimit-based memory accounting is not used by bpf anymore,
there are no more reasons to play with memlock rlimit.
Delete bpf_rlimit.h which contained a code to bump the limit.
Signed-off-by: Roman Gushchin
---
samples/bpf/hbm.c | 1 -
tools/testing/selftests/bpf
As bpf is not using memlock rlimit for memory accounting anymore,
let's remove the related code from libbpf.
Bpf operations can't fail because of exceeding the limit anymore.
Signed-off-by: Roman Gushchin
---
tools/lib/bpf/libbpf.c | 31 +--
tools/lib/bpf/libbpf.h
Extend xskmap memory accounting to include the memory taken by
the xsk_map_node structure.
Signed-off-by: Roman Gushchin
---
net/xdp/xskmap.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/net/xdp/xskmap.c b/net/xdp/xskmap.c
index 8367adbbe9df..e574b22defe5 100644
Since bpf is not using memlock rlimit for memory accounting,
there are no more reasons to bump the limit.
Signed-off-by: Roman Gushchin
---
tools/testing/selftests/bpf/bench.c | 16 ---
.../selftests/bpf/progs/bpf_iter_bpf_map.c| 5 ++---
tools/testing/selftests/bpf
Include memory used by bpf programs into the memcg-based accounting.
This includes the memory used by programs itself, auxiliary data
and statistics.
Signed-off-by: Roman Gushchin
---
kernel/bpf/core.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/kernel/bpf/core.c
On Tue, Jul 21, 2020 at 12:12:58PM -0700, Shakeel Butt wrote:
> On Tue, Jul 21, 2020 at 11:51 AM Roman Gushchin wrote:
> >
> > On Tue, Jul 21, 2020 at 01:41:26PM -0400, Johannes Weiner wrote:
> > > On Tue, Jul 21, 2020 at 11:19:52AM +, jingrui wrote:
> > >
On Tue, Jul 21, 2020 at 01:41:26PM -0400, Johannes Weiner wrote:
> On Tue, Jul 21, 2020 at 11:19:52AM +, jingrui wrote:
> > Cc: Johannes Weiner ; Michal Hocko
> > ; Vladimir Davydov
> >
> > Thanks.
> >
> > ---
> > PROBLEM: cgroup cost too much memory when transfer small files to tmpfs.
>
On Mon, Jul 20, 2020 at 10:03:49AM +0200, Michal Hocko wrote:
> On Tue 14-07-20 10:39:20, Roman Gushchin wrote:
> > I've noticed a number of warnings like "vmstat_refresh: nr_free_cma
> > -5" or "vmstat_refresh: nr_zone_write_pending -11" on our production
>
group")
> Reported-by: Cameron Berkenpas
> Reported-by: Peter Geis
> Reported-by: Lu Fengqi
> Reported-by: Daniƫl Sonck
> Reported-by: Zhang Qiang
> Tested-by: Cameron Berkenpas
> Tested-by: Peter Geis
> Tested-by: Thomas Lamprecht
> Cc: Daniel Borkmann
>
On Sat, Jul 18, 2020 at 10:24:49AM -0700, Guenter Roeck wrote:
> On Tue, Jun 23, 2020 at 10:40:35AM -0700, Roman Gushchin wrote:
> > Instead of having two sets of kmem_caches: one for system-wide and
> > non-accounted allocations and the second one shared by all accounted
> >
a recursive inlining.
The easies way to fix this is to move memcg_alloc_page_obj_cgroups()
to memcontrol.c and make it a generic (not static inline) function.
It breaks the inlining recursion and fixes the build.
Signed-off-by: Roman Gushchin
Reported-by: Naresh Kamboju
---
mm/memcontrol.c | 20
On Fri, Jul 17, 2020 at 08:31:27PM +1000, Stephen Rothwell wrote:
> Hi all,
>
> After merging the akpm-current tree, today's linux-next build (powerpc
> ppc64_defconfig) produced this warning:
>
> mm/vmstat.c:614: warning: "MAX_THRESHOLD" redefined
> 614 | #define MAX_THRESHOLD 0
> |
>
On Thu, Jul 16, 2020 at 10:25:01PM +0530, Naresh Kamboju wrote:
> On Tue, 23 Jun 2020 at 23:11, Roman Gushchin wrote:
> >
> > Store the obj_cgroup pointer in the corresponding place of
> > page->obj_cgroups for each allocated non-root slab object. Make sure that
> &g
> So only when refcount reach zero, we mark the root kmem_cache as dying.
> >
> > Fixes: 92ee383f6daa ("mm: fix race between kmem_cache destroy, create and
> > deactivate")
> > Signed-off-by: Muchun Song
> > Reviewed-by: Shakeel Butt
> >
On Thu, Jul 16, 2020 at 11:54:37PM +0800, Muchun Song wrote:
> On Thu, Jul 16, 2020 at 11:46 PM Roman Gushchin wrote:
> >
> > On Thu, Jul 16, 2020 at 01:07:02PM +0800, Muchun Song wrote:
> > > On Thu, Jul 16, 2020 at 1:54 AM Roman Gushchin wrote:
> > > >
&
On Thu, Jul 16, 2020 at 01:07:02PM +0800, Muchun Song wrote:
> On Thu, Jul 16, 2020 at 1:54 AM Roman Gushchin wrote:
> >
> > On Thu, Jul 16, 2020 at 12:50:22AM +0800, Muchun Song wrote:
> > > If the kmem_cache refcount is greater than one, we should not
> > >
On Thu, Jul 16, 2020 at 12:50:22AM +0800, Muchun Song wrote:
> If the kmem_cache refcount is greater than one, we should not
> mark the root kmem_cache as dying. If we mark the root kmem_cache
> dying incorrectly, the non-root kmem_cache can never be destroyed.
> It resulted in memory leak when
On Wed, Jul 15, 2020 at 01:32:00PM +0200, Vlastimil Babka wrote:
> On 7/7/20 8:27 AM, Muchun Song wrote:
> > If the kmem_cache refcount is greater than one, we should not
> > mark the root kmem_cache as dying. If we mark the root kmem_cache
> > dying incorrectly, the non-root kmem_cache can never
pu_chunk *chunk)
> ^~~
>
> Add 'inline' to pcpu_chunk_type(),pcpu_is_memcg_chunk() and
> pcpu_chunk_list() to clear warning.
Acked-by: Roman Gushchin
Thank you!
>
> Fixes: 26c99879ef01 ("mm: memcg/percpu: account percpu memory t
On Tue, Jul 14, 2020 at 10:37:47AM -0700, Roman Gushchin wrote:
> I've noticed a number of warnings like "vmstat_refresh: nr_free_cma
> -5" or "vmstat_refresh: nr_zone_write_pending -11" on our production
> hosts. The numbers of these warnings were relatively low an
e drift value, which is 125 *
number of online CPUs. It will still allow to catch systematic leaks,
but will not generate bogus warnings.
Signed-off-by: Roman Gushchin
Cc: Hugh Dickins
---
Documentation/admin-guide/sysctl/vm.rst | 4 ++--
mm/vmstat.c | 30
e drift value, which is 125 *
number of online CPUs. It will still allow to catch systematic leaks,
but will not generate bogus warnings.
Signed-off-by: Roman Gushchin
Cc: Hugh Dickins
Signed-off-by: Roman Gushchin
---
Documentation/admin-guide/sysctl/vm.rst | 4 ++--
mm/vmstat.c
stat.
>
> Signed-off-by: Shakeel Butt
So you went into the opposite direction from the "previous version"
( https://lkml.org/lkml/2020/5/7/1464 ) ?
Acked-by: Roman Gushchin
Thanks!
On Fri, Jul 10, 2020 at 12:19:37PM -0700, Shakeel Butt wrote:
> On Fri, Jul 10, 2020 at 11:42 AM Roman Gushchin wrote:
> >
> > On Fri, Jul 10, 2020 at 07:12:22AM -0700, Shakeel Butt wrote:
> > > On Fri, Jul 10, 2020 at 5:29 AM Michal Hocko wrote:
> > > >
>
On Fri, Jul 10, 2020 at 07:12:22AM -0700, Shakeel Butt wrote:
> On Fri, Jul 10, 2020 at 5:29 AM Michal Hocko wrote:
> >
> > On Thu 09-07-20 12:47:18, Roman Gushchin wrote:
> > > Memory.high limit is implemented in a way such that the kernel
> > > penalizes
On Wed, Jul 08, 2020 at 10:45:16AM -0700, Mike Kravetz wrote:
> On 7/7/20 12:56 PM, Andrew Morton wrote:
> > On Tue, 7 Jul 2020 16:02:04 +1200 Barry Song
> > wrote:
> >
> >> hugetlb_cma[0] can be NULL due to various reasons, for example, node0 has
> >> no memory. so NULL hugetlb_cma[0] doesn't
charge_slab_page() and uncharge_slab_page() are not related anymore
to memcg charging and uncharging. In order to make their names
less confusing, let's rename them to account_slab_page() and
unaccount_slab_page() respectively.
Signed-off-by: Roman Gushchin
---
mm/slab.c | 4 ++--
mm/slab.h | 8
charge_slab_page() is not using the gfp argument anymore,
remove it.
Signed-off-by: Roman Gushchin
---
mm/slab.c | 2 +-
mm/slab.h | 3 +--
mm/slub.c | 2 +-
3 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/mm/slab.c b/mm/slab.c
index 2850fe3c5fb8..fafd46877504 100644
--- a/mm
.
Signed-off-by: Roman Gushchin
---
include/linux/memcontrol.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h
index b8f52a3fed90..ab9322215b2e 100644
--- a/include/linux/memcontrol.h
+++ b/include/linux/memcontrol.h
@@ -1456,7
gt;
> Fixes: cf11e85fc08c ("mm: hugetlb: optionally allocate gigantic hugepages
> using cma")
> Cc: Roman Gushchin
> Cc: Mike Kravetz
> Cc: Jonathan Cameron
> Signed-off-by: Barry Song
> ---
> -v2: add hugetlb_cma_enabled() helper to improve readability
On Mon, Jul 06, 2020 at 10:30:40PM +, Song Bao Hua (Barry Song) wrote:
>
>
> > -Original Message-
> > From: Song Bao Hua (Barry Song)
> > Sent: Tuesday, July 7, 2020 10:12 AM
> > To: 'Roman Gushchin'
> > Cc: a...@linux-foundation.org;
her nodes.
Just curious, is it a real-life problem you've seen? If so, I wonder how
you're using the hugetlb_cma option, and what's the outcome?
>
> Fixes: cf11e85fc08c ("mm: hugetlb: optionally allocate gigantic hugepages
> using cma")
> Cc: Roman Gushchin
> Cc: Mike Kravetz
On Fri, Jul 03, 2020 at 09:27:19AM -0700, Shakeel Butt wrote:
> On Fri, Jul 3, 2020 at 8:50 AM Roman Gushchin wrote:
> >
> > On Fri, Jul 03, 2020 at 07:23:14AM -0700, Shakeel Butt wrote:
> > > On Thu, Jul 2, 2020 at 11:35 PM Michal Hocko wrote:
> > > >
>
On Fri, Jul 03, 2020 at 07:23:14AM -0700, Shakeel Butt wrote:
> On Thu, Jul 2, 2020 at 11:35 PM Michal Hocko wrote:
> >
> > On Thu 02-07-20 08:22:22, Shakeel Butt wrote:
> > [...]
> > > Interface options:
> > > --
> > >
> > > 1) memcg interface e.g. 'echo 10M > memory.reclaim'
> >
On Thu, Jul 02, 2020 at 11:09:26AM -0700, Roman Gushchin wrote:
> Historically the kernel memory accounting was an opt-in feature, which
> could be enabled for individual cgroups. But now it's not true, and
> it's on by default both on cgroup v1 and cgroup v2. And as long as a
> user
On Thu, Jul 02, 2020 at 07:13:02PM +0200, Michal Hocko wrote:
> On Thu 02-07-20 09:37:38, Roman Gushchin wrote:
> > On Thu, Jul 02, 2020 at 06:22:02PM +0200, Michal Hocko wrote:
> > > On Wed 01-07-20 11:45:52, Roman Gushchin wrote:
> > > [...]
> > > > >Fro
On Thu, Jul 02, 2020 at 06:35:31PM +0200, Vlastimil Babka wrote:
> On 7/2/20 6:22 PM, Michal Hocko wrote:
> > On Wed 01-07-20 11:45:52, Roman Gushchin wrote:
> > [...]
> >> >From c97afecd32c0db5e024be9ba72f43d22974f5bcd Mon Sep 17 00:00:00 2001
> >> From: Roman
On Thu, Jul 02, 2020 at 06:22:02PM +0200, Michal Hocko wrote:
> On Wed 01-07-20 11:45:52, Roman Gushchin wrote:
> [...]
> > >From c97afecd32c0db5e024be9ba72f43d22974f5bcd Mon Sep 17 00:00:00 2001
> > From: Roman Gushchin
> > Date: Wed, 1 Jul 2020 11:05:32 -0700
> >
On Thu, Jul 02, 2020 at 09:25:08PM +0530, Naresh Kamboju wrote:
> On Thu, 2 Jul 2020 at 21:19, Roman Gushchin wrote:
> >
> > On Thu, Jul 02, 2020 at 12:22:03PM +0530, Naresh Kamboju wrote:
> > > On Thu, 2 Jul 2020 at 00:16, Roman Gushchin wrote:
> > > >
> &
On Thu, Jul 02, 2020 at 12:22:03PM +0530, Naresh Kamboju wrote:
> On Thu, 2 Jul 2020 at 00:16, Roman Gushchin wrote:
> >
> > On Wed, Jul 01, 2020 at 10:29:04AM +0200, Michal Hocko wrote:
> > > Smells like a different observable problem with the same/similar culp
; > 5.8.0-rc3-next-20200630 #1
> > [ 807.607727] Hardware name: Supermicro SYS-5019S-ML/X11SSH-F, BIOS
> > 2.0b 07/27/2017
> > [ 807.607731] Workqueue: rpciod rpc_async_schedule
> > [ 807.611836] flags: 0x201(head)
> > [ 807.619563] Call Trace:
> &g
701 - 800 of 2791 matches
Mail list logo