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:	Fri, 4 Sep 2009 14:26:54 +0900
From:	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
To:	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
Cc:	Daisuke Nishimura <nishimura@....nes.nec.co.jp>,
	"linux-mm@...ck.org" <linux-mm@...ck.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"balbir@...ux.vnet.ibm.com" <balbir@...ux.vnet.ibm.com>,
	"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>
Subject: Re: [mmotm][experimental][PATCH] coalescing charge

On Fri, 4 Sep 2009 14:21:43 +0900
KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com> wrote:

> On Fri, 4 Sep 2009 14:11:57 +0900
> Daisuke Nishimura <nishimura@....nes.nec.co.jp> wrote:
> 
> > > > > Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
> > > > It looks basically good. I'll do some tests with all patches applied.
> > > > 
> > > thanks.
> > > 
> > it seems that these patches make rmdir stall again...
> > This batched charge patch seems not to be the (only) suspect, though.
> > 
> Ouch, no probelm with the latest mmotm ? I think this charge-uncharge-offload
> patch set doesn't use css_set()/get()...
> Hm, softlimit related parts ?
> 
Ah, one more question. What memory.usage_in_bytes shows in that case ?
If not zero, charge/uncharge coalescing is guilty.

Thanks,
-Kame


> 
> > > > > @@ -1288,23 +1364,25 @@ static int __mem_cgroup_try_charge(struc
> > > > >  		return 0;
> > > > >  
> > > > >  	VM_BUG_ON(css_is_removed(&mem->css));
> > > > > +	if (mem_cgroup_is_root(mem))
> > > > > +		goto done;
> > > > > +	if (consume_stock(mem))
> > > > > +		goto charged;
> > > > >  
> > IMHO, it would be better to check consume_stock() every time in the while loop below,
> > because someone might have already refilled the stock while the current context
> > sleeps in reclaiming memory.
> > 
> Hm, make sense. I'll add it.
> 
> 
> > > > >  	while (1) {
> > > > >  		int ret = 0;
> > > > >  		unsigned long flags = 0;
> > > > >  
> > > > > -		if (mem_cgroup_is_root(mem))
> > > > > -			goto done;
> > > > > -		ret = res_counter_charge(&mem->res, PAGE_SIZE, &fail_res);
> > > > > +		ret = res_counter_charge(&mem->res, CHARGE_SIZE, &fail_res);
> > > > >  		if (likely(!ret)) {
> > > > >  			if (!do_swap_account)
> > > > >  				break;
> > > > > -			ret = res_counter_charge(&mem->memsw, PAGE_SIZE,
> > > > > +			ret = res_counter_charge(&mem->memsw, CHARGE_SIZE,
> > > > >  							&fail_res);
> > > > >  			if (likely(!ret))
> > > > >  				break;
> > > > >  			/* mem+swap counter fails */
> > > > > -			res_counter_uncharge(&mem->res, PAGE_SIZE);
> > > > > +			res_counter_uncharge(&mem->res, CHARGE_SIZE);
> > > > >  			flags |= MEM_CGROUP_RECLAIM_NOSWAP;
> > > > >  			mem_over_limit = mem_cgroup_from_res_counter(fail_res,
> > > > >  									memsw);
> > How about changing pre-charge size according to the loop count ?
> > IMHO, it would be better to disable pre-charge at least in nr_retries==0 case,
> > i.e. it is about to causing oom.
> 
> ya, I wonder I should do that. but it increases complexity if in bad conding.
> let me try.
> 
> Thanks,
> -Kame
> 
> > 
> > 
> > P.S. I will not be so active next week.
> > 
> > Thanks,
> > Daisuke Nishimura.
> > 
> 
> --
> To unsubscribe, send a message with 'unsubscribe linux-mm' in
> the body to majordomo@...ck.org.  For more info on Linux MM,
> see: http://www.linux-mm.org/ .
> Don't email: <a href=mailto:"dont@...ck.org"> email@...ck.org </a>
> 

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