Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1263429 > unrolled thread

Re: [PATCH v11 5/5] xen/arm: account for stolen ticks

Started byMark Rutland <mark.rutland@arm.com>
First post2015-11-05 18:00 +0100
Last post2015-11-06 14:20 +0100
Articles 4 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH v11 5/5] xen/arm: account for stolen ticks Mark Rutland <mark.rutland@arm.com> - 2015-11-05 18:00 +0100
    Re: [PATCH v11 5/5] xen/arm: account for stolen ticks Mark Rutland <mark.rutland@arm.com> - 2015-11-06 13:00 +0100
      Re: [PATCH v11 5/5] xen/arm: account for stolen ticks Vitaly Kuznetsov <vkuznets@redhat.com> - 2015-11-06 14:30 +0100
    Re: [PATCH v11 5/5] xen/arm: account for stolen ticks Vitaly Kuznetsov <vkuznets@redhat.com> - 2015-11-06 14:20 +0100

#1263429 — Re: [PATCH v11 5/5] xen/arm: account for stolen ticks

FromMark Rutland <mark.rutland@arm.com>
Date2015-11-05 18:00 +0100
SubjectRe: [PATCH v11 5/5] xen/arm: account for stolen ticks
Message-ID<qrw3h-Mt-33@gated-at.bofh.it>
>  static void xen_percpu_init(void)
>  {
>  	struct vcpu_register_vcpu_info info;
> @@ -104,6 +120,8 @@ static void xen_percpu_init(void)
>  	BUG_ON(err);
>  	per_cpu(xen_vcpu, cpu) = vcpup;
>  
> +	xen_setup_runstate_info(cpu);

Does the runstate memory area get unregsitered when a kernel tears
things down, or is kexec somehow inhibited for xen guests?

i couldn't spot either happening, but I may have missed it.

Mark.

> +
>  after_register_vcpu_info:
>  	enable_percpu_irq(xen_events_irq, 0);
>  	put_cpu();
> @@ -271,6 +289,9 @@ static int __init xen_guest_init(void)
>  
>  	register_cpu_notifier(&xen_cpu_notifier);
>  
> +	pv_time_ops.steal_clock = xen_stolen_accounting;
> +	static_key_slow_inc(&paravirt_steal_enabled);
> +
>  	return 0;
>  }
>  early_initcall(xen_guest_init);
> -- 
> 1.7.10.4
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1263945

FromMark Rutland <mark.rutland@arm.com>
Date2015-11-06 13:00 +0100
Message-ID<qrNQt-40S-5@gated-at.bofh.it>
In reply to#1263429
On Fri, Nov 06, 2015 at 11:41:49AM +0000, David Vrabel wrote:
> On 06/11/15 11:39, Stefano Stabellini wrote:
> > On Thu, 5 Nov 2015, Mark Rutland wrote:
> >>>  static void xen_percpu_init(void)
> >>>  {
> >>>  	struct vcpu_register_vcpu_info info;
> >>> @@ -104,6 +120,8 @@ static void xen_percpu_init(void)
> >>>  	BUG_ON(err);
> >>>  	per_cpu(xen_vcpu, cpu) = vcpup;
> >>>  
> >>> +	xen_setup_runstate_info(cpu);
> >>
> >> Does the runstate memory area get unregsitered when a kernel tears
> >> things down, or is kexec somehow inhibited for xen guests?
> >>
> >> i couldn't spot either happening, but I may have missed it.
> > 
> > I don't think that the runstate memory area needs to be unregistered for
> > kexec, but I am not very knowledgeble on kexec and Xen, CC'ing Vitaly
> > and David.
> 
> There's a whole pile of other state needing to be reset for kexec (event
> channels and grant tables for example).  The guest needs to soft reset
> itself (available in Xen 4.6) before kexec'ing another kernel.
> 
> This soft reset would also including cleaning up this shared memory region.

Ok. So we don't currently have the code kernel-side, but it looks like
it would be relatively simple to add (having just spotted [1]), and
everything should be ready on the Xen side.`

Thanks,
Mark.

[1] https://lkml.org/lkml/2015/9/25/152
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1264013

FromVitaly Kuznetsov <vkuznets@redhat.com>
Date2015-11-06 14:30 +0100
Message-ID<qrPfB-52O-31@gated-at.bofh.it>
In reply to#1263945
Mark Rutland <mark.rutland@arm.com> writes:

> On Fri, Nov 06, 2015 at 11:41:49AM +0000, David Vrabel wrote:
>> On 06/11/15 11:39, Stefano Stabellini wrote:
>> > On Thu, 5 Nov 2015, Mark Rutland wrote:
>> >>>  static void xen_percpu_init(void)
>> >>>  {
>> >>>  	struct vcpu_register_vcpu_info info;
>> >>> @@ -104,6 +120,8 @@ static void xen_percpu_init(void)
>> >>>  	BUG_ON(err);
>> >>>  	per_cpu(xen_vcpu, cpu) = vcpup;
>> >>>  
>> >>> +	xen_setup_runstate_info(cpu);
>> >>
>> >> Does the runstate memory area get unregsitered when a kernel tears
>> >> things down, or is kexec somehow inhibited for xen guests?
>> >>
>> >> i couldn't spot either happening, but I may have missed it.
>> > 
>> > I don't think that the runstate memory area needs to be unregistered for
>> > kexec, but I am not very knowledgeble on kexec and Xen, CC'ing Vitaly
>> > and David.
>> 
>> There's a whole pile of other state needing to be reset for kexec (event
>> channels and grant tables for example).  The guest needs to soft reset
>> itself (available in Xen 4.6) before kexec'ing another kernel.
>> 
>> This soft reset would also including cleaning up this shared memory region.
>
> Ok. So we don't currently have the code kernel-side, but it looks like
> it would be relatively simple to add (having just spotted [1])

already merged in 4.3 and several stable trees.

> , and everything should be ready on the Xen side.`
>

Yes, but for x86 only. arch_domain_soft_reset() is -ENOSYS for ARM
now. It should be relatively easy to implement, one should unmap
shared_info page and do some GIC cleanup (if it's needed at all). I'd be
happy to help if someone's interested but unfortunately I don't have ARM
hardware to test at this moment...

> Thanks,
> Mark.
>
> [1] https://lkml.org/lkml/2015/9/25/152

-- 
  Vitaly
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1264003

FromVitaly Kuznetsov <vkuznets@redhat.com>
Date2015-11-06 14:20 +0100
Message-ID<qrP5T-4Zf-9@gated-at.bofh.it>
In reply to#1263429
David Vrabel <david.vrabel@citrix.com> writes:

> On 06/11/15 11:39, Stefano Stabellini wrote:
>> On Thu, 5 Nov 2015, Mark Rutland wrote:
>>>>  static void xen_percpu_init(void)
>>>>  {
>>>>  	struct vcpu_register_vcpu_info info;
>>>> @@ -104,6 +120,8 @@ static void xen_percpu_init(void)
>>>>  	BUG_ON(err);
>>>>  	per_cpu(xen_vcpu, cpu) = vcpup;
>>>>  
>>>> +	xen_setup_runstate_info(cpu);
>>>
>>> Does the runstate memory area get unregsitered when a kernel tears
>>> things down, or is kexec somehow inhibited for xen guests?
>>>
>>> i couldn't spot either happening, but I may have missed it.
>> 
>> I don't think that the runstate memory area needs to be unregistered for
>> kexec, but I am not very knowledgeble on kexec and Xen, CC'ing Vitaly
>> and David.
>
> There's a whole pile of other state needing to be reset for kexec (event
> channels and grant tables for example).  The guest needs to soft reset
> itself (available in Xen 4.6) before kexec'ing another kernel.

Unfortunately, it's 4.7. Soft reset patch series was merged after 4.6
freeze so it is only available in current master git branch.

>
> This soft reset would also including cleaning up this shared memory region.
>
> David

-- 
  Vitaly
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web