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] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 13 Jun 2011 12:30:32 +0200
From:	Johannes Weiner <hannes@...xchg.org>
To:	Michal Hocko <mhocko@...e.cz>
Cc:	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
	Daisuke Nishimura <nishimura@....nes.nec.co.jp>,
	Balbir Singh <balbir@...ux.vnet.ibm.com>,
	Ying Han <yinghan@...gle.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Rik van Riel <riel@...hat.com>,
	Minchan Kim <minchan.kim@...il.com>,
	KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
	Mel Gorman <mgorman@...e.de>, Greg Thelen <gthelen@...gle.com>,
	Michel Lespinasse <walken@...gle.com>, linux-mm@...ck.org,
	linux-kernel@...r.kernel.org
Subject: Re: [patch 7/8] vmscan: memcg-aware unevictable page rescue scanner

On Mon, Jun 13, 2011 at 11:42:03AM +0200, Michal Hocko wrote:
> On Wed 01-06-11 08:25:18, Johannes Weiner wrote:
> > Once the per-memcg lru lists are exclusive, the unevictable page
> > rescue scanner can no longer work on the global zone lru lists.
> > 
> > This converts it to go through all memcgs and scan their respective
> > unevictable lists instead.
> > 
> > Signed-off-by: Johannes Weiner <hannes@...xchg.org>
> 
> Just a minor naming thing.
> 
> Other than that looks good to me.
> Reviewed-by: Michal Hocko <mhocko@...e.cz>
> 
> > --- a/include/linux/memcontrol.h
> > +++ b/include/linux/memcontrol.h
> [...]
> > +struct page *mem_cgroup_lru_to_page(struct zone *zone, struct mem_cgroup *mem,
> > +				    enum lru_list lru)
> > +{
> > +	struct mem_cgroup_per_zone *mz;
> > +	struct page_cgroup *pc;
> > +
> > +	mz = mem_cgroup_zoneinfo(mem, zone_to_nid(zone), zone_idx(zone));
> > +	pc = list_entry(mz->lists[lru].prev, struct page_cgroup, lru);
> > +	return lookup_cgroup_page(pc);
> > +}
> > +
> [...]
> > --- a/mm/vmscan.c
> > +++ b/mm/vmscan.c
> > @@ -3233,6 +3233,14 @@ void scan_mapping_unevictable_pages(struct address_space *mapping)
> >  
> >  }
> >  
> > +static struct page *lru_tailpage(struct zone *zone, struct mem_cgroup *mem,
> > +				 enum lru_list lru)
> > +{
> > +	if (mem)
> > +		return mem_cgroup_lru_to_page(zone, mem, lru);
> > +	return lru_to_page(&zone->lru[lru].list);
> > +}
> 
> Wouldn't it better to have those names consistent?
> mem_cgroup_lru_tailpage vs lru_tailpage?

It's bad naming alright, but what is the wrapper for both of them
supposed to be called then?

Note that this function is only temporary, though, that's why I did
not spent much time on looking for a better name.

When the per-memcg lru lists finally become exclusive, this is removed
and the function converted to work on lruvecs.

Would you be okay with just adding an /* XXX */ to the function in
this patch that mentions that it's only temporary?
--
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