All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai] kvm freeze with ipipe patch for kernel 3.x
@ 2013-03-01 15:33 Gabriele Moabiti
  2013-03-01 17:09 ` Jan Kiszka
  0 siblings, 1 reply; 14+ messages in thread
From: Gabriele Moabiti @ 2013-03-01 15:33 UTC (permalink / raw)
  To: xenomai


I'm using an XP guest with qemu+kvm (vmx) on linux host (kernel 3.2.21 + ipipe patch + xenomai version 2.6.2.1)
and I'm experiencing many system freezes when the vm is active.
I think then problem is in the 3.x (3.2,3.4,3.5) ipipe patch (ipipe-core-3.2.21-x86-5.patch):

:

diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c


....

@@ -5749,13 +5795,11 @@ static int vcpu_enter_guest(struct kvm_vcpu *vcpu)
      */
     smp_mb();

-    local_irq_disable();
-
     if (vcpu->mode == EXITING_GUEST_MODE || vcpu->requests
         || need_resched() || signal_pending(current)) {
         vcpu->mode = OUTSIDE_GUEST_MODE;
         smp_wmb();
-        local_irq_enable();
+        hard_cond_local_irq_enable();
         preempt_enable();
         kvm_x86_ops->cancel_injection(vcpu);
         r = 1;


....




local_irq_enable() should be enabled after hard_cond_local_irq_enable (as in the 2.6.38 patch), in this way:



...
-    local_irq_disable();
-
     if (vcpu->mode == EXITING_GUEST_MODE || vcpu->requests
         || need_resched() || signal_pending(current)) {
         vcpu->mode = OUTSIDE_GUEST_MODE;
         smp_wmb();
+        hard_cond_local_irq_enable();
         local_irq_enable();
         preempt_enable();
....

I've done some tests and now the system runs fine.

Gabriele Moabiti


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Xenomai] kvm freeze with ipipe patch for kernel 3.x
  2013-03-01 15:33 [Xenomai] kvm freeze with ipipe patch for kernel 3.x Gabriele Moabiti
@ 2013-03-01 17:09 ` Jan Kiszka
  2013-03-01 17:35   ` Jan Kiszka
  0 siblings, 1 reply; 14+ messages in thread
From: Jan Kiszka @ 2013-03-01 17:09 UTC (permalink / raw)
  To: Gabriele Moabiti; +Cc: xenomai

On 2013-03-01 16:33, Gabriele Moabiti wrote:
> 
> I'm using an XP guest with qemu+kvm (vmx) on linux host (kernel 3.2.21 + ipipe patch + xenomai version 2.6.2.1)
> and I'm experiencing many system freezes when the vm is active.
> I think then problem is in the 3.x (3.2,3.4,3.5) ipipe patch (ipipe-core-3.2.21-x86-5.patch):
> 
> :
> 
> diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
> 
> 
> ....
> 
> @@ -5749,13 +5795,11 @@ static int vcpu_enter_guest(struct kvm_vcpu *vcpu)
>       */
>      smp_mb();
> 
> -    local_irq_disable();
> -
>      if (vcpu->mode == EXITING_GUEST_MODE || vcpu->requests
>          || need_resched() || signal_pending(current)) {
>          vcpu->mode = OUTSIDE_GUEST_MODE;
>          smp_wmb();
> -        local_irq_enable();
> +        hard_cond_local_irq_enable();
>          preempt_enable();
>          kvm_x86_ops->cancel_injection(vcpu);
>          r = 1;
> 
> 
> ....
> 
> 
> 
> 
> local_irq_enable() should be enabled after hard_cond_local_irq_enable (as in the 2.6.38 patch), in this way:
> 
> 
> 
> ...
> -    local_irq_disable();
> -
>      if (vcpu->mode == EXITING_GUEST_MODE || vcpu->requests
>          || need_resched() || signal_pending(current)) {
>          vcpu->mode = OUTSIDE_GUEST_MODE;
>          smp_wmb();
> +        hard_cond_local_irq_enable();
>          local_irq_enable();
>          preempt_enable();
> ....
> 
> I've done some tests and now the system runs fine.

There is more broken, even in latest stable 3.5.7. See the patches at
[1] for a tested version. Unfortunately, I cannot update my tree for 3.8
ATM as git services seem to be down on xenomai.org.

Would be great if you could give it try and report remaining issues.

Jan

[1]
http://git.xenomai.org/?p=ipipe-jki.git;a=shortlog;h=refs/heads/for-upstream/3.5

-- 
Siemens AG, Corporate Technology, CT RTC ITP SDP-DE
Corporate Competence Center Embedded Linux


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Xenomai] kvm freeze with ipipe patch for kernel 3.x
  2013-03-01 17:09 ` Jan Kiszka
@ 2013-03-01 17:35   ` Jan Kiszka
  2013-03-02  0:47     ` Gabriele Moabiti
  0 siblings, 1 reply; 14+ messages in thread
From: Jan Kiszka @ 2013-03-01 17:35 UTC (permalink / raw)
  To: Gabriele Moabiti; +Cc: xenomai

On 2013-03-01 18:09, Jan Kiszka wrote:
> There is more broken, even in latest stable 3.5.7. See the patches at
> [1] for a tested version. Unfortunately, I cannot update my tree for 3.8
> ATM as git services seem to be down on xenomai.org.

Not true, just git:// is broken, http:// works, and I was able to push a
first update for 3.5. 3.8 will follow later.

Jan

-- 
Siemens AG, Corporate Technology, CT RTC ITP SDP-DE
Corporate Competence Center Embedded Linux


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Xenomai] kvm freeze with ipipe patch for kernel 3.x
  2013-03-01 17:35   ` Jan Kiszka
@ 2013-03-02  0:47     ` Gabriele Moabiti
  2013-03-02  8:17       ` Jan Kiszka
  0 siblings, 1 reply; 14+ messages in thread
From: Gabriele Moabiti @ 2013-03-02  0:47 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: xenomai



----- Messaggio originale -----

Da: Jan Kiszka <jan.kiszka@siemens.com>
On 2013-03-01 18:09, Jan Kiszka wrote:
> There is more broken, even in latest stable 3.5.7. See the patches at
> [1] for a tested version. Unfortunately, I cannot update my tree for 3.8
> ATM as git services seem to be down on xenomai.org.

Does this and other important patches will be backported to 3.2?

Thank you



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Xenomai] kvm freeze with ipipe patch for kernel 3.x
  2013-03-02  0:47     ` Gabriele Moabiti
@ 2013-03-02  8:17       ` Jan Kiszka
  2013-03-02 11:01         ` Gilles Chanteperdrix
  0 siblings, 1 reply; 14+ messages in thread
From: Jan Kiszka @ 2013-03-02  8:17 UTC (permalink / raw)
  To: Gabriele Moabiti; +Cc: xenomai

On 2013-03-02 01:47, Gabriele Moabiti wrote:
> 
> 
> ----- Messaggio originale -----
> 
> Da: Jan Kiszka <jan.kiszka@siemens.com>
> On 2013-03-01 18:09, Jan Kiszka wrote:
>> There is more broken, even in latest stable 3.5.7. See the patches at
>> [1] for a tested version. Unfortunately, I cannot update my tree for 3.8
>> ATM as git services seem to be down on xenomai.org.
> 
> Does this and other important patches will be backported to 3.2?

I'm planning to get them merged into 3.8 first of all, maybe also into
3.5 (as this is our current production baseline). No plans exist beyond
that. I'd rather like to leave older kernels alone to reduce maintenance
efforts (porting is simple, proper testing takes time).

Also note that 3.2 is lacking much more critical fixes than those few
around KVM. IOW: Don't use it for anything serious with x86.

Jan


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 263 bytes
Desc: OpenPGP digital signature
URL: <http://www.xenomai.org/pipermail/xenomai/attachments/20130302/28533282/attachment.pgp>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Xenomai] kvm freeze with ipipe patch for kernel 3.x
  2013-03-02  8:17       ` Jan Kiszka
@ 2013-03-02 11:01         ` Gilles Chanteperdrix
  2013-03-02 11:12           ` Jan Kiszka
  0 siblings, 1 reply; 14+ messages in thread
From: Gilles Chanteperdrix @ 2013-03-02 11:01 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: xenomai

On 03/02/2013 09:17 AM, Jan Kiszka wrote:

> On 2013-03-02 01:47, Gabriele Moabiti wrote:
>>
>>
>> ----- Messaggio originale -----
>>
>> Da: Jan Kiszka <jan.kiszka@siemens.com>
>> On 2013-03-01 18:09, Jan Kiszka wrote:
>>> There is more broken, even in latest stable 3.5.7. See the patches at
>>> [1] for a tested version. Unfortunately, I cannot update my tree for 3.8
>>> ATM as git services seem to be down on xenomai.org.
>>
>> Does this and other important patches will be backported to 3.2?
> 
> I'm planning to get them merged into 3.8 first of all, maybe also into
> 3.5 (as this is our current production baseline). No plans exist beyond
> that. I'd rather like to leave older kernels alone to reduce maintenance
> efforts (porting is simple, proper testing takes time).
> 
> Also note that 3.2 is lacking much more critical fixes than those few
> around KVM. IOW: Don't use it for anything serious with x86.


Maybe reverting the mprotect/ipipe_pin_vma patches in the 3.2 branch, so
as to avoid the zero page corruption, but take some faults sometimes
would be a simple, feasible solution? 3.2 seems to have been chosen as a
long term stable branch.

-- 
                                                                Gilles.


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Xenomai] kvm freeze with ipipe patch for kernel 3.x
  2013-03-02 11:01         ` Gilles Chanteperdrix
@ 2013-03-02 11:12           ` Jan Kiszka
  2013-03-02 14:20             ` Gilles Chanteperdrix
  0 siblings, 1 reply; 14+ messages in thread
From: Jan Kiszka @ 2013-03-02 11:12 UTC (permalink / raw)
  To: Gilles Chanteperdrix; +Cc: xenomai

On 2013-03-02 12:01, Gilles Chanteperdrix wrote:
> On 03/02/2013 09:17 AM, Jan Kiszka wrote:
> 
>> On 2013-03-02 01:47, Gabriele Moabiti wrote:
>>>
>>>
>>> ----- Messaggio originale -----
>>>
>>> Da: Jan Kiszka <jan.kiszka@siemens.com>
>>> On 2013-03-01 18:09, Jan Kiszka wrote:
>>>> There is more broken, even in latest stable 3.5.7. See the patches at
>>>> [1] for a tested version. Unfortunately, I cannot update my tree for 3.8
>>>> ATM as git services seem to be down on xenomai.org.
>>>
>>> Does this and other important patches will be backported to 3.2?
>>
>> I'm planning to get them merged into 3.8 first of all, maybe also into
>> 3.5 (as this is our current production baseline). No plans exist beyond
>> that. I'd rather like to leave older kernels alone to reduce maintenance
>> efforts (porting is simple, proper testing takes time).
>>
>> Also note that 3.2 is lacking much more critical fixes than those few
>> around KVM. IOW: Don't use it for anything serious with x86.
> 
> 
> Maybe reverting the mprotect/ipipe_pin_vma patches in the 3.2 branch, so
> as to avoid the zero page corruption, but take some faults sometimes
> would be a simple, feasible solution? 3.2 seems to have been chosen as a
> long term stable branch.

Again, the problem is not writing the patches but testing all the stuff
in all necessary combinations. For me it really makes no sense to have n
different legacy versions supported if we want to make progress.
However, if someone feels like doing serious stable maintenance of
I-pipe patches beyond "1 stable, 1 development head", that would surely
be welcome.

BTW, 3.4 is also LTS, and there we have those fixes at least (just not
yet pulled into the mainline).

Jan


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 263 bytes
Desc: OpenPGP digital signature
URL: <http://www.xenomai.org/pipermail/xenomai/attachments/20130302/2a549455/attachment.pgp>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Xenomai] kvm freeze with ipipe patch for kernel 3.x
  2013-03-02 11:12           ` Jan Kiszka
@ 2013-03-02 14:20             ` Gilles Chanteperdrix
  2013-03-02 14:38               ` Jan Kiszka
  0 siblings, 1 reply; 14+ messages in thread
From: Gilles Chanteperdrix @ 2013-03-02 14:20 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: xenomai

On 03/02/2013 12:12 PM, Jan Kiszka wrote:

> On 2013-03-02 12:01, Gilles Chanteperdrix wrote:
>> On 03/02/2013 09:17 AM, Jan Kiszka wrote:
>>
>>> On 2013-03-02 01:47, Gabriele Moabiti wrote:
>>>>
>>>>
>>>> ----- Messaggio originale -----
>>>>
>>>> Da: Jan Kiszka <jan.kiszka@siemens.com>
>>>> On 2013-03-01 18:09, Jan Kiszka wrote:
>>>>> There is more broken, even in latest stable 3.5.7. See the patches at
>>>>> [1] for a tested version. Unfortunately, I cannot update my tree for 3.8
>>>>> ATM as git services seem to be down on xenomai.org.
>>>>
>>>> Does this and other important patches will be backported to 3.2?
>>>
>>> I'm planning to get them merged into 3.8 first of all, maybe also into
>>> 3.5 (as this is our current production baseline). No plans exist beyond
>>> that. I'd rather like to leave older kernels alone to reduce maintenance
>>> efforts (porting is simple, proper testing takes time).
>>>
>>> Also note that 3.2 is lacking much more critical fixes than those few
>>> around KVM. IOW: Don't use it for anything serious with x86.
>>
>>
>> Maybe reverting the mprotect/ipipe_pin_vma patches in the 3.2 branch, so
>> as to avoid the zero page corruption, but take some faults sometimes
>> would be a simple, feasible solution? 3.2 seems to have been chosen as a
>> long term stable branch.
> 
> Again, the problem is not writing the patches


It is easy to forget a patch when (back)porting patches from an I-pipe
to the other.

> but testing all the stuff
> in all necessary combinations.


I can test 4 combinations at once: i686 UP, i686 SMP and x86_64 (UP or
SMP), this leaves only one combination to test.

> BTW, 3.4 is also LTS, and there we have those fixes at least (just not
> yet pulled into the mainline).


Are you sure you have not missed any patches for 3.4?

-- 
                                                                Gilles.


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Xenomai] kvm freeze with ipipe patch for kernel 3.x
  2013-03-02 14:20             ` Gilles Chanteperdrix
@ 2013-03-02 14:38               ` Jan Kiszka
  2013-03-02 14:41                 ` Gilles Chanteperdrix
  0 siblings, 1 reply; 14+ messages in thread
From: Jan Kiszka @ 2013-03-02 14:38 UTC (permalink / raw)
  To: Gilles Chanteperdrix; +Cc: xenomai

On 2013-03-02 15:20, Gilles Chanteperdrix wrote:
> On 03/02/2013 12:12 PM, Jan Kiszka wrote:
> 
>> On 2013-03-02 12:01, Gilles Chanteperdrix wrote:
>>> On 03/02/2013 09:17 AM, Jan Kiszka wrote:
>>>
>>>> On 2013-03-02 01:47, Gabriele Moabiti wrote:
>>>>>
>>>>>
>>>>> ----- Messaggio originale -----
>>>>>
>>>>> Da: Jan Kiszka <jan.kiszka@siemens.com>
>>>>> On 2013-03-01 18:09, Jan Kiszka wrote:
>>>>>> There is more broken, even in latest stable 3.5.7. See the patches at
>>>>>> [1] for a tested version. Unfortunately, I cannot update my tree for 3.8
>>>>>> ATM as git services seem to be down on xenomai.org.
>>>>>
>>>>> Does this and other important patches will be backported to 3.2?
>>>>
>>>> I'm planning to get them merged into 3.8 first of all, maybe also into
>>>> 3.5 (as this is our current production baseline). No plans exist beyond
>>>> that. I'd rather like to leave older kernels alone to reduce maintenance
>>>> efforts (porting is simple, proper testing takes time).
>>>>
>>>> Also note that 3.2 is lacking much more critical fixes than those few
>>>> around KVM. IOW: Don't use it for anything serious with x86.
>>>
>>>
>>> Maybe reverting the mprotect/ipipe_pin_vma patches in the 3.2 branch, so
>>> as to avoid the zero page corruption, but take some faults sometimes
>>> would be a simple, feasible solution? 3.2 seems to have been chosen as a
>>> long term stable branch.
>>
>> Again, the problem is not writing the patches
> 
> 
> It is easy to forget a patch when (back)porting patches from an I-pipe
> to the other.
> 
>> but testing all the stuff
>> in all necessary combinations.
> 
> 
> I can test 4 combinations at once: i686 UP, i686 SMP and x86_64 (UP or
> SMP), this leaves only one combination to test.

That's a small subset of the relevant variation. They come with enabling
different config options or using certain features. Do you have a test
setup for KVM on I-pipe e.g.? I'm not saying we catch them all with the
development head, but adding more versions to the test matrix doesn't
make it better.

> 
>> BTW, 3.4 is also LTS, and there we have those fixes at least (just not
>> yet pulled into the mainline).
> 
> 
> Are you sure you have not missed any patches for 3.4?

I was sure regarding important patches by the time I sent the pull.
Didn't check again since then.

Jan

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 263 bytes
Desc: OpenPGP digital signature
URL: <http://www.xenomai.org/pipermail/xenomai/attachments/20130302/cd244cda/attachment.pgp>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Xenomai] kvm freeze with ipipe patch for kernel 3.x
  2013-03-02 14:38               ` Jan Kiszka
@ 2013-03-02 14:41                 ` Gilles Chanteperdrix
  2013-03-03  8:49                   ` Jan Kiszka
  0 siblings, 1 reply; 14+ messages in thread
From: Gilles Chanteperdrix @ 2013-03-02 14:41 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: xenomai

On 03/02/2013 03:38 PM, Jan Kiszka wrote:

> On 2013-03-02 15:20, Gilles Chanteperdrix wrote:
>> On 03/02/2013 12:12 PM, Jan Kiszka wrote:
>>
>>> On 2013-03-02 12:01, Gilles Chanteperdrix wrote:
>>>> On 03/02/2013 09:17 AM, Jan Kiszka wrote:
>>>>
>>>>> On 2013-03-02 01:47, Gabriele Moabiti wrote:
>>>>>>
>>>>>>
>>>>>> ----- Messaggio originale -----
>>>>>>
>>>>>> Da: Jan Kiszka <jan.kiszka@siemens.com>
>>>>>> On 2013-03-01 18:09, Jan Kiszka wrote:
>>>>>>> There is more broken, even in latest stable 3.5.7. See the patches at
>>>>>>> [1] for a tested version. Unfortunately, I cannot update my tree for 3.8
>>>>>>> ATM as git services seem to be down on xenomai.org.
>>>>>>
>>>>>> Does this and other important patches will be backported to 3.2?
>>>>>
>>>>> I'm planning to get them merged into 3.8 first of all, maybe also into
>>>>> 3.5 (as this is our current production baseline). No plans exist beyond
>>>>> that. I'd rather like to leave older kernels alone to reduce maintenance
>>>>> efforts (porting is simple, proper testing takes time).
>>>>>
>>>>> Also note that 3.2 is lacking much more critical fixes than those few
>>>>> around KVM. IOW: Don't use it for anything serious with x86.
>>>>
>>>>
>>>> Maybe reverting the mprotect/ipipe_pin_vma patches in the 3.2 branch, so
>>>> as to avoid the zero page corruption, but take some faults sometimes
>>>> would be a simple, feasible solution? 3.2 seems to have been chosen as a
>>>> long term stable branch.
>>>
>>> Again, the problem is not writing the patches
>>
>>
>> It is easy to forget a patch when (back)porting patches from an I-pipe
>> to the other.
>>
>>> but testing all the stuff
>>> in all necessary combinations.
>>
>>
>> I can test 4 combinations at once: i686 UP, i686 SMP and x86_64 (UP or
>> SMP), this leaves only one combination to test.
> 
> That's a small subset of the relevant variation. They come with enabling
> different config options or using certain features. Do you have a test
> setup for KVM on I-pipe e.g.? I'm not saying we catch them all with the
> development head, but adding more versions to the test matrix doesn't
> make it better.


I man 3, not 4 combinations. Anyway, I naïvely test with only one
.config, which recently switched from embedded like minimal kernel to
debian like config. Do you have a list of the options combinations which
necessitate separate tests?


-- 
                                                                Gilles.



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Xenomai] kvm freeze with ipipe patch for kernel 3.x
  2013-03-02 14:41                 ` Gilles Chanteperdrix
@ 2013-03-03  8:49                   ` Jan Kiszka
  2013-03-03  9:00                     ` Gilles Chanteperdrix
  0 siblings, 1 reply; 14+ messages in thread
From: Jan Kiszka @ 2013-03-03  8:49 UTC (permalink / raw)
  To: Gilles Chanteperdrix; +Cc: xenomai

On 2013-03-02 15:41, Gilles Chanteperdrix wrote:
> On 03/02/2013 03:38 PM, Jan Kiszka wrote:
> 
>> On 2013-03-02 15:20, Gilles Chanteperdrix wrote:
>>> On 03/02/2013 12:12 PM, Jan Kiszka wrote:
>>>
>>>> On 2013-03-02 12:01, Gilles Chanteperdrix wrote:
>>>>> On 03/02/2013 09:17 AM, Jan Kiszka wrote:
>>>>>
>>>>>> On 2013-03-02 01:47, Gabriele Moabiti wrote:
>>>>>>>
>>>>>>>
>>>>>>> ----- Messaggio originale -----
>>>>>>>
>>>>>>> Da: Jan Kiszka <jan.kiszka@siemens.com>
>>>>>>> On 2013-03-01 18:09, Jan Kiszka wrote:
>>>>>>>> There is more broken, even in latest stable 3.5.7. See the patches at
>>>>>>>> [1] for a tested version. Unfortunately, I cannot update my tree for 3.8
>>>>>>>> ATM as git services seem to be down on xenomai.org.
>>>>>>>
>>>>>>> Does this and other important patches will be backported to 3.2?
>>>>>>
>>>>>> I'm planning to get them merged into 3.8 first of all, maybe also into
>>>>>> 3.5 (as this is our current production baseline). No plans exist beyond
>>>>>> that. I'd rather like to leave older kernels alone to reduce maintenance
>>>>>> efforts (porting is simple, proper testing takes time).
>>>>>>
>>>>>> Also note that 3.2 is lacking much more critical fixes than those few
>>>>>> around KVM. IOW: Don't use it for anything serious with x86.
>>>>>
>>>>>
>>>>> Maybe reverting the mprotect/ipipe_pin_vma patches in the 3.2 branch, so
>>>>> as to avoid the zero page corruption, but take some faults sometimes
>>>>> would be a simple, feasible solution? 3.2 seems to have been chosen as a
>>>>> long term stable branch.
>>>>
>>>> Again, the problem is not writing the patches
>>>
>>>
>>> It is easy to forget a patch when (back)porting patches from an I-pipe
>>> to the other.
>>>
>>>> but testing all the stuff
>>>> in all necessary combinations.
>>>
>>>
>>> I can test 4 combinations at once: i686 UP, i686 SMP and x86_64 (UP or
>>> SMP), this leaves only one combination to test.
>>
>> That's a small subset of the relevant variation. They come with enabling
>> different config options or using certain features. Do you have a test
>> setup for KVM on I-pipe e.g.? I'm not saying we catch them all with the
>> development head, but adding more versions to the test matrix doesn't
>> make it better.
> 
> 
> I man 3, not 4 combinations. Anyway, I naïvely test with only one
> .config, which recently switched from embedded like minimal kernel to
> debian like config. Do you have a list of the options combinations which
> necessitate separate tests?

I-pipe/Xenomai on/off, TSC/APIC on/off, instrumentations and tracers
should be on for correctness checks, but not when comparing benchmark
numbers. I'm not sure about CONFIG_PREEMPT on/off. Long-term, we will
also have to test IPIPE_LEGACY on/off.

Jan


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 263 bytes
Desc: OpenPGP digital signature
URL: <http://www.xenomai.org/pipermail/xenomai/attachments/20130303/f1500acd/attachment.pgp>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Xenomai] kvm freeze with ipipe patch for kernel 3.x
  2013-03-03  8:49                   ` Jan Kiszka
@ 2013-03-03  9:00                     ` Gilles Chanteperdrix
  2013-03-03 21:15                       ` Gabriele Moabiti
  0 siblings, 1 reply; 14+ messages in thread
From: Gilles Chanteperdrix @ 2013-03-03  9:00 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: xenomai

On 03/03/2013 09:49 AM, Jan Kiszka wrote:

> On 2013-03-02 15:41, Gilles Chanteperdrix wrote:
>> On 03/02/2013 03:38 PM, Jan Kiszka wrote:
>>
>>> On 2013-03-02 15:20, Gilles Chanteperdrix wrote:
>>>> On 03/02/2013 12:12 PM, Jan Kiszka wrote:
>>>>
>>>>> On 2013-03-02 12:01, Gilles Chanteperdrix wrote:
>>>>>> On 03/02/2013 09:17 AM, Jan Kiszka wrote:
>>>>>>
>>>>>>> On 2013-03-02 01:47, Gabriele Moabiti wrote:
>>>>>>>>
>>>>>>>>
>>>>>>>> ----- Messaggio originale -----
>>>>>>>>
>>>>>>>> Da: Jan Kiszka <jan.kiszka@siemens.com>
>>>>>>>> On 2013-03-01 18:09, Jan Kiszka wrote:
>>>>>>>>> There is more broken, even in latest stable 3.5.7. See the patches at
>>>>>>>>> [1] for a tested version. Unfortunately, I cannot update my tree for 3.8
>>>>>>>>> ATM as git services seem to be down on xenomai.org.
>>>>>>>>
>>>>>>>> Does this and other important patches will be backported to 3.2?
>>>>>>>
>>>>>>> I'm planning to get them merged into 3.8 first of all, maybe also into
>>>>>>> 3.5 (as this is our current production baseline). No plans exist beyond
>>>>>>> that. I'd rather like to leave older kernels alone to reduce maintenance
>>>>>>> efforts (porting is simple, proper testing takes time).
>>>>>>>
>>>>>>> Also note that 3.2 is lacking much more critical fixes than those few
>>>>>>> around KVM. IOW: Don't use it for anything serious with x86.
>>>>>>
>>>>>>
>>>>>> Maybe reverting the mprotect/ipipe_pin_vma patches in the 3.2 branch, so
>>>>>> as to avoid the zero page corruption, but take some faults sometimes
>>>>>> would be a simple, feasible solution? 3.2 seems to have been chosen as a
>>>>>> long term stable branch.
>>>>>
>>>>> Again, the problem is not writing the patches
>>>>
>>>>
>>>> It is easy to forget a patch when (back)porting patches from an I-pipe
>>>> to the other.
>>>>
>>>>> but testing all the stuff
>>>>> in all necessary combinations.
>>>>
>>>>
>>>> I can test 4 combinations at once: i686 UP, i686 SMP and x86_64 (UP or
>>>> SMP), this leaves only one combination to test.
>>>
>>> That's a small subset of the relevant variation. They come with enabling
>>> different config options or using certain features. Do you have a test
>>> setup for KVM on I-pipe e.g.? I'm not saying we catch them all with the
>>> development head, but adding more versions to the test matrix doesn't
>>> make it better.
>>
>>
>> I man 3, not 4 combinations. Anyway, I naïvely test with only one
>> .config, which recently switched from embedded like minimal kernel to
>> debian like config. Do you have a list of the options combinations which
>> necessitate separate tests?
> 
> I-pipe/Xenomai on/off,


That is 3 cases. But we can not really run xeno-regression-test with
Xenomai off. So, maybe a build-test for CONFIG_IPIPE alone and
CONFIG_IPIPE off would be enough?

> TSC/APIC on/off,


I do not think it really matters with TSC/APIC off. We have much worse
latencies with TSC off, due to the fact that we read the TSC often,
especially with stats enabled, and nobody complained (more exactly, some
people complained a long time ago, then discovered they had a tsc,
enabled it, then stopped complaining). The point is, if nobody noticed
it, it probably means that nobody uses it.

> instrumentations and tracers
> should be on for correctness checks, but not when comparing benchmark
> numbers.


It means we have to run xeno-regression-test with instrumentation on
Then xeno-test without instrumentation.

> I'm not sure about CONFIG_PREEMPT on/off.


I routinely use CONFIG_PREEMPT off on ARM, to achieve the best
latencies, but since it involves code in assembly, it has to be tested,
on each platform.

I also noticed that turning off CONFIG_HIGH_RES reduces latencies, and
it certainly involves different code paths in the I-pipe.

> Long-term, we will
> also have to test IPIPE_LEGACY on/off.

At this point we do not really care to test anything else than the
latest patch on -forge, or we do?

-- 
                                                                Gilles.



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Xenomai] kvm freeze with ipipe patch for kernel 3.x
  2013-03-03  9:00                     ` Gilles Chanteperdrix
@ 2013-03-03 21:15                       ` Gabriele Moabiti
  2013-03-04 11:59                         ` Jan Kiszka
  0 siblings, 1 reply; 14+ messages in thread
From: Gabriele Moabiti @ 2013-03-03 21:15 UTC (permalink / raw)
  To: Gilles Chanteperdrix, Jan Kiszka; +Cc: xenomai

>>>>>>>

>>>>>>> I'm planning to get them merged into 3.8 first of all, maybe also into
>>>>>>> 3.5 (as this is our current production baseline). No plans exist beyond
>>>>>>> that. I'd rather like to leave older kernels alone to reduce maintenance
>>>>>>> efforts (porting is simple, proper testing takes time).
>>>>>>>
>>>>>>> Also note that 3.2 is lacking much more critical fixes than those few
>>>>>>> around KVM. IOW: Don't use it for anything serious with x86.
>>>>>>
>>>>>>
>>>>>> Maybe reverting the mprotect/ipipe_pin_vma patches in the 3.2 branch, so
>>>>>> as to avoid the zero page corruption, but take some faults sometimes
>>>>>> would be a simple, feasible solution? 3.2 seems to have been chosen as a
>>>>>> long term stable branch.
>>>>>
>>>>> Again, the problem is not writing the patches
>>>>
>>>>
>>>> It is easy to forget a patch when (back)porting patches from an I-pipe
>>>> to the other.
>>>>
>>>>> but testing all the stuff
>>>>> in all necessary combinations.

So.. does 3.2 or 3.4 (at least an LTS kernel) will be supported or it's better to use only the 3.5.7 (EOL)?
I think if a kernel patch has serious problems should be marked as broken or unstable.


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Xenomai] kvm freeze with ipipe patch for kernel 3.x
  2013-03-03 21:15                       ` Gabriele Moabiti
@ 2013-03-04 11:59                         ` Jan Kiszka
  0 siblings, 0 replies; 14+ messages in thread
From: Jan Kiszka @ 2013-03-04 11:59 UTC (permalink / raw)
  To: Gabriele Moabiti; +Cc: xenomai

On 2013-03-03 22:15, Gabriele Moabiti wrote:
>>>>>>>>
> 
>>>>>>>> I'm planning to get them merged into 3.8 first of all, maybe also into
>>>>>>>> 3.5 (as this is our current production baseline). No plans exist beyond
>>>>>>>> that. I'd rather like to leave older kernels alone to reduce maintenance
>>>>>>>> efforts (porting is simple, proper testing takes time).
>>>>>>>>
>>>>>>>> Also note that 3.2 is lacking much more critical fixes than those few
>>>>>>>> around KVM. IOW: Don't use it for anything serious with x86.
>>>>>>>
>>>>>>>
>>>>>>> Maybe reverting the mprotect/ipipe_pin_vma patches in the 3.2 branch, so
>>>>>>> as to avoid the zero page corruption, but take some faults sometimes
>>>>>>> would be a simple, feasible solution? 3.2 seems to have been chosen as a
>>>>>>> long term stable branch.
>>>>>>
>>>>>> Again, the problem is not writing the patches
>>>>>
>>>>>
>>>>> It is easy to forget a patch when (back)porting patches from an I-pipe
>>>>> to the other.
>>>>>
>>>>>> but testing all the stuff
>>>>>> in all necessary combinations.
> 
> So.. does 3.2 or 3.4 (at least an LTS kernel) will be supported or it's better to use only the 3.5.7 (EOL)?

For the time being and as you depend on KVM, use my queues/core-3.5 branch.

> I think if a kernel patch has serious problems should be marked as broken or unstable.

I agree, and I already requested to remove patches from the Xenomai code
base at least that contain known bugs. Should improve over the next
releases.

Jan

-- 
Siemens AG, Corporate Technology, CT RTC ITP SDP-DE
Corporate Competence Center Embedded Linux


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2013-03-04 11:59 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-01 15:33 [Xenomai] kvm freeze with ipipe patch for kernel 3.x Gabriele Moabiti
2013-03-01 17:09 ` Jan Kiszka
2013-03-01 17:35   ` Jan Kiszka
2013-03-02  0:47     ` Gabriele Moabiti
2013-03-02  8:17       ` Jan Kiszka
2013-03-02 11:01         ` Gilles Chanteperdrix
2013-03-02 11:12           ` Jan Kiszka
2013-03-02 14:20             ` Gilles Chanteperdrix
2013-03-02 14:38               ` Jan Kiszka
2013-03-02 14:41                 ` Gilles Chanteperdrix
2013-03-03  8:49                   ` Jan Kiszka
2013-03-03  9:00                     ` Gilles Chanteperdrix
2013-03-03 21:15                       ` Gabriele Moabiti
2013-03-04 11:59                         ` Jan Kiszka

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.