lkml.org 
[lkml]   [2019]   [Sep]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] memcg: Only record foreign writebacks with dirty pages when memcg is not disabled
On 09/23/19 at 04:30pm, Baoquan He wrote:

> ---
> include/linux/memcontrol.h | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h
> index ad8f1a397ae4..fa53f9d51205 100644
> --- a/include/linux/memcontrol.h
> +++ b/include/linux/memcontrol.h
> @@ -1261,7 +1261,8 @@ void mem_cgroup_track_foreign_dirty_slowpath(struct page *page,
> static inline void mem_cgroup_track_foreign_dirty(struct page *page,
> struct bdi_writeback *wb)
> {
> - if (unlikely(&page->mem_cgroup->css != wb->memcg_css))
> + if (unlikely(&page->mem_cgroup->css != wb->memcg_css)
> + && !mem_cgroup_disabled())

Sorry, this is the draft patch I was testing. Later I think this
had better be moved into mem_cgroup_track_foreign_dirty_slowpath().

Not very sure about this. Will send a v2 to match the patch log.

> mem_cgroup_track_foreign_dirty_slowpath(page, wb);
> }
>
> --
> 2.17.2
>

\
 
 \ /
  Last update: 2019-09-23 10:43    [W:1.276 / U:0.320 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site