On Wed, 28 Nov 2007 15:20:42 +0300
Pavel Emelyanov <[EMAIL PROTECTED]> 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
[EMAIL PROTECTED]
https://lists.linux-foundation.org/mailman/listinfo/containers

_______________________________________________
Devel mailing list
[email protected]
https://openvz.org/mailman/listinfo/devel

Reply via email to