lkml.org 
[lkml]   [2010]   [Mar]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2010-03-10 23:29    [W:0.126 / U:1.696 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site