lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Mon, 28 Feb 2011 11:40:06 +0900
From:	Daisuke Nishimura <nishimura@....nes.nec.co.jp>
To:	Minchan Kim <minchan.kim@...il.com>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	linux-mm <linux-mm@...ck.org>,
	LKML <linux-kernel@...r.kernel.org>,
	Johannes Weiner <hannes@...xchg.org>,
	Balbir Singh <balbir@...ux.vnet.ibm.com>,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
	Daisuke Nishimura <nishimura@....nes.nec.co.jp>
Subject: Re: [PATCH] memcg: clean up migration

> >> @@ -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 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

Powered by Openwall GNU/*/Linux Powered by OpenVZ