Messages in this thread | | | Date | Mon, 10 Jan 2011 14:35:03 +0530 | From | Balbir Singh <> | Subject | Re: [BUGFIX][PATCH v4] memcg: fix memory migration of shmem swapcache |
| |
* nishimura@mxp.nes.nec.co.jp <nishimura@mxp.nes.nec.co.jp> [2011-01-06 15:29:11]:
> > Sorry for nit-picking but succeed is not as good as succeeded, > > successful, successful_migration or migration_ok > > > OK, I use "migration_ok". > > === > From: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp> > > In current implimentation, mem_cgroup_end_migration() decides whether the page > migration has succeeded or not by checking "oldpage->mapping". > > But if we are tring to migrate a shmem swapcache, the page->mapping of it is > NULL from the begining, so the check would be invalid. > As a result, mem_cgroup_end_migration() assumes the migration has succeeded > even if it's not, so "newpage" would be freed while it's not uncharged. > > This patch fixes it by passing mem_cgroup_end_migration() the result of the > page migration. > > Signed-off-by: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp> > Reviewed-by: Minchan Kim <minchan.kim@gmail.com> > Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Acked-by: Balbir Singh <balbir@linux.vnet.ibm.com>
-- Three Cheers, Balbir
| |