[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100310222338.GB3009@redhat.com>
Date: Wed, 10 Mar 2010 17:23:39 -0500
From: Vivek Goyal <vgoyal@...hat.com>
To: Andrea Righi <arighi@...eler.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
Balbir Singh <balbir@...ux.vnet.ibm.com>,
Daisuke Nishimura <nishimura@....nes.nec.co.jp>,
Peter Zijlstra <peterz@...radead.org>,
Trond Myklebust <trond.myklebust@....uio.no>,
Suleiman Souhlal <suleiman@...gle.com>,
Greg Thelen <gthelen@...gle.com>,
"Kirill A. Shutemov" <kirill@...temov.name>,
Andrew Morton <akpm@...ux-foundation.org>,
containers@...ts.linux-foundation.org,
linux-kernel@...r.kernel.org, linux-mm@...ck.org
Subject: Re: [PATCH -mmotm 4/5] memcg: dirty pages accounting and limiting
infrastructure
On Wed, Mar 10, 2010 at 12:00:35AM +0100, Andrea Righi wrote:
[..]
> - * Currently used to update mapped file statistics, but the routine can be
> - * generalized to update other statistics as well.
> + * mem_cgroup_update_page_stat() - update memcg file cache's accounting
> + * @page: the page involved in a file cache operation.
> + * @idx: the particular file cache statistic.
> + * @charge: true to increment, false to decrement the statistic specified
> + * by @idx.
> + *
> + * Update memory cgroup file cache's accounting.
> */
> -void mem_cgroup_update_file_mapped(struct page *page, int val)
> +void mem_cgroup_update_page_stat(struct page *page,
> + enum mem_cgroup_write_page_stat_item idx, bool charge)
> {
> - struct mem_cgroup *mem;
> struct page_cgroup *pc;
> unsigned long flags;
>
> + if (mem_cgroup_disabled())
> + return;
> pc = lookup_page_cgroup(page);
> - if (unlikely(!pc))
> + if (unlikely(!pc) || !PageCgroupUsed(pc))
> return;
> -
> lock_page_cgroup(pc, flags);
> - mem = pc->mem_cgroup;
> - if (!mem)
> - goto done;
> -
> - if (!PageCgroupUsed(pc))
> - goto done;
> -
> - /*
> - * Preemption is already disabled. We can use __this_cpu_xxx
> - */
> - __this_cpu_add(mem->stat->count[MEM_CGROUP_STAT_FILE_MAPPED], val);
> -
> -done:
> + __mem_cgroup_update_page_stat(pc, idx, charge);
> unlock_page_cgroup(pc, flags);
> }
> +EXPORT_SYMBOL_GPL(mem_cgroup_update_page_stat_unlocked);
CC mm/memcontrol.o
mm/memcontrol.c:1600: error: ‘mem_cgroup_update_page_stat_unlocked’
undeclared here (not in a function)
mm/memcontrol.c:1600: warning: type defaults to ‘int’ in declaration of
‘mem_cgroup_update_page_stat_unlocked’
make[1]: *** [mm/memcontrol.o] Error 1
make: *** [mm] Error 2
Thanks
Vivek
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists