LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [RFC][PATCH 0/6] memcg updates (05/Nov)
@ 2008-11-05  8:16 KAMEZAWA Hiroyuki
  2008-11-05  8:18 ` [RFC][PATCH 1/6] memcg: move all accounts to parent at rmdir() KAMEZAWA Hiroyuki
                   ` (6 more replies)
  0 siblings, 7 replies; 28+ messages in thread
From: KAMEZAWA Hiroyuki @ 2008-11-05  8:16 UTC (permalink / raw)
  To: linux-mm; +Cc: linux-kernel, balbir, menage, nishimura

Weekly (RFC) update for memcg.

This set includes

1. change force_empty to do move account rather than forget all
2. swap cache handling
3. mem+swap controller kconfig
4. swap_cgroup for rememver swap account information
5. mem+swap controller core
6. synchronize memcg's LRU and global LRU.

"1" is already sent, "6" is a newcomer.
I'd like to push out "2" or "2-5" in the next week (if no bugs.)

after 6, next candidates are
  - dirty_ratio handler
  - account move at task move.

Some more explanation about purpose of "6". (see details in patch itself)
Now, one of complicated logic in memcg is LRU handling. Because the place of
lru_head depends on page_cgroup->mem_cgroup pointer, we have to take
lock as following even under zone->lru_lock.
==
  pc = lookup_page_cgroup(page);
  if (!trylock_page_cgroup(pc))
  	return -EBUSY;

   if (PageCgroupUsed(pc)) {
	struct mem_cgroup_per_zone *mz = page_cgroup_zoneinfo(pc);
	spin_lock_irqsave(&mz->lru_lock, flags);
	....some operation on LRU.
	spin_unlock_irqrestore(&mz->lru_lock, flags);
   }
   unlock_page_cgroup(pc);
==
Sigh..

After "6", page_cgroup's LRU management can be done independently to some extent.
== as
  (zone->lru_lock is held here)
  pc = lookup_page_cgroup(page);
  list operation on pc.
  (unlock zone->lru_lock)
==
Maybe good for maintainance and as a bonus, we can make use of isolate_lru_page() when
doing some racy operation.

	isolate_lru_page(page);
	pc = lookup_page_cgroup(page);
	do some jobs.
	putback_lru_page(page);

Maybe this will be a help to implement "account move at task move".

Thanks,
-Kame





^ permalink raw reply	[flat|nested] 28+ messages in thread
* [RFC][PATCH 0/6] memcg updates (12/Nov/2008)
@ 2008-11-12  3:26 KAMEZAWA Hiroyuki
  2008-11-12  3:32 ` [RFC][PATCH 6/6] memcg: synchronized LRU KAMEZAWA Hiroyuki
  0 siblings, 1 reply; 28+ messages in thread
From: KAMEZAWA Hiroyuki @ 2008-11-12  3:26 UTC (permalink / raw)
  To: linux-mm; +Cc: linux-kernel, balbir, nishimura, menage

Weekly updates on my queue.

Changes from previous (05/Nov)
 - added "free all at rmdir" patch.
 - fixed several bugs reported by Nishimura (Thanks!)
 - many style bugs are fixed.

Brief description:
[1/6].. free all at rmdir (and add attribute to memcg.)
[2/6].. handle swap cache
[3/6].. mem+swap controller kconfig
[4/6].. swap_cgroup
[5/6].. mem+swap controller
[6/6].. synchrinized LRU (unify lru lock.)

I think it's near to a month to test this mem+swap controller internally.
It's getting better. Making progress in step by step works good.

I'll send [1/6] and [2/6] to Andrew, tomorrow or weekend.(please do final check).

If no acks to [1/6] (I haven't got any ;), I'll postpone it and reschedule as [7/6].

Thanks,
-Kame


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

end of thread, other threads:[~2008-11-12  3:32 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-05  8:16 [RFC][PATCH 0/6] memcg updates (05/Nov) KAMEZAWA Hiroyuki
2008-11-05  8:18 ` [RFC][PATCH 1/6] memcg: move all accounts to parent at rmdir() KAMEZAWA Hiroyuki
2008-11-05  8:20 ` [RFC][PATCH 2/6] memcg: handle swap cache KAMEZAWA Hiroyuki
2008-11-07  8:53   ` Daisuke Nishimura
2008-11-07  9:13     ` KAMEZAWA Hiroyuki
2008-11-05  8:20 ` [RFC][PATCH 3/6] memcg : mem+swap controller kconfig KAMEZAWA Hiroyuki
2008-11-06 11:07   ` Daisuke Nishimura
2008-11-05  8:21 ` [RFC][PATCH 4/6] memcg : swap cgroup KAMEZAWA Hiroyuki
2008-11-06 11:25   ` Daisuke Nishimura
2008-11-06 12:44     ` KAMEZAWA Hiroyuki
2008-11-07  1:19       ` Daisuke Nishimura
2008-11-05  8:23 ` [RFC][PATCH 5/6] memcg: mem+swap controller KAMEZAWA Hiroyuki
2008-11-07  9:02   ` Daisuke Nishimura
2008-11-07  9:19     ` KAMEZAWA Hiroyuki
2008-11-07 13:30       ` Daisuke Nishimura
2008-11-07 13:21   ` Daisuke Nishimura
2008-11-10  4:30   ` Daisuke Nishimura
2008-11-10  7:03     ` KAMEZAWA Hiroyuki
2008-11-05  8:24 ` [RFC][PATCH 6/6] memcg: synchronized LRU KAMEZAWA Hiroyuki
2008-11-06  6:54 ` [RFC][PATCH 0/6] memcg updates (05/Nov) Balbir Singh
2008-11-06  7:03   ` KAMEZAWA Hiroyuki
2008-11-06 10:41   ` [RFC][PATCH 7/6] memcg: add atribute (for change bahavior of rmdir) KAMEZAWA Hiroyuki
2008-11-06 11:59     ` Hugh Dickins
2008-11-06 12:47       ` [RFC][PATCH 7/6] memcg: add atribute (for change bahavior ofrmdir) KAMEZAWA Hiroyuki
2008-11-06 13:46     ` [RFC][PATCH 7/6] memcg: add atribute (for change bahavior of rmdir) Balbir Singh
2008-11-06 14:30       ` [RFC][PATCH 7/6] memcg: add atribute (for change bahavior ofrmdir) KAMEZAWA Hiroyuki
2008-11-07  1:12         ` KAMEZAWA Hiroyuki
2008-11-12  3:26 [RFC][PATCH 0/6] memcg updates (12/Nov/2008) KAMEZAWA Hiroyuki
2008-11-12  3:32 ` [RFC][PATCH 6/6] memcg: synchronized LRU KAMEZAWA Hiroyuki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).