All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [Qemu-devel] [Xen-devel] Re: [PATCH] xen-mapcache: Fix rlimit set size.
@ 2011-08-03 14:42 ` Jan Beulich
  0 siblings, 0 replies; 7+ messages in thread
From: Jan Beulich @ 2011-08-03 14:42 UTC (permalink / raw)
  To: anthony.perard, Stefano.Stabellini; +Cc: xen-devel, qemu-devel, agraf

>>> Stefano Stabellini 08/03/11 12:01 AM >>> 
>if (rlimit_as.rlim_max < MCACHE_MAX_SIZE) { 

This condition minimally needs to include what Anthony's original version had.

>if (qemu is priviledged) { 
>rlimit_as.rlim_max = RLIM_INFINITY; 
>rlimit_as.rlim_cur = RLIM_INFINITY; 
>} else { 
>print a warning 
>mapcache->max_mcache_size = rlimit_as.rlim_cur - NON_MCACHE_MEMORY_SIZE; 
>rlimit_as.rlim_cur = rlimit_as.rlim_max; 
>} 
>} else { 

Not printing a warning here means that there are still cases where the
fuzzy upper bound may not be precise enough anymore (hence causing
silent failure). I think the privileged case needs to be handled without
any other surrounding condition, and the warning ought to be prinited
in any case in the non-privileged case.

>rlimit_as.rlim_cur = rlimit_as.rlim_max; 
>} 

Jan

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-08-16 18:15 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-03 14:42 [Qemu-devel] [Xen-devel] Re: [PATCH] xen-mapcache: Fix rlimit set size Jan Beulich
2011-08-03 14:42 ` Jan Beulich
2011-08-03 20:57 ` [Qemu-devel] " Stefano Stabellini
2011-08-03 20:57   ` Stefano Stabellini
2011-08-04 18:44   ` hvm_domain_use_pirq() breaks device passthru on xen-4.1 Wei Huang
2011-08-08  7:36     ` Jan Beulich
2011-08-16 18:15     ` Stefano Stabellini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.