All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mm: memcontrol: restore proper dirty throttling when memory.high changes
@ 2020-07-28 13:52 ` Johannes Weiner
  0 siblings, 0 replies; 8+ messages in thread
From: Johannes Weiner @ 2020-07-28 13:52 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Michal Hocko, Roman Gushchin, linux-mm, cgroups, linux-kernel,
	kernel-team

Commit 8c8c383c04f6 ("mm: memcontrol: try harder to set a new
memory.high") inadvertently removed a callback to recalculate the
writeback cache size in light of a newly configured memory.high limit.

Without letting the writeback cache know about a potentially heavily
reduced limit, it may permit too many dirty pages, which can cause
unnecessary reclaim latencies or even avoidable OOM situations.

This was spotted while reading the code, it hasn't knowingly caused
any problems in practice so far.

Fixes: 8c8c383c04f6 ("mm: memcontrol: try harder to set a new memory.high")
Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
---
 mm/memcontrol.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 13f559af1ab6..805a44bf948c 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -6071,6 +6071,7 @@ static ssize_t memory_high_write(struct kernfs_open_file *of,
 			break;
 	}
 
+	memcg_wb_domain_size_changed(memcg);
 	return nbytes;
 }
 
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH] mm: memcontrol: restore proper dirty throttling when memory.high changes
@ 2020-07-28 13:52 ` Johannes Weiner
  0 siblings, 0 replies; 8+ messages in thread
From: Johannes Weiner @ 2020-07-28 13:52 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Michal Hocko, Roman Gushchin, linux-mm-Bw31MaZKKs3YtjvyW6yDsg,
	cgroups-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, kernel-team-b10kYP2dOMg

Commit 8c8c383c04f6 ("mm: memcontrol: try harder to set a new
memory.high") inadvertently removed a callback to recalculate the
writeback cache size in light of a newly configured memory.high limit.

Without letting the writeback cache know about a potentially heavily
reduced limit, it may permit too many dirty pages, which can cause
unnecessary reclaim latencies or even avoidable OOM situations.

This was spotted while reading the code, it hasn't knowingly caused
any problems in practice so far.

Fixes: 8c8c383c04f6 ("mm: memcontrol: try harder to set a new memory.high")
Signed-off-by: Johannes Weiner <hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org>
---
 mm/memcontrol.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 13f559af1ab6..805a44bf948c 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -6071,6 +6071,7 @@ static ssize_t memory_high_write(struct kernfs_open_file *of,
 			break;
 	}
 
+	memcg_wb_domain_size_changed(memcg);
 	return nbytes;
 }
 
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] mm: memcontrol: restore proper dirty throttling when memory.high changes
@ 2020-07-28 14:07   ` Chris Down
  0 siblings, 0 replies; 8+ messages in thread
From: Chris Down @ 2020-07-28 14:07 UTC (permalink / raw)
  To: Johannes Weiner
  Cc: Andrew Morton, Michal Hocko, Roman Gushchin, linux-mm, cgroups,
	linux-kernel, kernel-team

Johannes Weiner writes:
>Commit 8c8c383c04f6 ("mm: memcontrol: try harder to set a new
>memory.high") inadvertently removed a callback to recalculate the
>writeback cache size in light of a newly configured memory.high limit.
>
>Without letting the writeback cache know about a potentially heavily
>reduced limit, it may permit too many dirty pages, which can cause
>unnecessary reclaim latencies or even avoidable OOM situations.
>
>This was spotted while reading the code, it hasn't knowingly caused
>any problems in practice so far.
>
>Fixes: 8c8c383c04f6 ("mm: memcontrol: try harder to set a new memory.high")
>Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>

Acked-by: Chris Down <chris@chrisdown.name>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] mm: memcontrol: restore proper dirty throttling when memory.high changes
@ 2020-07-28 14:07   ` Chris Down
  0 siblings, 0 replies; 8+ messages in thread
From: Chris Down @ 2020-07-28 14:07 UTC (permalink / raw)
  To: Johannes Weiner
  Cc: Andrew Morton, Michal Hocko, Roman Gushchin,
	linux-mm-Bw31MaZKKs3YtjvyW6yDsg, cgroups-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, kernel-team-b10kYP2dOMg

Johannes Weiner writes:
>Commit 8c8c383c04f6 ("mm: memcontrol: try harder to set a new
>memory.high") inadvertently removed a callback to recalculate the
>writeback cache size in light of a newly configured memory.high limit.
>
>Without letting the writeback cache know about a potentially heavily
>reduced limit, it may permit too many dirty pages, which can cause
>unnecessary reclaim latencies or even avoidable OOM situations.
>
>This was spotted while reading the code, it hasn't knowingly caused
>any problems in practice so far.
>
>Fixes: 8c8c383c04f6 ("mm: memcontrol: try harder to set a new memory.high")
>Signed-off-by: Johannes Weiner <hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org>

Acked-by: Chris Down <chris-6Bi1550iOqEnzZ6mRAm98g@public.gmane.org>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] mm: memcontrol: restore proper dirty throttling when memory.high changes
  2020-07-28 13:52 ` Johannes Weiner
@ 2020-07-28 15:07   ` Shakeel Butt
  -1 siblings, 0 replies; 8+ messages in thread
From: Shakeel Butt @ 2020-07-28 15:07 UTC (permalink / raw)
  To: Johannes Weiner
  Cc: Andrew Morton, Michal Hocko, Roman Gushchin, Linux MM, Cgroups,
	LKML, Kernel Team

On Tue, Jul 28, 2020 at 6:53 AM Johannes Weiner <hannes@cmpxchg.org> wrote:
>
> Commit 8c8c383c04f6 ("mm: memcontrol: try harder to set a new
> memory.high") inadvertently removed a callback to recalculate the
> writeback cache size in light of a newly configured memory.high limit.
>
> Without letting the writeback cache know about a potentially heavily
> reduced limit, it may permit too many dirty pages, which can cause
> unnecessary reclaim latencies or even avoidable OOM situations.
>
> This was spotted while reading the code, it hasn't knowingly caused
> any problems in practice so far.
>
> Fixes: 8c8c383c04f6 ("mm: memcontrol: try harder to set a new memory.high")
> Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>

Reviewed-by: Shakeel Butt <shakeelb@google.com>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] mm: memcontrol: restore proper dirty throttling when memory.high changes
@ 2020-07-28 15:07   ` Shakeel Butt
  0 siblings, 0 replies; 8+ messages in thread
From: Shakeel Butt @ 2020-07-28 15:07 UTC (permalink / raw)
  To: Johannes Weiner
  Cc: Andrew Morton, Michal Hocko, Roman Gushchin, Linux MM, Cgroups,
	LKML, Kernel Team

On Tue, Jul 28, 2020 at 6:53 AM Johannes Weiner <hannes@cmpxchg.org> wrote:
>
> Commit 8c8c383c04f6 ("mm: memcontrol: try harder to set a new
> memory.high") inadvertently removed a callback to recalculate the
> writeback cache size in light of a newly configured memory.high limit.
>
> Without letting the writeback cache know about a potentially heavily
> reduced limit, it may permit too many dirty pages, which can cause
> unnecessary reclaim latencies or even avoidable OOM situations.
>
> This was spotted while reading the code, it hasn't knowingly caused
> any problems in practice so far.
>
> Fixes: 8c8c383c04f6 ("mm: memcontrol: try harder to set a new memory.high")
> Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>

Reviewed-by: Shakeel Butt <shakeelb@google.com>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] mm: memcontrol: restore proper dirty throttling when memory.high changes
@ 2020-07-31  8:18   ` Michal Hocko
  0 siblings, 0 replies; 8+ messages in thread
From: Michal Hocko @ 2020-07-31  8:18 UTC (permalink / raw)
  To: Johannes Weiner
  Cc: Andrew Morton, Roman Gushchin, linux-mm, cgroups, linux-kernel,
	kernel-team

On Tue 28-07-20 09:52:09, Johannes Weiner wrote:
> Commit 8c8c383c04f6 ("mm: memcontrol: try harder to set a new
> memory.high") inadvertently removed a callback to recalculate the
> writeback cache size in light of a newly configured memory.high limit.
> 
> Without letting the writeback cache know about a potentially heavily
> reduced limit, it may permit too many dirty pages, which can cause
> unnecessary reclaim latencies or even avoidable OOM situations.
> 
> This was spotted while reading the code, it hasn't knowingly caused
> any problems in practice so far.
> 
> Fixes: 8c8c383c04f6 ("mm: memcontrol: try harder to set a new memory.high")
> Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>

Acked-by: Michal Hocko <mhocko@suse.com>

> ---
>  mm/memcontrol.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> index 13f559af1ab6..805a44bf948c 100644
> --- a/mm/memcontrol.c
> +++ b/mm/memcontrol.c
> @@ -6071,6 +6071,7 @@ static ssize_t memory_high_write(struct kernfs_open_file *of,
>  			break;
>  	}
>  
> +	memcg_wb_domain_size_changed(memcg);
>  	return nbytes;
>  }
>  
> -- 
> 2.27.0

-- 
Michal Hocko
SUSE Labs

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] mm: memcontrol: restore proper dirty throttling when memory.high changes
@ 2020-07-31  8:18   ` Michal Hocko
  0 siblings, 0 replies; 8+ messages in thread
From: Michal Hocko @ 2020-07-31  8:18 UTC (permalink / raw)
  To: Johannes Weiner
  Cc: Andrew Morton, Roman Gushchin, linux-mm-Bw31MaZKKs3YtjvyW6yDsg,
	cgroups-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, kernel-team-b10kYP2dOMg

On Tue 28-07-20 09:52:09, Johannes Weiner wrote:
> Commit 8c8c383c04f6 ("mm: memcontrol: try harder to set a new
> memory.high") inadvertently removed a callback to recalculate the
> writeback cache size in light of a newly configured memory.high limit.
> 
> Without letting the writeback cache know about a potentially heavily
> reduced limit, it may permit too many dirty pages, which can cause
> unnecessary reclaim latencies or even avoidable OOM situations.
> 
> This was spotted while reading the code, it hasn't knowingly caused
> any problems in practice so far.
> 
> Fixes: 8c8c383c04f6 ("mm: memcontrol: try harder to set a new memory.high")
> Signed-off-by: Johannes Weiner <hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org>

Acked-by: Michal Hocko <mhocko-IBi9RG/b67k@public.gmane.org>

> ---
>  mm/memcontrol.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> index 13f559af1ab6..805a44bf948c 100644
> --- a/mm/memcontrol.c
> +++ b/mm/memcontrol.c
> @@ -6071,6 +6071,7 @@ static ssize_t memory_high_write(struct kernfs_open_file *of,
>  			break;
>  	}
>  
> +	memcg_wb_domain_size_changed(memcg);
>  	return nbytes;
>  }
>  
> -- 
> 2.27.0

-- 
Michal Hocko
SUSE Labs

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-07-31  8:18 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-28 13:52 [PATCH] mm: memcontrol: restore proper dirty throttling when memory.high changes Johannes Weiner
2020-07-28 13:52 ` Johannes Weiner
2020-07-28 14:07 ` Chris Down
2020-07-28 14:07   ` Chris Down
2020-07-28 15:07 ` Shakeel Butt
2020-07-28 15:07   ` Shakeel Butt
2020-07-31  8:18 ` Michal Hocko
2020-07-31  8:18   ` Michal Hocko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.