On Fri, Jan 22, 2016 at 12:11:21PM -0500, Johannes Weiner wrote:
> Hi,
>
> On Fri, Jan 22, 2016 at 10:56:15AM -0500, Rik van Riel wrote:
> > I am trying to gauge interest in discussing VM containers at the LSF/MM
> > summit this year. Projects like ClearLinux, Qubes, and others are all
> > trying
Fixes: 8e8ae645249b ("mm: memcontrol: hook up vmpressure to socket pressure")
Signed-off-by: Vladimir Davydov <vdavy...@virtuozzo.com>
---
mm/vmpressure.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/mm/vmpressure.c b/mm/vmpressure.c
index 9a6c0704211c..149fdf
work")), but since commit 6b4f7799c6a57 ("mm: vmscan: invoke
slab shrinkers from shrink_zone()") it doesn't make any difference.
Anyway, running on non-NUMA machine shouldn't make a shrinker NUMA
unaware, so zap this hunk.
Signed-off-by: Vladimir Davydov <vdavy...@virtuozzo.com>
---
m
On Tue, Jan 26, 2016 at 04:00:02PM -0500, Johannes Weiner wrote:
> @@ -683,17 +683,17 @@ int __set_page_dirty_buffers(struct page *page)
> } while (bh != head);
> }
> /*
> - * Use mem_group_begin_page_stat() to keep PageDirty synchronized with
> - * per-memcg
On Tue, Jan 26, 2016 at 04:00:03PM -0500, Johannes Weiner wrote:
> This is a compile-time constant, no need to calculate it on refault.
>
> Signed-off-by: Johannes Weiner <han...@cmpxchg.org>
Reviewed-by: Vladimir Davydov <vdavy...@virtuozzo.com>
eparation, make unpack_shadow() clearly about extracting static
> data, and let workingset_refault() do all the higher-level handling.
>
> Signed-off-by: Johannes Weiner <han...@cmpxchg.org>
Reviewed-by: Vladimir Davydov <vdavy...@virtuozzo.com>
into buckets of
> 2^6 pages, or 256K.
>
> Signed-off-by: Johannes Weiner <han...@cmpxchg.org>
Reviewed-by: Vladimir Davydov <vdavy...@virtuozzo.com>
One nit below.
> +/*
> + * Eviction timestamps need to be able to cover the full range of
> + * actionable r
On Tue, Jan 26, 2016 at 04:00:06PM -0500, Johannes Weiner wrote:
> diff --git a/include/linux/swap.h b/include/linux/swap.h
> index b14a2bb33514..1cf3065c143b 100644
> --- a/include/linux/swap.h
> +++ b/include/linux/swap.h
> @@ -317,6 +317,7 @@ extern void
On Mon, Jan 25, 2016 at 11:39:07AM -0500, Johannes Weiner wrote:
> On Sun, Jan 24, 2016 at 07:56:16PM +0300, Vladimir Davydov wrote:
> > Currently, inactive_age is maintained per zone, which results in
> > unexpected file page activations in case memory cgroups are used.
On Mon, Jan 25, 2016 at 11:39:07AM -0500, Johannes Weiner wrote:
> On Sun, Jan 24, 2016 at 07:56:16PM +0300, Vladimir Davydov wrote:
> > Currently, inactive_age is maintained per zone, which results in
> > unexpected file page activations in case memory cgroups are used.
viction counter, hence maximal refault
distance will be 2GB, which should be enough for 32-bit systems.
Signed-off-by: Vladimir Davydov
---
Changes from v1:
- Handle refaults by different cgroups properly (Johannes).
v1: http://www.spinics.net/lists/linux-mm/msg92466.html
include/linux/mem
viction counter, hence maximal refault
distance will be 2GB, which should be enough for 32-bit systems.
Signed-off-by: Vladimir Davydov <vdavy...@virtuozzo.com>
---
Changes from v1:
- Handle refaults by different cgroups properly (Johannes).
v1: http://www.spinics.net/lists/linux-mm/ms
On Fri, Dec 18, 2015 at 02:40:04PM -0800, Andrew Morton wrote:
> On Fri, 18 Dec 2015 19:24:05 +0300 Vladimir Davydov
> wrote:
>
> >
> > OK, got it, thanks. Here goes the incremental patch (it should also fix
> > the warning regarding unused cmpxchg returned value):
On Fri, Dec 18, 2015 at 02:40:04PM -0800, Andrew Morton wrote:
> On Fri, 18 Dec 2015 19:24:05 +0300 Vladimir Davydov <vdavy...@virtuozzo.com>
> wrote:
>
> >
> > OK, got it, thanks. Here goes the incremental patch (it should also fix
> > the warning regard
On Fri, Dec 18, 2015 at 11:00:41AM -0500, Johannes Weiner wrote:
> On Fri, Dec 18, 2015 at 06:32:02PM +0300, Vladimir Davydov wrote:
> > On Thu, Dec 17, 2015 at 03:02:17PM -0800, Andrew Morton wrote:
> > > On Tue, 15 Dec 2015 15:31:37 +0300 Vladimir Davydov
> > >
On Fri, Dec 18, 2015 at 11:51:23AM +0900, Kamezawa Hiroyuki wrote:
...
> Could you give here a hint how to calculate amount of swapcache,
> counted both in memory.current and swap.current ?
Currently it's impossible, but once memory.stat has settled in the
unified hierarchy, it might be worth
On Thu, Dec 17, 2015 at 03:02:17PM -0800, Andrew Morton wrote:
> On Tue, 15 Dec 2015 15:31:37 +0300 Vladimir Davydov
> wrote:
>
> > Memory cgroup reclaim can be interrupted with mem_cgroup_iter_break()
> > once enough pages have been reclaimed, in which case, in contras
On Fri, Dec 18, 2015 at 11:51:23AM +0900, Kamezawa Hiroyuki wrote:
...
> Could you give here a hint how to calculate amount of swapcache,
> counted both in memory.current and swap.current ?
Currently it's impossible, but once memory.stat has settled in the
unified hierarchy, it might be worth
On Fri, Dec 18, 2015 at 11:00:41AM -0500, Johannes Weiner wrote:
> On Fri, Dec 18, 2015 at 06:32:02PM +0300, Vladimir Davydov wrote:
> > On Thu, Dec 17, 2015 at 03:02:17PM -0800, Andrew Morton wrote:
> > > On Tue, 15 Dec 2015 15:31:37 +0300 Vladimir Davydov
> > > <
On Thu, Dec 17, 2015 at 03:02:17PM -0800, Andrew Morton wrote:
> On Tue, 15 Dec 2015 15:31:37 +0300 Vladimir Davydov <vdavy...@virtuozzo.com>
> wrote:
>
> > Memory cgroup reclaim can be interrupted with mem_cgroup_iter_break()
> > once enough pages have been reclaimed,
ap on commit (see mem_cgroup_commit_charge).
Signed-off-by: Vladimir Davydov
---
Changes in v2:
- Rename mem_cgroup_charge_swap -> mem_cgroup_try_charge_swap to
conform to other memcg charging methods.
- Remove unnecessary READ_ONCE from mem_cgroup_get_limit.
- Uncharge swap only when the
We don't scan anonymous memory if we ran out of swap, neither should we
do it in case memcg swap limit is hit, because swap out is impossible
anyway.
Signed-off-by: Vladimir Davydov
Acked-by: Johannes Weiner
---
Changes in v2:
- Do not check swap limit on the legacy hierarchy.
include/linux
own swap limit.
Signed-off-by: Vladimir Davydov
Acked-by: Johannes Weiner
---
Changes in v2:
- Remove unnecessary PageSwapCache check from mem_cgroup_swap_full.
- Do not check swap limit on the legacy hierarchy.
include/linux/swap.h | 6 ++
mm/memcontrol.c |
The following patches will add more functions to the memcg section of
include/linux/swap.h. Some of them will need values defined below the
current location of the section. So let's move the section to the end of
the file. No functional changes intended.
Signed-off-by: Vladimir Davydov
Acked
The rationale of separate swap counter is given by Johannes Weiner.
Signed-off-by: Vladimir Davydov
---
Changes in v2:
- Add rationale of separate swap counter provided by Johannes.
Documentation/cgroup.txt | 33 +
1 file changed, 33 insertions(+)
diff --git
-by: Vladimir Davydov
Acked-by: Johannes Weiner
---
include/linux/memcontrol.h | 27 ++-
mm/vmscan.c| 2 +-
2 files changed, 11 insertions(+), 18 deletions(-)
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h
index 6e0126230878
memcg will come in handy in get_scan_count(). It can already be used for
getting swappiness immediately in get_scan_count() instead of passing it
around. The following patches will add more memcg-related values, which
will be used there.
Signed-off-by: Vladimir Davydov
Acked-by: Johannes Weiner
.
Thanks,
Vladimir Davydov (7):
mm: memcontrol: charge swap to cgroup2
mm: vmscan: pass memcg to get_scan_count()
mm: memcontrol: replace mem_cgroup_lruvec_online with
mem_cgroup_online
swap.h: move memcg related stuff to the end of the file
mm: vmscan: do not scan anon pages if memcg swap
>offlining itself.
>
> 3. Children in !use_hierarchy mode would inherit the OOM killer
>setting from their physical parent rather than the logical parent,
>rootmemcg. This is silly, but no reason to change the semantics as
>part of this cleanup patch, so restore
>offlining itself.
>
> 3. Children in !use_hierarchy mode would inherit the OOM killer
>setting from their physical parent rather than the logical parent,
>rootmemcg. This is silly, but no reason to change the semantics as
>part of this cleanup patch, so restore i
.
Thanks,
Vladimir Davydov (7):
mm: memcontrol: charge swap to cgroup2
mm: vmscan: pass memcg to get_scan_count()
mm: memcontrol: replace mem_cgroup_lruvec_online with
mem_cgroup_online
swap.h: move memcg related stuff to the end of the file
mm: vmscan: do not scan anon pages if memcg swap
-by: Vladimir Davydov <vdavy...@virtuozzo.com>
Acked-by: Johannes Weiner <han...@cmpxchg.org>
---
include/linux/memcontrol.h | 27 ++-
mm/vmscan.c| 2 +-
2 files changed, 11 insertions(+), 18 deletions(-)
diff --git a/include/linux/memcontrol
memcg will come in handy in get_scan_count(). It can already be used for
getting swappiness immediately in get_scan_count() instead of passing it
around. The following patches will add more memcg-related values, which
will be used there.
Signed-off-by: Vladimir Davydov <vdavy...@virtuozzo.
The following patches will add more functions to the memcg section of
include/linux/swap.h. Some of them will need values defined below the
current location of the section. So let's move the section to the end of
the file. No functional changes intended.
Signed-off-by: Vladimir Davydov <vd
We don't scan anonymous memory if we ran out of swap, neither should we
do it in case memcg swap limit is hit, because swap out is impossible
anyway.
Signed-off-by: Vladimir Davydov <vdavy...@virtuozzo.com>
Acked-by: Johannes Weiner <han...@cmpxchg.org>
---
Changes in v2:
- Do no
The rationale of separate swap counter is given by Johannes Weiner.
Signed-off-by: Vladimir Davydov <vdavy...@virtuozzo.com>
---
Changes in v2:
- Add rationale of separate swap counter provided by Johannes.
Documentation/cgroup.txt | 33 +
1 file chang
ap on commit (see mem_cgroup_commit_charge).
Signed-off-by: Vladimir Davydov <vdavy...@virtuozzo.com>
---
Changes in v2:
- Rename mem_cgroup_charge_swap -> mem_cgroup_try_charge_swap to
conform to other memcg charging methods.
- Remove unnecessary READ_ONCE from mem_cgroup_get_limit.
own swap limit.
Signed-off-by: Vladimir Davydov <vdavy...@virtuozzo.com>
Acked-by: Johannes Weiner <han...@cmpxchg.org>
---
Changes in v2:
- Remove unnecessary PageSwapCache check from mem_cgroup_swap_full.
- Do not check swap limit on the legacy hierarchy.
include/linux/swap.h
On Tue, Dec 15, 2015 at 02:38:58PM -0500, Johannes Weiner wrote:
> On Mon, Dec 14, 2015 at 08:14:55PM +0300, Vladimir Davydov wrote:
> > On Fri, Dec 11, 2015 at 02:54:13PM -0500, Johannes Weiner wrote:
> > ...
> > > -static int
> > > -mem_cgroup_css_onlin
On Tue, Dec 15, 2015 at 02:38:58PM -0500, Johannes Weiner wrote:
> On Mon, Dec 14, 2015 at 08:14:55PM +0300, Vladimir Davydov wrote:
> > On Fri, Dec 11, 2015 at 02:54:13PM -0500, Johannes Weiner wrote:
> > ...
> > > -static int
> > > -mem_cgroup_css_onlin
c8fb31ad2e ("mm: memcontrol: convert reclaim iterator to simple css
refcounting")
Signed-off-by: Vladimir Davydov
Acked-by: Michal Hocko
Cc: Johannes Weiner
Cc: # 3.19+
---
Changes in v2:
As pointed out by Johannes, clearing iter->position when interrupting
memcg reclaim, as it
On Tue, Dec 15, 2015 at 12:22:41PM +0900, Kamezawa Hiroyuki wrote:
> On 2015/12/15 4:42, Vladimir Davydov wrote:
> >On Mon, Dec 14, 2015 at 04:30:37PM +0100, Michal Hocko wrote:
> >>On Thu 10-12-15 14:39:14, Vladimir Davydov wrote:
> >>>In the legacy hierarchy we
On Tue, Dec 15, 2015 at 12:12:40PM +0900, Kamezawa Hiroyuki wrote:
> On 2015/12/15 0:30, Michal Hocko wrote:
> >On Thu 10-12-15 14:39:14, Vladimir Davydov wrote:
> >>In the legacy hierarchy we charge memsw, which is dubious, because:
> >>
> >> - mem
On Tue, Dec 15, 2015 at 12:12:40PM +0900, Kamezawa Hiroyuki wrote:
> On 2015/12/15 0:30, Michal Hocko wrote:
> >On Thu 10-12-15 14:39:14, Vladimir Davydov wrote:
> >>In the legacy hierarchy we charge memsw, which is dubious, because:
> >>
> >> - mem
On Tue, Dec 15, 2015 at 12:22:41PM +0900, Kamezawa Hiroyuki wrote:
> On 2015/12/15 4:42, Vladimir Davydov wrote:
> >On Mon, Dec 14, 2015 at 04:30:37PM +0100, Michal Hocko wrote:
> >>On Thu 10-12-15 14:39:14, Vladimir Davydov wrote:
> >>>In the legacy hierarchy we
c8fb31ad2e ("mm: memcontrol: convert reclaim iterator to simple css
refcounting")
Signed-off-by: Vladimir Davydov <vdavy...@virtuozzo.com>
Acked-by: Michal Hocko <mho...@kernel.org>
Cc: Johannes Weiner <han...@cmpxchg.org>
Cc: <sta...@vger.kernel.org> # 3.19+
---
Cha
On Mon, Dec 14, 2015 at 04:30:37PM +0100, Michal Hocko wrote:
> On Thu 10-12-15 14:39:14, Vladimir Davydov wrote:
> > In the legacy hierarchy we charge memsw, which is dubious, because:
> >
> > - memsw.limit must be >= memory.limit, so it is impossible to limit
> >
On Mon, Dec 14, 2015 at 10:19:01AM -0500, Johannes Weiner wrote:
...
> > @@ -859,14 +859,12 @@ struct mem_cgroup *mem_cgroup_iter(struct mem_cgroup
> > *root,
> > if (prev && reclaim->generation != iter->generation)
> > goto out_unlock;
> >
> > - do {
>
On Fri, Dec 11, 2015 at 02:54:13PM -0500, Johannes Weiner wrote:
...
> -static int
> -mem_cgroup_css_online(struct cgroup_subsys_state *css)
> +static struct cgroup_subsys_state * __ref
> +mem_cgroup_css_alloc(struct cgroup_subsys_state *parent_css)
> {
> - struct mem_cgroup *memcg =
On Fri, Dec 11, 2015 at 02:54:13PM -0500, Johannes Weiner wrote:
...
> -static int
> -mem_cgroup_css_online(struct cgroup_subsys_state *css)
> +static struct cgroup_subsys_state * __ref
> +mem_cgroup_css_alloc(struct cgroup_subsys_state *parent_css)
> {
> - struct mem_cgroup *memcg =
On Mon, Dec 14, 2015 at 10:19:01AM -0500, Johannes Weiner wrote:
...
> > @@ -859,14 +859,12 @@ struct mem_cgroup *mem_cgroup_iter(struct mem_cgroup
> > *root,
> > if (prev && reclaim->generation != iter->generation)
> > goto out_unlock;
> >
> > - do {
>
On Mon, Dec 14, 2015 at 04:30:37PM +0100, Michal Hocko wrote:
> On Thu 10-12-15 14:39:14, Vladimir Davydov wrote:
> > In the legacy hierarchy we charge memsw, which is dubious, because:
> >
> > - memsw.limit must be >= memory.limit, so it is impossible to limit
> >
On Sat, Dec 12, 2015 at 11:45:40AM -0500, Johannes Weiner wrote:
> On Sat, Dec 12, 2015 at 04:34:02PM +0300, Vladimir Davydov wrote:
> > Memory cgroup reclaim can be interrupted with mem_cgroup_iter_break()
> > once enough pages have been reclaimed, in which case, in contrast to a
t clearer which code is legacy.
>
> Suggested-by: Vladimir Davydov
> Signed-off-by: Johannes Weiner
Looks good to me, thanks!
Acked-by: Vladimir Davydov
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kerne
Johannes Weiner
Acked-by: Vladimir Davydov
> @@ -4374,17 +4342,11 @@ static void mem_cgroup_css_free(struct
> cgroup_subsys_state *css)
> {
> struct mem_cgroup *memcg = mem_cgroup_from_css(css);
>
> -#ifdef CONFIG_INET
> if (cgroup_subsys_on_dfl(memory_cgr
On Fri, Dec 11, 2015 at 02:42:54PM -0500, Johannes Weiner wrote:
> On Thu, Dec 10, 2015 at 02:39:20PM +0300, Vladimir Davydov wrote:
> > Signed-off-by: Vladimir Davydov
>
> Acked-by: Johannes Weiner
>
> Can we include a blurb for R-5-1 of cgroups.txt as well to explain wh
On Fri, Dec 11, 2015 at 02:33:58PM -0500, Johannes Weiner wrote:
> On Thu, Dec 10, 2015 at 02:39:19PM +0300, Vladimir Davydov wrote:
> > Swap cache pages are freed aggressively if swap is nearly full (>50%
> > currently), because otherwise we are likely to stop scanning anonymou
reclaim iterator to simple css
refcounting")
Signed-off-by: Vladimir Davydov
Cc: Johannes Weiner
Cc: Michal Hocko
Cc: # 3.19+
---
include/linux/memcontrol.h | 8 +---
mm/memcontrol.c| 28 +++-
mm/vmscan.c| 2 +-
3 files changed, 29 inse
reclaim iterator to simple css
refcounting")
Signed-off-by: Vladimir Davydov <vdavy...@virtuozzo.com>
Cc: Johannes Weiner <han...@cmpxchg.org>
Cc: Michal Hocko <mho...@kernel.org>
Cc: <sta...@vger.kernel.org> # 3.19+
---
include/linux/memcontrol.h
On Fri, Dec 11, 2015 at 02:42:54PM -0500, Johannes Weiner wrote:
> On Thu, Dec 10, 2015 at 02:39:20PM +0300, Vladimir Davydov wrote:
> > Signed-off-by: Vladimir Davydov <vdavy...@virtuozzo.com>
>
> Acked-by: Johannes Weiner <han...@cmpxchg.org>
>
> Can we include
On Fri, Dec 11, 2015 at 02:33:58PM -0500, Johannes Weiner wrote:
> On Thu, Dec 10, 2015 at 02:39:19PM +0300, Vladimir Davydov wrote:
> > Swap cache pages are freed aggressively if swap is nearly full (>50%
> > currently), because otherwise we are likely to stop scanning anonymou
Johannes Weiner <han...@cmpxchg.org>
Acked-by: Vladimir Davydov <vdavy...@virtuozzo.com>
> @@ -4374,17 +4342,11 @@ static void mem_cgroup_css_free(struct
> cgroup_subsys_state *css)
> {
> struct mem_cgroup *memcg = mem_cgroup_from_css(css);
>
> -#ifdef
t clearer which code is legacy.
>
> Suggested-by: Vladimir Davydov <vdavy...@virtuozzo.com>
> Signed-off-by: Johannes Weiner <han...@cmpxchg.org>
Looks good to me, thanks!
Acked-by: Vladimir Davydov <vdavy...@virtuozzo.com>
--
To unsubscribe from this list: send the l
On Sat, Dec 12, 2015 at 11:45:40AM -0500, Johannes Weiner wrote:
> On Sat, Dec 12, 2015 at 04:34:02PM +0300, Vladimir Davydov wrote:
> > Memory cgroup reclaim can be interrupted with mem_cgroup_iter_break()
> > once enough pages have been reclaimed, in which case, in contrast to a
On Fri, Dec 11, 2015 at 11:48:57AM +0900, Kamezawa Hiroyuki wrote:
> On 2015/12/10 20:39, Vladimir Davydov wrote:
> > In the legacy hierarchy we charge memsw, which is dubious, because:
> >
> > - memsw.limit must be >= memory.limit, so it is impossible to limit
>
On Thu, Dec 10, 2015 at 11:00:27AM -0500, Johannes Weiner wrote:
> On Thu, Dec 10, 2015 at 02:39:14PM +0300, Vladimir Davydov wrote:
...
> > diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h
> > index c6a5ed2f2744..993c9a26b637 100644
> > --- a/inclu
memcg will come in handy in get_scan_count(). It can already be used for
getting swappiness immediately in get_scan_count() instead of passing it
around. The following patches will add more memcg-related values, which
will be used there.
Signed-off-by: Vladimir Davydov
---
mm/vmscan.c | 20
We don't scan anonymous memory if we ran out of swap, neither should we
do it in case memcg swap limit is hit, because swap out is impossible
anyway.
Signed-off-by: Vladimir Davydov
---
include/linux/swap.h | 6 ++
mm/memcontrol.c | 13 +
mm/vmscan.c | 2 +-
3
-by: Vladimir Davydov
---
include/linux/memcontrol.h | 27 ++-
mm/vmscan.c| 2 +-
2 files changed, 11 insertions(+), 18 deletions(-)
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h
index 993c9a26b637..c9a14e1eab62 100644
--- a/include
Signed-off-by: Vladimir Davydov
---
Documentation/cgroup.txt | 16
1 file changed, 16 insertions(+)
diff --git a/Documentation/cgroup.txt b/Documentation/cgroup.txt
index 31d1f7bf12a1..21c6c013c339 100644
--- a/Documentation/cgroup.txt
+++ b/Documentation/cgroup.txt
@@ -819,6
The following patches will add more functions to the memcg section of
include/linux/swap.h. Some of them will need values defined below the
current location of the section. So let's move the section to the end of
the file. No functional changes intended.
Signed-off-by: Vladimir Davydov
own swap limit.
Signed-off-by: Vladimir Davydov
---
include/linux/swap.h | 6 ++
mm/memcontrol.c | 23 +++
mm/memory.c | 3 ++-
mm/swapfile.c| 2 +-
mm/vmscan.c | 2 +-
5 files changed, 33 insertions(+), 3 deletions(-)
diff --git a/incl
counter. Patches 2-6 make memcg reclaim follow the heuristics used
on global reclaim for handling anon/swap. Patch 7 updates documentation.
Thanks,
Vladimir Davydov (7):
mm: memcontrol: charge swap to cgroup2
mm: vmscan: pass memcg to get_scan_count()
mm: memcontrol: replace
ap.max.
Signed-off-by: Vladimir Davydov
---
include/linux/memcontrol.h | 1 +
include/linux/swap.h | 5 ++
mm/memcontrol.c| 123 +
mm/shmem.c | 4 ++
mm/swap_state.c| 5 ++
5 files changed, 129 inse
On Wed, Dec 09, 2015 at 03:30:04PM -0500, Johannes Weiner wrote:
> there has been quite a bit of trouble that stems from dividing our
> CONFIG space and having to provide real code and dummy functions
> correctly in all possible combinations. This is amplified by having
> the legacy mode and the
On Wed, Dec 09, 2015 at 03:01:07PM -0500, Johannes Weiner wrote:
> On Wed, Dec 09, 2015 at 05:32:39PM +0100, Arnd Bergmann wrote:
> > The change to move the kmem accounting into the normal memcg
> > code means we can no longer use memcg with slob, which lacks
> > the memcg_params member in its
On Thu, Dec 10, 2015 at 11:00:27AM -0500, Johannes Weiner wrote:
> On Thu, Dec 10, 2015 at 02:39:14PM +0300, Vladimir Davydov wrote:
...
> > diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h
> > index c6a5ed2f2744..993c9a26b637 100644
> > --- a/inclu
On Wed, Dec 09, 2015 at 03:01:07PM -0500, Johannes Weiner wrote:
> On Wed, Dec 09, 2015 at 05:32:39PM +0100, Arnd Bergmann wrote:
> > The change to move the kmem accounting into the normal memcg
> > code means we can no longer use memcg with slob, which lacks
> > the memcg_params member in its
memcg will come in handy in get_scan_count(). It can already be used for
getting swappiness immediately in get_scan_count() instead of passing it
around. The following patches will add more memcg-related values, which
will be used there.
Signed-off-by: Vladimir Davydov <vdavy...@virtuozzo.
counter. Patches 2-6 make memcg reclaim follow the heuristics used
on global reclaim for handling anon/swap. Patch 7 updates documentation.
Thanks,
Vladimir Davydov (7):
mm: memcontrol: charge swap to cgroup2
mm: vmscan: pass memcg to get_scan_count()
mm: memcontrol: replace
ap.max.
Signed-off-by: Vladimir Davydov <vdavy...@virtuozzo.com>
---
include/linux/memcontrol.h | 1 +
include/linux/swap.h | 5 ++
mm/memcontrol.c| 123 +
mm/shmem.c | 4 ++
mm/swap_state.c| 5
We don't scan anonymous memory if we ran out of swap, neither should we
do it in case memcg swap limit is hit, because swap out is impossible
anyway.
Signed-off-by: Vladimir Davydov <vdavy...@virtuozzo.com>
---
include/linux/swap.h | 6 ++
mm/memcontrol.c | 13 +++
Signed-off-by: Vladimir Davydov <vdavy...@virtuozzo.com>
---
Documentation/cgroup.txt | 16
1 file changed, 16 insertions(+)
diff --git a/Documentation/cgroup.txt b/Documentation/cgroup.txt
index 31d1f7bf12a1..21c6c013c339 100644
--- a/Documentation/cgroup.txt
-by: Vladimir Davydov <vdavy...@virtuozzo.com>
---
include/linux/memcontrol.h | 27 ++-
mm/vmscan.c| 2 +-
2 files changed, 11 insertions(+), 18 deletions(-)
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h
index 993c9a26b637..c9a14e
The following patches will add more functions to the memcg section of
include/linux/swap.h. Some of them will need values defined below the
current location of the section. So let's move the section to the end of
the file. No functional changes intended.
Signed-off-by: Vladimir Davydov <vd
own swap limit.
Signed-off-by: Vladimir Davydov <vdavy...@virtuozzo.com>
---
include/linux/swap.h | 6 ++
mm/memcontrol.c | 23 +++
mm/memory.c | 3 ++-
mm/swapfile.c| 2 +-
mm/vmscan.c | 2 +-
5 files changed, 33 insertions(+), 3
On Wed, Dec 09, 2015 at 03:30:04PM -0500, Johannes Weiner wrote:
> there has been quite a bit of trouble that stems from dividing our
> CONFIG space and having to provide real code and dummy functions
> correctly in all possible combinations. This is amplified by having
> the legacy mode and the
On Fri, Dec 11, 2015 at 11:48:57AM +0900, Kamezawa Hiroyuki wrote:
> On 2015/12/10 20:39, Vladimir Davydov wrote:
> > In the legacy hierarchy we charge memsw, which is dubious, because:
> >
> > - memsw.limit must be >= memory.limit, so it is impossible to limit
>
tcp_memcontrol.c only contains legacy memory.tcp.kmem.* file definitions
and mem_cgroup->tcp_mem init/destroy stuff. This doesn't belong to
network subsys. Let's move it to memcontrol.c. This also allows us to
reuse generic code for handling legacy memcg files.
Signed-off-by: Vladimir Davy
On Tue, Dec 08, 2015 at 01:34:25PM -0500, Johannes Weiner wrote:
> Let the user know that CONFIG_MEMCG_KMEM does not apply to the cgroup2
> interface. This also makes legacy-only code sections stand out better.
>
> Signed-off-by: Johannes Weiner
Acked-by: Vladimir Davydov
--
To
t; - signal_struct
> - sighand_struct
> - fs_struct
> - files_struct
> - fdtable and fdtable->full_fds_bits
> - dentry and external_name
> - inode for all filesystems.
>
> This should give us reasonable memory isolation for most common
> wor
On Tue, Dec 08, 2015 at 01:34:23PM -0500, Johannes Weiner wrote:
> The cgroup2 memory controller will account important in-kernel memory
> consumers per default. Move all necessary components to CONFIG_MEMCG.
>
> Signed-off-by: Johannes Weiner
Acked-by: Vladimir Davydov
--
To unsu
state init from the tcp control interface init in
> preparation for that.
>
> Signed-off-by: Johannes Weiner
Acked-by: Vladimir Davydov
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordo
On Tue, Dec 08, 2015 at 01:34:21PM -0500, Johannes Weiner wrote:
> Put all the related code to setup and teardown the kmem accounting
> state into the same location. No functional change intended.
>
> Signed-off-by: Johannes Weiner
Acked-by: Vladimir Davydov
--
To unsubscribe fr
ff-by: Johannes Weiner
Acked-by: Vladimir Davydov
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
On Tue, Dec 08, 2015 at 01:34:19PM -0500, Johannes Weiner wrote:
> The kmem page_counter's limit is initialized to PAGE_COUNTER_MAX
> inside mem_cgroup_css_online(). There is no need to repeat this
> from memcg_propagate_kmem().
>
> Signed-off-by: Johannes Weiner
Acked-by: V
On Tue, Dec 08, 2015 at 01:34:18PM -0500, Johannes Weiner wrote:
> Signed-off-by: Johannes Weiner
Acked-by: Vladimir Davydov
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo
On Tue, Dec 08, 2015 at 01:34:18PM -0500, Johannes Weiner wrote:
> Signed-off-by: Johannes Weiner <han...@cmpxchg.org>
Acked-by: Vladimir Davydov <vdavy...@virtuozzo.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the bo
mpxchg.org>
Acked-by: Vladimir Davydov <vdavy...@virtuozzo.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
d-off-by: Johannes Weiner <han...@cmpxchg.org>
Acked-by: Vladimir Davydov <vdavy...@virtuozzo.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-
601 - 700 of 2986 matches
Mail list logo