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]
Message-Id: <20101215091209.8c757ad1.kamezawa.hiroyu@jp.fujitsu.com>
Date:	Wed, 15 Dec 2010 09:12:09 +0900
From:	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
To:	Andrea Arcangeli <aarcange@...hat.com>
Cc:	Mel Gorman <mel@....ul.ie>, linux-mm@...ck.org,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org,
	Marcelo Tosatti <mtosatti@...hat.com>,
	Adam Litke <agl@...ibm.com>, Avi Kivity <avi@...hat.com>,
	Hugh Dickins <hugh.dickins@...cali.co.uk>,
	Rik van Riel <riel@...hat.com>,
	Dave Hansen <dave@...ux.vnet.ibm.com>,
	Benjamin Herrenschmidt <benh@...nel.crashing.org>,
	Ingo Molnar <mingo@...e.hu>, Mike Travis <travis@....com>,
	Christoph Lameter <cl@...ux-foundation.org>,
	Chris Wright <chrisw@...s-sol.org>, bpicco@...hat.com,
	KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
	Balbir Singh <balbir@...ux.vnet.ibm.com>,
	"Michael S. Tsirkin" <mst@...hat.com>,
	Peter Zijlstra <peterz@...radead.org>,
	Johannes Weiner <hannes@...xchg.org>,
	Daisuke Nishimura <nishimura@....nes.nec.co.jp>,
	Chris Mason <chris.mason@...cle.com>,
	Borislav Petkov <bp@...en8.de>
Subject: Re: [PATCH 36 of 66] memcg compound

On Tue, 14 Dec 2010 18:38:17 +0100
Andrea Arcangeli <aarcange@...hat.com> wrote:
 
> > > > @@ -2491,14 +2503,14 @@ __do_uncharge(struct mem_cgroup *mem, co
> > > >  	if (batch->memcg != mem)
> > > >  		goto direct_uncharge;
> > > >  	/* remember freed charge and uncharge it later */
> > > > -	batch->bytes += PAGE_SIZE;
> > > > +	batch->bytes += page_size;
> > 
> > Hmm, isn't it simpler to avoid batched-uncharge when page_size > PAGE_SIZE ?
> 
> As you wish, so I'm changing it like this.
> 
> archs where the pmd is implemented purely in software might actually
> be able to use page sizes smaller than 2M that may make sense to
> batch, but for now if you think this is simpler I'll go for it. We
> need simple.
> 

Thank you. Hmm,..seems not very simple :( I'm sorry.
Please do as you want.

-Kame

> diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> --- a/mm/memcontrol.c
> +++ b/mm/memcontrol.c
> @@ -2503,6 +2503,9 @@ __do_uncharge(struct mem_cgroup *mem, co
>  	if (!batch->do_batch || test_thread_flag(TIF_MEMDIE))
>  		goto direct_uncharge;
>  
> +	if (page_size != PAGE_SIZE)
> +		goto direct_uncharge;
> +
>  	/*
>  	 * In typical case, batch->memcg == mem. This means we can
>  	 * merge a series of uncharges to an uncharge of res_counter.
> @@ -2511,9 +2514,9 @@ __do_uncharge(struct mem_cgroup *mem, co
>  	if (batch->memcg != mem)
>  		goto direct_uncharge;
>  	/* remember freed charge and uncharge it later */
> -	batch->bytes += page_size;
> +	batch->bytes += PAGE_SIZE;
>  	if (uncharge_memsw)
> -		batch->memsw_bytes += page_size;
> +		batch->memsw_bytes += PAGE_SIZE;
>  	return;
>  direct_uncharge:
>  	res_counter_uncharge(&mem->res, page_size);
> 
> 

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