[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150122085649.7dc79541@grimm.local.home>
Date: Thu, 22 Jan 2015 08:56:49 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: Andrew Cooper <andrew.cooper3@...rix.com>
Cc: "Luis R. Rodriguez" <mcgrof@...not-panic.com>,
<david.vrabel@...rix.com>, <konrad.wilk@...cle.com>,
<boris.ostrovsky@...cle.com>, <xen-devel@...ts.xenproject.org>,
<kvm@...r.kernel.org>, "Luis R. Rodriguez" <mcgrof@...e.com>,
<x86@...nel.org>, <linux-kernel@...r.kernel.org>,
Andy Lutomirski <luto@...capital.net>,
Ingo Molnar <mingo@...hat.com>,
Jan Beulich <JBeulich@...e.com>,
"H. Peter Anvin" <hpa@...or.com>,
Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>,
Thomas Gleixner <tglx@...utronix.de>,
Borislav Petkov <bp@...e.de>
Subject: Re: [Xen-devel] [RFC v3 2/2] x86/xen: allow privcmd hypercalls to
be preempted
On Thu, 22 Jan 2015 11:50:10 +0000
Andrew Cooper <andrew.cooper3@...rix.com> wrote:
> On 22/01/15 02:17, Luis R. Rodriguez wrote:
> > --- a/drivers/xen/events/events_base.c
> > +++ b/drivers/xen/events/events_base.c
> > @@ -32,6 +32,8 @@
> > #include <linux/slab.h>
> > #include <linux/irqnr.h>
> > #include <linux/pci.h>
> > +#include <linux/sched.h>
> > +#include <linux/kprobes.h>
> >
> > #ifdef CONFIG_X86
> > #include <asm/desc.h>
> > @@ -1243,6 +1245,17 @@ void xen_evtchn_do_upcall(struct pt_regs
> > *regs) set_irq_regs(old_regs);
> > }
> >
> > +notrace void xen_end_upcall(struct pt_regs *regs)
> > +{
> > + if (!xen_is_preemptible_hypercall(regs) ||
> > + __this_cpu_read(xed_nesting_count))
> > + return;
> > +
> > + if (_cond_resched())
> > + printk(KERN_DEBUG "xen hypercall preempted\n");
>
> I wouldn't even put this at debug level. On a large server with
> plenty of domains being created/migrated/destroyed, it is quite
> likely that a toolstack task might get preempted in this way.
>
> I don't believe the message is of any practical use.
>
Why not make this a tracepoint? Then you can enable it only when you
want to. As tracepoints are also hooks, you could add you own code that
hooks to it and does a printk as well. The advantage of doing it via a
tracepoint is that you can turn it on and off regardless of what the
loglevel is set at.
That is, if there is any practical use for that message. Tracing just
sched_switch will give you the same info.
-- Steve
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists