Re: [PATCH] memcg: clean up migration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> >> @@ -678,13 +675,11 @@ static int unmap_and_move(new_page_t get_new_page, unsigned long private,
> >> Â Â Â }
> >>
> >> Â Â Â /* charge against new page */
> >> - Â Â charge = mem_cgroup_prepare_migration(page, newpage, &mem, GFP_KERNEL);
> >> - Â Â if (charge == -ENOMEM) {
> >> - Â Â Â Â Â Â rc = -ENOMEM;
> >> + Â Â rc = mem_cgroup_prepare_migration(page, newpage, &mem, GFP_KERNEL);
> >> + Â Â if (rc)
> >> Â Â Â Â Â Â Â goto unlock;
> >> - Â Â }
> >> - Â Â BUG_ON(charge);
> >>
> >> + Â Â rc = -EAGAIN;
> >> Â Â Â if (PageWriteback(page)) {
> >> Â Â Â Â Â Â Â if (!force || !sync)
> >> Â Â Â Â Â Â Â Â Â Â Â goto uncharge;
> > How about
> >
> > Â Â Â Âif (mem_cgroup_prepare_migration(..)) {
> > Â Â Â Â Â Â Â Ârc = -ENOMEM;
> > Â Â Â Â Â Â Â Âgoto unlock;
> > Â Â Â Â}
> >
> > ?
> >
> > Re-setting "rc" to -EAGAIN is not necessary in this case.
> > "if (mem_cgroup_...)" is commonly used in many places.
> >
> It works now but Johannes doesn't like it and me, either.
> It makes unnecessary dependency which mem_cgroup_preparre_migration
> can't propagate error to migrate_pages.
> Although we don't need it, I want to remove such unnecessary dependency.
> 
I see.
Thank you for your explanation.

Daisuke Nishimura.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxxx  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]