linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] memcg: simplify LRU handling.
@ 2011-12-14  7:47 KAMEZAWA Hiroyuki
  2011-12-14  7:49 ` [PATCH 1/4] memcg: simplify page cache charging KAMEZAWA Hiroyuki
                   ` (4 more replies)
  0 siblings, 5 replies; 22+ messages in thread
From: KAMEZAWA Hiroyuki @ 2011-12-14  7:47 UTC (permalink / raw)
  To: linux-mm@kvack.org
  Cc: linux-kernel@vger.kernel.org, hannes@cmpxchg.org, Michal Hocko,
	akpm@linux-foundation.org, Hugh Dickins, Ying Han


This series is onto linux-next + 
memcg-add-mem_cgroup_replace_page_cache-to-fix-lru-issue.patch

The 1st purpose of this patch is reduce overheads of mem_cgroup_add/del_lru.
They uses some atomic ops. After this patch, lru handling routine will be

==
struct lruvec *mem_cgroup_lru_add_list(struct zone *zone, struct page *page,
                                       enum lru_list lru)
{
        struct mem_cgroup_per_zone *mz;
        struct mem_cgroup *memcg;
        struct page_cgroup *pc;

        if (mem_cgroup_disabled())
                return &zone->lruvec;

        pc = lookup_page_cgroup(page);
        memcg = pc->mem_cgroup;
        VM_BUG_ON(!memcg);
        mz = page_cgroup_zoneinfo(memcg, page);
        /* compound_order() is stabilized through lru_lock */
        MEM_CGROUP_ZSTAT(mz, lru) += 1 << compound_order(page);
        return &mz->lruvec;
}
==

simple and no atomic ops. Because of Johannes works in linux-next,
this can be archived by very straightforward way.

Thanks,
-Kame


--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

end of thread, other threads:[~2011-12-21  6:56 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-14  7:47 [PATCH 0/4] memcg: simplify LRU handling KAMEZAWA Hiroyuki
2011-12-14  7:49 ` [PATCH 1/4] memcg: simplify page cache charging KAMEZAWA Hiroyuki
2011-12-16 22:28   ` Andrew Morton
2011-12-19  0:01     ` KAMEZAWA Hiroyuki
2011-12-20 21:58       ` Andrew Morton
2011-12-21  0:01         ` KAMEZAWA Hiroyuki
2011-12-19 15:04   ` Johannes Weiner
2011-12-20 15:33   ` Michal Hocko
2011-12-14  7:50 ` [PATCH 2/4] memcg: simplify corner case handling of LRU KAMEZAWA Hiroyuki
2011-12-19 15:14   ` Johannes Weiner
2011-12-20 15:05   ` Michal Hocko
2011-12-14  7:51 ` [PATCH 3/4] memcg: clear pc->mem_cgorup if necessary KAMEZAWA Hiroyuki
2011-12-16 22:30   ` Andrew Morton
2011-12-19 15:37   ` Johannes Weiner
2011-12-20  0:35     ` Hiroyuki Kamezawa
2011-12-20 15:56   ` Michal Hocko
2011-12-14  7:52 ` [PATCH 4/4] memcg: simplify LRU handling by new rule KAMEZAWA Hiroyuki
2011-12-19 15:48   ` Johannes Weiner
2011-12-20 16:16   ` Michal Hocko
2011-12-21  0:09     ` KAMEZAWA Hiroyuki
2011-12-21  6:56       ` Michal Hocko
2011-12-19 15:56 ` [PATCH 0/4] memcg: simplify LRU handling Johannes Weiner

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).