On 2016年06月28日 15:00, Heiko Carstens wrote:
On Mon, Jun 27, 2016 at 04:00:43PM +0200, Peter Zijlstra wrote:
On Mon, Jun 27, 2016 at 01:41:28PM -0400, Pan Xinhui wrote:
+++ b/include/linux/sched.h
@@ -3293,6 +3293,15 @@ static inline void set_task_cpu(struct task_struct *p,
unsigned int cpu)
On Mon, Jun 27, 2016 at 04:00:43PM +0200, Peter Zijlstra wrote:
> On Mon, Jun 27, 2016 at 01:41:28PM -0400, Pan Xinhui wrote:
> > +++ b/include/linux/sched.h
> > @@ -3293,6 +3293,15 @@ static inline void set_task_cpu(struct task_struct
> > *p, unsigned int cpu)
> >
> > #endif /* CONFIG_SMP */
>
On 2016年06月27日 22:05, Boqun Feng wrote:
On Mon, Jun 27, 2016 at 01:41:28PM -0400, Pan Xinhui wrote:
this supports to fix lock holder preempted issue which run as a guest
for kernel users, we could use bool vcpu_is_preempted(int cpu) to detech
if one vcpu is preempted or not.
The default impl
On 2016年06月27日 22:02, Peter Zijlstra wrote:
On Mon, Jun 27, 2016 at 04:00:43PM +0200, Peter Zijlstra wrote:
On Mon, Jun 27, 2016 at 01:41:28PM -0400, Pan Xinhui wrote:
+++ b/include/linux/sched.h
@@ -3293,6 +3293,15 @@ static inline void set_task_cpu(struct task_struct *p,
unsigned int cpu)
On Mon, Jun 27, 2016 at 04:00:43PM +0200, Peter Zijlstra wrote:
> On Mon, Jun 27, 2016 at 01:41:28PM -0400, Pan Xinhui wrote:
> > +++ b/include/linux/sched.h
> > @@ -3293,6 +3293,15 @@ static inline void set_task_cpu(struct task_struct
> > *p, unsigned int cpu)
> >
> > #endif /* CONFIG_SMP */
>
On Mon, Jun 27, 2016 at 01:41:28PM -0400, Pan Xinhui wrote:
> this supports to fix lock holder preempted issue which run as a guest
>
> for kernel users, we could use bool vcpu_is_preempted(int cpu) to detech
> if one vcpu is preempted or not.
>
> The default implementation is a macrodefined by f
On Mon, Jun 27, 2016 at 01:41:28PM -0400, Pan Xinhui wrote:
> +++ b/include/linux/sched.h
> @@ -3293,6 +3293,15 @@ static inline void set_task_cpu(struct task_struct *p,
> unsigned int cpu)
>
> #endif /* CONFIG_SMP */
>
> +#ifdef arch_vcpu_is_preempted
> +static inline bool vcpu_is_preempted(
this supports to fix lock holder preempted issue which run as a guest
for kernel users, we could use bool vcpu_is_preempted(int cpu) to detech
if one vcpu is preempted or not.
The default implementation is a macrodefined by false. So compiler can
wrap it out if arch dose not support such vcpu pte