[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100223092853.GB1882@linux>
Date: Tue, 23 Feb 2010 10:28:53 +0100
From: Andrea Righi <arighi@...eler.com>
To: Balbir Singh <balbir@...ux.vnet.ibm.com>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
Cc: containers@...ts.linux-foundation.org,
linux-kernel@...r.kernel.org,
Suleiman Souhlal <suleiman@...gle.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Vivek Goyal <vgoyal@...hat.com>
Subject: Re: [PATCH 1/2] memcg: dirty pages accounting and limiting
infrastructure
On Mon, Feb 22, 2010 at 09:44:42PM +0530, Balbir Singh wrote:
[snip]
> > +void mem_cgroup_charge_dirty(struct page *page,
> > + enum zone_stat_item idx, int charge)
> > +{
> > + struct mem_cgroup *mem;
> > + struct mem_cgroup_stat_cpu *cpustat;
> > + unsigned long flags;
> > + int cpu;
> > +
> > + if (mem_cgroup_disabled())
> > + return;
> > + /* Translate the zone_stat_item into a mem_cgroup_stat_index */
> > + switch (idx) {
> > + case NR_FILE_DIRTY:
> > + idx = MEM_CGROUP_STAT_FILE_DIRTY;
> > + break;
> > + case NR_WRITEBACK:
> > + idx = MEM_CGROUP_STAT_WRITEBACK;
> > + break;
> > + case NR_WRITEBACK_TEMP:
> > + idx = MEM_CGROUP_STAT_WRITEBACK_TEMP;
> > + break;
> > + case NR_UNSTABLE_NFS:
> > + idx = MEM_CGROUP_STAT_UNSTABLE_NFS;
> > + break;
> > + default:
> > + return;
> > + }
> > + /* Charge the memory cgroup statistics */
> > + mem = get_mem_cgroup_from_page(page);
> > + if (!mem) {
> > + mem = root_mem_cgroup;
> > + css_get(&mem->css);
> > + }
> > +
> > + local_irq_save(flags);
> > + cpu = get_cpu();
>
> Kamezawa is in the process of changing these, so you might want to
> look at and integrate with those patches when they are ready.
OK, I'll rebase the patch to -mm. Are those changes already included in
mmotm?
Thanks,
-Andrea
--
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