Re: [PATCH 0/2] memcgroup: work better with tmpfs

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Hugh Dickins <hugh@...>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@...>, Andrew Morton <akpm@...>, <linux-kernel@...>
Date: Wednesday, December 19, 2007 - 1:53 am

Hugh Dickins wrote:

Hi, Hugh,

Thank you so much for the review, some comments below


We always call mem_cgroup_isolate_pages() from shrink_(in)active_pages
under spin_lock_irq of the zone's lru lock. That's the reason that we
don't explicitly use it in the routine.


Yes, it would be. After we've refactored the code, the new name makes sense.


We do that to ensure that we charge page cache pages only when the
accounting type is set to MEM_CGROUP_TYPE_ALL. If the type is anything
else, we ignore cached pages, we did not have MEM_CGROUP_TYPE_CACHED
initially when the patches went in.

 But there's only mem_cgroup_uncharge.

We use mem_cgroup_uncharge() everywhere. The reason being, we might
switch control type, we uncharge pages that have a page_cgroup
associated with them, hence once we;ve charged, uncharge does not
distinguish between charge types.


Very good catch! Will fix it.


Our cleanup in page_cache_uncharge() does take care of cleaning up the
page_cgroup. I think you've got it right, it should be a BUG_ON in
free_hot_cold_page()


Thanks for the detailed review and fixes.

-- 
	Warm Regards,
	Balbir Singh
	Linux Technology Center
	IBM, ISTL
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH 0/2] memcgroup: work better with tmpfs, Balbir Singh, (Wed Dec 19, 1:53 am)
Re: [PATCH 0/2] memcgroup: work better with tmpfs, Hugh Dickins, (Thu Dec 20, 12:36 pm)
Re: [PATCH 0/2] memcgroup: work better with tmpfs, Balbir Singh, (Thu Dec 20, 2:13 pm)