[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH 2/7] qemu: Abstract code for memory controller setting into a helper



On Tue, May 21, 2013 at 04:56:37PM +0200, Viktor Mihajlovski wrote:
> On 05/20/2013 01:35 PM, Osier Yang wrote:
> >>>(!virCgroupHasController(priv->cgroup,VIR_CGROUP_CONTROLLER_MEMORY)) {
> >>>+        if (vm->def->mem.hard_limit != 0 ||
> >>>+            vm->def->mem.soft_limit != 0 ||
> >>>+            vm->def->mem.swap_hard_limit != 0) {
> >>>+            virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
> >>>+                           _("Memory cgroup is not available on this
> >>>host"));
> >>>+            return -1;
> >>>+        } else {
> >>>+            VIR_WARN("Could not autoset a RSS limit for domain %s",
> >>>vm->def->name);
> >>>+            return 0;
> >>>+        }
> >>Not sure why we need this VIR_WARN at all. If no limits are set in the
> >>XML,
> >>then we should not warn about a missing feature that we don't actually
> >>need.
> >
> >Agreed. Having a warning for no XML config is confused. I removed it.
> 
> We may not need the warning, but the return 0 must stay. I can't start
> guests on my system with no memory controller after this commit.

Yes, absolutely. I only suggested killing the warning, the 'return 0'
must remain for sure.


Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]