Re: [Xen-devel] [RFC v3 2/2] x86/xen: allow privcmd hypercalls to be preempted

2015-01-22 Thread Julien Grall
Hi Luis, On 22/01/15 02:17, Luis R. Rodriguez wrote: diff --git a/drivers/xen/events/events_base.c b/drivers/xen/events/events_base.c index b4bca2d..23c526b 100644 --- a/drivers/xen/events/events_base.c +++ b/drivers/xen/events/events_base.c @@ -32,6 +32,8 @@ #include linux/slab.h

Re: [Xen-devel] [RFC v3 2/2] x86/xen: allow privcmd hypercalls to be preempted

2015-01-22 Thread David Vrabel
On 22/01/15 03:18, Andy Lutomirski 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

Re: [Xen-devel] [RFC v3 2/2] x86/xen: allow privcmd hypercalls to be preempted

2015-01-22 Thread Andrew Cooper
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

Re: [Xen-devel] [RFC v3 2/2] x86/xen: allow privcmd hypercalls to be preempted

2015-01-22 Thread Luis R. Rodriguez
On Thu, Jan 22, 2015 at 08:56:49AM -0500, Steven Rostedt wrote: On Thu, 22 Jan 2015 11:50:10 + Andrew Cooper andrew.coop...@citrix.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

Re: [Xen-devel] [RFC v3 2/2] x86/xen: allow privcmd hypercalls to be preempted

2015-01-22 Thread Luis R. Rodriguez
On Thu, Jan 22, 2015 at 11:50:10AM +, Andrew Cooper 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

Re: [Xen-devel] [RFC v3 2/2] x86/xen: allow privcmd hypercalls to be preempted

2015-01-22 Thread Andrew Cooper
On 22/01/2015 20:58, Andy Lutomirski wrote: On Thu, Jan 22, 2015 at 12:37 PM, Steven Rostedt rost...@goodmis.org wrote: On Thu, 22 Jan 2015 12:24:47 -0800 Andy Lutomirski l...@amacapital.net wrote: Also, please remove the notrace, because function tracing goes an extra step to not require

Re: [Xen-devel] [RFC v3 2/2] x86/xen: allow privcmd hypercalls to be preempted

2015-01-22 Thread Luis R. Rodriguez
On Wed, Jan 21, 2015 at 07:18:46PM -0800, Andy Lutomirski wrote: On Wed, Jan 21, 2015 at 6:17 PM, Luis R. Rodriguez mcg...@do-not-panic.com wrote: From: Luis R. Rodriguez mcg...@suse.com Xen has support for splitting heavy work work into a series of hypercalls, called multicalls, and

Re: [Xen-devel] [RFC v3 2/2] x86/xen: allow privcmd hypercalls to be preempted

2015-01-22 Thread Steven Rostedt
[ Added Paul McKenney ] On Thu, 22 Jan 2015 19:39:13 +0100 Luis R. Rodriguez mcg...@suse.com wrote: 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

Re: [Xen-devel] [RFC v3 2/2] x86/xen: allow privcmd hypercalls to be preempted

2015-01-22 Thread Andy Lutomirski
On Thu, Jan 22, 2015 at 12:16 PM, Steven Rostedt rost...@goodmis.org wrote: [ Added Paul McKenney ] On Thu, 22 Jan 2015 19:39:13 +0100 Luis R. Rodriguez mcg...@suse.com wrote: Why not make this a tracepoint? Then you can enable it only when you want to. As tracepoints are also hooks, you

Re: [Xen-devel] [RFC v3 2/2] x86/xen: allow privcmd hypercalls to be preempted

2015-01-22 Thread Julien Grall
On 22/01/15 18:56, Luis R. Rodriguez wrote: On Thu, Jan 22, 2015 at 01:10:49PM +, Julien Grall wrote: Hi Luis, On 22/01/15 02:17, Luis R. Rodriguez wrote: diff --git a/drivers/xen/events/events_base.c b/drivers/xen/events/events_base.c index b4bca2d..23c526b 100644 ---

Re: [Xen-devel] [RFC v3 2/2] x86/xen: allow privcmd hypercalls to be preempted

2015-01-22 Thread Luis R. Rodriguez
On Thu, Jan 22, 2015 at 12:55:17PM +, David Vrabel wrote: On 22/01/15 03:18, Andy Lutomirski 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

Re: [Xen-devel] [RFC v3 2/2] x86/xen: allow privcmd hypercalls to be preempted

2015-01-22 Thread Andy Lutomirski
On Thu, Jan 22, 2015 at 12:37 PM, Steven Rostedt rost...@goodmis.org wrote: On Thu, 22 Jan 2015 12:24:47 -0800 Andy Lutomirski l...@amacapital.net wrote: Also, please remove the notrace, because function tracing goes an extra step to not require RCU being visible. The only thing you get

Re: [Xen-devel] [RFC v3 2/2] x86/xen: allow privcmd hypercalls to be preempted

2015-01-22 Thread Paul E. McKenney
On Thu, Jan 22, 2015 at 03:16:57PM -0500, Steven Rostedt wrote: [ Added Paul McKenney ] On Thu, 22 Jan 2015 19:39:13 +0100 Luis R. Rodriguez mcg...@suse.com wrote: Why not make this a tracepoint? Then you can enable it only when you want to. As tracepoints are also hooks, you could

Re: [Xen-devel] [RFC v3 2/2] x86/xen: allow privcmd hypercalls to be preempted

2015-01-22 Thread Steven Rostedt
On Thu, 22 Jan 2015 12:58:00 -0800 Andy Lutomirski l...@amacapital.net wrote: On Thu, Jan 22, 2015 at 12:37 PM, Steven Rostedt rost...@goodmis.org wrote: On Thu, 22 Jan 2015 12:24:47 -0800 Andy Lutomirski l...@amacapital.net wrote: Also, please remove the notrace, because function

Re: [Xen-devel] [RFC v3 2/2] x86/xen: allow privcmd hypercalls to be preempted

2015-01-22 Thread Andy Lutomirski
On Thu, Jan 22, 2015 at 1:16 PM, Steven Rostedt rost...@goodmis.org wrote: On Thu, 22 Jan 2015 12:58:00 -0800 Andy Lutomirski l...@amacapital.net wrote: On Thu, Jan 22, 2015 at 12:37 PM, Steven Rostedt rost...@goodmis.org wrote: On Thu, 22 Jan 2015 12:24:47 -0800 Andy Lutomirski

Re: [Xen-devel] [RFC v3 2/2] x86/xen: allow privcmd hypercalls to be preempted

2015-01-21 Thread Andy Lutomirski
On Wed, Jan 21, 2015 at 6:17 PM, Luis R. Rodriguez mcg...@do-not-panic.com wrote: From: Luis R. Rodriguez mcg...@suse.com Xen has support for splitting heavy work work into a series of hypercalls, called multicalls, and preempting them through what Xen calls continuation [0]. Despite this

[Xen-devel] [RFC v3 2/2] x86/xen: allow privcmd hypercalls to be preempted

2015-01-21 Thread Luis R. Rodriguez
From: Luis R. Rodriguez mcg...@suse.com Xen has support for splitting heavy work work into a series of hypercalls, called multicalls, and preempting them through what Xen calls continuation [0]. Despite this though without CONFIG_PREEMPT preemption won't happen, without preemption a system can