[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20101012033915.GA25875@balbir.in.ibm.com>
Date: Tue, 12 Oct 2010 09:09:15 +0530
From: Balbir Singh <balbir@...ux.vnet.ibm.com>
To: KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Daisuke Nishimura <nishimura@....nes.nec.co.jp>,
Minchan Kim <minchan.kim@...il.com>,
Greg Thelen <gthelen@...gle.com>, linux-kernel@...r.kernel.org,
linux-mm@...ck.org, containers@...ts.osdl.org,
Andrea Righi <arighi@...eler.com>
Subject: Re: [PATCH v2] memcg: reduce lock time at move charge (Was Re:
[PATCH 04/10] memcg: disable local interrupts in lock_page_cgroup()
* KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com> [2010-10-08 19:41:31]:
> On Fri, 8 Oct 2010 14:12:01 +0900
> KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com> wrote:
> > > Sure. It walks the same data three times, potentially causing
> > > thrashing in the L1 cache.
> >
> > Hmm, make this 2 times, at least.
> >
> How about this ?
> ==
> From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
>
> Presently, at task migration among cgroups, memory cgroup scans page tables and
> moves accounting if flags are properly set.
>
>
> The core code, mem_cgroup_move_charge_pte_range() does
>
> pte_offset_map_lock();
> for all ptes in a page table:
> 1. look into page table, find_and_get a page
> 2. remove it from LRU.
> 3. move charge.
> 4. putback to LRU. put_page()
> pte_offset_map_unlock();
>
> for pte entries on a 3rd level? page table.
>
> As a planned updates, we'll support dirty-page accounting. Because move_charge()
> is highly race, we need to add more check in move_charge.
> For example, lock_page();-> wait_on_page_writeback();-> unlock_page();
> is an candidate for new check.
>
Is this a change to help dirty limits or is it a generic bug fix.
--
Three Cheers,
Balbir
--
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