[Devel] Re: [RFC][ only for review ] memory controller bacground reclaim [4/5] high/low watermark for memory controller

KAMEZAWA Hiroyuki kamezawa.hiroyu at jp.fujitsu.com
Wed Nov 28 17:20:44 PST 2007


On Wed, 28 Nov 2007 15:20:42 +0300
Pavel Emelyanov <xemul at openvz.org> wrote:
> > +	mem = mem_cgroup_from_cont(cont);
> > +	spin_lock_irqsave(&mem->res.lock, flags);
> > +	val = res_counter_get(&mem->res, RES_LIMIT);
> > +	if (val == (unsigned long long) LLONG_MAX) {
> > +		low = (unsigned long long) LLONG_MAX;
> > +		high = (unsigned long long) LLONG_MAX;
> > +	} else {
> > +		low = val * DEFAULT_WATERMARK_PERCENT_LOW / 100ULL;
> > +		high = val * DEFAULT_WATERMARK_PERCENT_HIGH / 100ULL;
> 
> BTW, I tried to compile such a code:
> 
> unsigned long long x, y;
> y = ...;
> x = y / 100ULL;
> 
> (similar to yours) and that's what I got:
> 
> kernel/built-in.o: In function `xxx':
> : undefined reference to `__udivdi3'
> 
> It looks like i386 doesn't have any support for ULL divisions.
> It doesn't have it in CPU, and I thought that it was some-how 
> emulated, but it is not...
> 
> Did I miss something?
> 
Ah, I didn't try i386...
But I'll drop this automatic watermark adjustment part.

Thanks,
-Kame

_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers




More information about the Devel mailing list