From: Ian Campbell Subject: Re: [PATCH] xl: Suppress spurious warning message for cpupool-list Date: Fri, 17 Aug 2012 09:23:36 +0100 Message-ID: <1345191816.30865.82.camel@zakaz.uk.xensource.com> References: <0982bad392e4f96fb39a.1345022903@elijah> <1345191671.30865.81.camel@zakaz.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1345191671.30865.81.camel@zakaz.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: George Dunlap Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org On Fri, 2012-08-17 at 09:21 +0100, Ian Campbell wrote: > On Wed, 2012-08-15 at 10:28 +0100, George Dunlap wrote: > > # HG changeset patch > > # User George Dunlap > > # Date 1345022863 -3600 > > # Node ID 0982bad392e4f96fb39a025d6528c33be32c6c04 > > # Parent dc56a9defa30312a46cfb6ddb578e64cfbc6bc8b > > xl: Suppress spurious warning message for cpupool-list > > > > libxl_cpupool_list() enumerates the cpupools by "probing": calling > > cpupool_info, starting at 0 and stopping when it gets an error. However, > > cpupool_info will print an error when the call to xc_cpupool_getinfo() fails, > > resulting in every xl command that uses libxl_list_cpupool (such as > > cpupool-list) printing that error message spuriously. > > I see: > # xl -vvv cpupool-list > Name CPUs Sched Active Domain count > Pool-0 4 credit y 2 > xc: debug: hypercall buffer: total allocations:5 total releases:5 > xc: debug: hypercall buffer: current allocations:0 maximum allocations:2 > xc: debug: hypercall buffer: cache current size:2 > xc: debug: hypercall buffer: cache hits:3 misses:2 toobig:0 > > which doesn't seem to include the error message. However by code > inspection I'm sure I should be seeing what you describe. WTF? Nevermind this bit, I'd forgotten I'd stuck 4.1 on my test box... > > > This patch adds a "probe" argument to cpupool_info(). If set, it won't print > > a warning if the xc_cpupool_getinfo() fails with ENOENT. > > Looking at the callers I think the existing "exact" parameter could be > used instead of a new param -- it would be fine to fail silently on > ENOENT iff !exact, I think. > > Ian.