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

Re: [Xen-devel] Question to Xen log level in the case of PT



>>> On 08.09.15 at 08:53, <tiejun.chen@xxxxxxxxx> wrote:
> When I passthrough a device like IGD, I can see so many messages:
> 
> "memory_map:add:...." and "memory_map:remove:"
> 
> since we have to add/remove all pages map residing PCI bar. Especially 
> as a graphic device, oftentimes this range would occupy dozens of MB, 
> even hundreds of MB. These print messages consume a lot of time to boot 
> a VM. For instance, it takes about 5 minutes to boot a Windows guest on 
> my BDW. But if I remove these output simply like this,
> 
> diff --git a/xen/common/domctl.c b/xen/common/domctl.c
> index 7f959f3..82da9d1 100644
> --- a/xen/common/domctl.c
> +++ b/xen/common/domctl.c
> @@ -1049,10 +1049,6 @@ long do_domctl(XEN_GUEST_HANDLE_PARAM(xen_domctl_t) 
> u_domctl)
> 
>           if ( add )
>           {
> -            printk(XENLOG_G_INFO
> -                   "memory_map:add: dom%d gfn=%lx mfn=%lx nr=%lx\n",
> -                   d->domain_id, gfn, mfn, nr_mfns);
> -
>               ret = map_mmio_regions(d, gfn, nr_mfns, mfn);
>               if ( ret )
>                   printk(XENLOG_G_WARNING
> @@ -1061,10 +1057,6 @@ long do_domctl(XEN_GUEST_HANDLE_PARAM(xen_domctl_t) 
> u_domctl)
>           }
>           else
>           {
> -            printk(XENLOG_G_INFO
> -                   "memory_map:remove: dom%d gfn=%lx mfn=%lx nr=%lx\n",
> -                   d->domain_id, gfn, mfn, nr_mfns);
> -
>               ret = unmap_mmio_regions(d, gfn, nr_mfns, mfn);
>               if ( ret && is_hardware_domain(current->domain) )
>                   printk(XENLOG_ERR
> 
> its down to a half, about 2.5 minutes.
> 
> I know I can't delete this directly. But currently there are four log 
> level on Xen side,
> 
>   *   XENLOG_ERR: Fatal errors, either Xen, Guest or Dom0
>   *               is about to crash.
>   *
>   *   XENLOG_WARNING: Something bad happened, but we can recover.
>   *
>   *   XENLOG_INFO: Interesting stuff, but not too noisy.
>   *
>   *   XENLOG_DEBUG: Use where ever you like. Lots of noise.
> 
> looks I have to change XENLOG_G_INFO to XENLOG_G_WARNING but its not 
> appropriate here.

???

> So can Xen change log level dynamically like Linux? If yes, we might 
> change this level temporarily while passing through IGD. If not, any 
> suggestion?

First of all you could boot without lowering the log level (non-debug
builds) or raising the log level ("loglvl=warning"; debug builds). But
that would change the log level for the entire session, which may
not be what you're after. I too realized that having a way to
dynamically adjust the log level would be useful occasionally. For
post-4.6 I have a patch (attached) ready allowing to do so in a
limited way from the serial console (and hence also via "xl debug-key").
As you'll see in there I also took note of it probably being desirable
to have a sysctl (and then a wrapping xl command) to full control the
log level. I didn't get around to implement that yet.

Otoh the specific messages you cite are of quite questionable use
in the first place. I certainly would welcome a patch lowering their
priority to XENLOG_G_DEBUG (which however would still not
change behavior in the default debug build case).

Jan

Attachment: loglvl-adjust.patch
Description: Text document

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.