lkml.org 
[lkml]   [2015]   [May]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 11/51] memcg: implement mem_cgroup_css_from_page()
On Wed, May 27, 2015 at 12:13:44PM -0400, Tejun Heo wrote:
> From 26bab580abfc441c841c1983469b8b86f5a8ef5c Mon Sep 17 00:00:00 2001
> From: Tejun Heo <tj@kernel.org>
> Date: Wed, 27 May 2015 12:08:29 -0400
>
> Implement mem_cgroup_css_from_page() which returns the
> cgroup_subsys_state of the memcg associated with a given page. This
> will be used by cgroup writeback support.
>
> This function assumes that page->mem_cgroup association doesn't change
> until the page is released, which is true on the default hierarchy as
> long as mem_cgroup_migrate() is not used. As the only user of
> mem_cgroup_migrate() is FUSE which won't support cgroup writeback for
> the time being, this works for now, and mem_cgroup_migrate() will soon
> be updated so that the invariant actually holds.

Regular page migration uses mem_cgroup_migrate() as well, but it's not
a problem as it ensures that the old page doesn't have any outstanding
references at that point.

It's only replace_page_cache_page() that calls mem_cgroup_migrate() on
a live page breaking mem_cgroup_css_from_page().

So the page looks fine, I'd just update the culprit function in the
changelog and kerneldoc.


\
 
 \ /
  Last update: 2015-05-27 19:41    [W:0.109 / U:0.620 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site