Re: [patch] mm: memcontrol: fold mem_cgroup_start_move()/mem_cgroup_end_move()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Oct 23, 2014 at 05:56:07PM +0200, Michal Hocko wrote:
> On Thu 23-10-14 10:42:07, Johannes Weiner wrote:
> > Having these functions and their documentation split out and somewhere
> > makes it harder, not easier, to follow what's going on.
> > 
> > Inline them directly where charge moving is prepared and finished, and
> > put an explanation right next to it.
> 
> I do not see the open coded version much more readable or maintainable to be
> honest. mem_cgroup_{start,end}_move are a good markers of the transaction.

What transaction, though?  The names are really non-descript and they
actively hide what's going on.  mem_cgroup_start_move() could mean
anything that prepares for moving and it doesn't seem out of place in
can_attach().  atomic_inc(&memcg->moving_account) on the other hand is
much more specific and nicely shows that we are currently forcing the
page stat update slow path way too early.  There is no reason to make
it take the move_lock while we are still counting rss and precharging,
we are not actually moving charges and flipping pc->mem_cgroups yet.

[ I already have a patch to relocate it into mem_cgroup_move_charge(),
  but let's let the dust in -mm settle a bit first. :-) ]
--
To unsubscribe from this list: send the line "unsubscribe cgroups" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [Monitors]

  Powered by Linux