All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: Fabien MAHOT <fabien.mahot@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] Problem with time-out ends
Date: Mon, 30 Jun 2008 16:30:36 +0200	[thread overview]
Message-ID: <4868EE0C.7050003@domain.hid> (raw)
In-Reply-To: <4867AA72.8080108@domain.hid>

[-- Attachment #1: Type: text/plain, Size: 443 bytes --]

Gilles Chanteperdrix wrote:
> Fabien MAHOT wrote:
>> Hello,
>>
>> I would like to know if you find something about my problem? Do you have
>> more clues with the "frame pointers" debug?
> 
> Hi Fabien,
> 
> I found something. Could you try the attached patch, to see if we are
> spotting the right bug ?

Ok. Here comes a better patch. To be applied to the I-pipe patched kernel.

-- 
                                                  Gilles.

[-- Attachment #2: ipipe-longer-atomicswitch.diff --]
[-- Type: text/plain, Size: 1004 bytes --]

diff --git a/kernel/sched.c b/kernel/sched.c
index a4bf7d3..0865f23 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -2488,6 +2488,8 @@ context_switch(struct rq *rq, struct task_struct
*prev,

     barrier();

+    prev->state &= ~TASK_ATOMICSWITCH;
+
     if (task_hijacked(prev))
         return 1;
     /*
@@ -4161,11 +4163,9 @@ need_resched:
     rcu_qsctr_inc(cpu);
     prev = rq->curr;
     switch_count = &prev->nivcsw;
-     if (unlikely(prev->state & TASK_ATOMICSWITCH)) {
-         prev->state &= ~TASK_ATOMICSWITCH;
+     if (unlikely(prev->state & TASK_ATOMICSWITCH))
         /* Pop one disable level -- one still remains. */
         preempt_enable();
-     }

     release_kernel_lock(prev);
 need_resched_nonpreemptible:
@@ -4216,8 +4216,10 @@ need_resched_nonpreemptible:
          */
         cpu = smp_processor_id();
         rq = cpu_rq(cpu);
-    } else
+    } else {
+        prev->state &= ~TASK_ATOMICSWITCH;
         spin_unlock_irq(&rq->lock);
+    }

     hrtick_set(rq);

  reply	other threads:[~2008-06-30 14:30 UTC|newest]

Thread overview: 61+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-19 12:14 [Xenomai-help] Problem with time-out ends Fabien MAHOT
2008-05-19 12:32 ` Gilles Chanteperdrix
2008-05-19 12:57   ` Gilles Chanteperdrix
2008-05-19 15:48     ` Fabien MAHOT
2008-05-19 15:57       ` Gilles Chanteperdrix
2008-05-19 19:47         ` [Xenomai-help] Patching order George Pitich
2008-05-19 19:56           ` Gilles Chanteperdrix
2008-05-20 14:30         ` [Xenomai-help] Problem with time-out ends Fabien MAHOT
2008-05-20 15:23           ` Gilles Chanteperdrix
2008-05-20 17:42             ` Anders Blomdell
2008-05-20 19:34           ` Gilles Chanteperdrix
2008-05-20 19:38           ` Gilles Chanteperdrix
2008-05-21 14:24             ` Fabien MAHOT
2008-05-21 14:33               ` Gilles Chanteperdrix
2008-05-21 16:18                 ` Fabien MAHOT
2008-05-21 18:44                   ` Gilles Chanteperdrix
2008-05-22 14:51                     ` Fabien MAHOT
2008-05-22 15:09                       ` Gilles Chanteperdrix
2008-05-22 15:19                       ` Gilles Chanteperdrix
2008-05-23 13:31                         ` Fabien MAHOT
2008-05-23 13:55                           ` Gilles Chanteperdrix
2008-05-26  8:14                             ` Fabien MAHOT
2008-05-26 11:55                               ` Gilles Chanteperdrix
2008-05-27  2:30                               ` Gilles Chanteperdrix
2008-05-28 16:29                                 ` Fabien MAHOT
2008-05-28 16:31                                   ` Gilles Chanteperdrix
2008-05-29  6:36                                     ` Fabien MAHOT
2008-05-29 11:26                                     ` Fabien MAHOT
2008-05-29 13:14                                       ` Gilles Chanteperdrix
2008-05-30 13:20                                         ` Fabien MAHOT
2008-05-30 14:08                                           ` Gilles Chanteperdrix
2008-05-30 22:05                                           ` Gilles Chanteperdrix
2008-06-03  9:02                                             ` Fabien MAHOT
2008-06-03  9:12                                               ` Gilles Chanteperdrix
2008-06-03 12:10                                                 ` Gilles Chanteperdrix
2008-06-03 12:48                                                   ` Fabien MAHOT
2008-06-03 12:53                                                     ` Gilles Chanteperdrix
2008-06-03 13:04                                                       ` Fabien MAHOT
2008-06-04  9:38                                                   ` Fabien MAHOT
2008-06-13 14:36                                             ` Fabien MAHOT
2008-06-13 15:03                                               ` Gilles Chanteperdrix
2008-06-13 15:43                                               ` Gilles Chanteperdrix
2008-06-16  6:40                                                 ` Fabien MAHOT
2008-06-16  9:33                                                   ` Gilles Chanteperdrix
2008-06-16 12:04                                                     ` Fabien MAHOT
     [not found]                                                     ` <7379.62.39.72.60.1213803323.squirrel@domain.hid>
2008-06-29 15:29                                                       ` Gilles Chanteperdrix
2008-06-30 14:30                                                         ` Gilles Chanteperdrix [this message]
2008-06-22 14:44                                               ` Gilles Chanteperdrix
2008-06-23  7:23                                                 ` Fabien MAHOT
2008-06-23  9:33                                                   ` Gilles Chanteperdrix
2008-06-23 10:04                                                     ` Fabien MAHOT
2008-05-26 23:48                           ` Gilles Chanteperdrix
2008-05-27  1:04                           ` Gilles Chanteperdrix
     [not found] <C1C62166118DFA4A8BBA01A2411F0D170BF3D1BE92@domain.hid>
2008-07-25 17:02 ` Gilles Chanteperdrix
     [not found]   ` <C1C62166118DFA4A8BBA01A2411F0D170BF3DB1DB6@domain.hid>
2008-08-19 14:23     ` Gilles Chanteperdrix
     [not found]     ` <48ABDA75.70901@domain.hid>
     [not found]       ` <C1C62166118DFA4A8BBA01A2411F0D170E9BD4FF66@domain.hid>
2008-08-20 14:01         ` Gilles Chanteperdrix
2008-08-20 16:45           ` Gilles Chanteperdrix
     [not found]             ` <C1C62166118DFA4A8BBA01A2411F0D170E9BD4FFDD@PRI-MBX-101.dom1.vinci-energies.net>
2008-08-21 12:34               ` Gilles Chanteperdrix
2008-08-21 12:45               ` Gilles Chanteperdrix
     [not found]                 ` <C1C62166118DFA4A8BBA01A2411F0D170E9BD5002E@PRI-MBX-101.dom1.vinci-energies.net>
2008-08-21 17:29                   ` Gilles Chanteperdrix
     [not found]                     ` <C1C62166118DFA4A8BBA01A2411F0D170E9BD50078@domain.hid>
2008-08-22 12:07                       ` Gilles Chanteperdrix

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4868EE0C.7050003@domain.hid \
    --to=gilles.chanteperdrix@xenomai.org \
    --cc=fabien.mahot@domain.hid \
    --cc=xenomai@xenomai.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.