On Thu, 2016-03-10 at 22:50 +0000, Wei Liu wrote:
> On Thu, Mar 10, 2016 at 04:35:30PM -0600, Chong Li wrote:
> > On Tue, Mar 8, 2016 at 1:09 PM, Wei Liu <wei.l...@citrix.com>
> > wrote:
> > > > @@ -1163,6 +1173,96 @@ rt_dom_cntl(
> > > > 
> > > > +            /*
> > > > +             * We accept period/budget less than 100 us, but
> > > > will warn users about
> > > > +             * the large scheduling overhead due to it
> > > > +             */
> > > > +            if ( period < MICROSECS(100) || budget <
> > > > MICROSECS(100) )
> > > > +                printk("Warning: period or budget set to less
> > > > than 100us.\n"
> > > > +                       "This may result in high scheduling
> > > > overhead.\n");
> > > > +
> > > I'm not the maintainer, but I think having printk here is bad
> > > idea
> > > because the toolstack can then DoS the hypervisor.
> > > 
> > > 
> > > Wei.
> > So what function should I use here? I see many LOG() calls in
> > libxl,
> > but I'm not sure whether that can be used here.
> > 
> IMHO you just don't log anything here. System administrator probably
> won't see it anyway.
> 
> If you think this warning is really necessary, move it to xl.
> 
I do think it adds some value to have this. Moving the printing outside
of Xen would need exporting a symbol for the minimum budget/period that
we think are best chosen, but:
 - this is really an implementation details, that can (potentially)
   vary between different architectures, and change with future Xen 
   version;
 - it would mean to keep the hypervisor and tools symbols in sync. 

So, as I'm saying in another reply in this thread, I'd use a guest,
rate-limited, logging variant, and print it only once, as
countermeasure to log spamming problem.

Regards,
Dario
-- 
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://about.me/dario.faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)

Attachment: signature.asc
Description: This is a digitally signed message part

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

Reply via email to