xenomai.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: "Schuman Eelco (DC-AE/ESW5)" <Eelco.Schuman@boschrexroth.nl>
To: "xenomai@lists.linux.dev" <xenomai@lists.linux.dev>
Subject: RE: Question about a freeze under Xenomai 3.2.1
Date: Wed, 10 May 2023 08:19:53 +0000	[thread overview]
Message-ID: <DB7PR10MB245939B8B568AFB4C7688959EC779@DB7PR10MB2459.EURPRD10.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <6814fa90-015e-91df-6941-db643e4d4229@smile.fr>


Hi,

>With your suggestions I finally had a working setup with SMP:

>The culprit shown itself when I printed the original timer that is 
>proxied by the timer_proxy,

>On the non-SMP kernel the timer is set to "arm_global_timer", while on SMP it was set to "local_timer" :


> From what I understood, there is one timer per CPU , while the 
>arm_global_timer is global to the system.

>Digging a little more, I found out that the local_timer was implemented 
>by the "scutimer" on the zynq7000 platform.
>As a first approach, I just disabled this timer in the DTS.
>
>With that the proxy original clock is now arm_glocal_timer for both CPU 
>and it work.

>However.... I have a bad feeling about this, it look like I did not go 
>down to the real issue which is that the scutimer does not generate 
>timer events as it should.

I disabled only the generation of clockevents for the default timer ( arch/arm/kernel/smp_twd.c ). Both timers are running but the global timer is now used for the clockevents. I'm not sure if this is the best solution or  if it has an impact on performance. 

static void twd_timer_setup(void)
{
	struct clock_event_device *clk = raw_cpu_ptr(twd_evt);
	int cpu = smp_processor_id();
...
...
	//clockevents_config_and_register(clk, twd_timer_rate,                do not use this timer for clockevents
	//				0xf, 0xffffffff);
	enable_percpu_irq(clk->irq, 0);
}

This is with linux-v5.10.153-dovetail1.

Eelco Schuman

      reply	other threads:[~2023-05-10  8:19 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-03 13:43 Question about a freeze under Xenomai 3.2.1 Julien Aube
2023-05-03 14:57 ` Jan Kiszka
2023-05-04 13:33   ` Julien Aube
2023-05-04 14:17     ` Jan Kiszka
2023-05-04 14:27       ` Julien Aube
2023-05-04 15:00         ` Greg Gallagher
2023-05-04 15:50           ` Julien Aube
2023-05-05  7:36             ` Schuman Eelco (DC-AE/ESW5)
2023-05-05 13:21               ` Jan Kiszka
2023-05-05 13:31                 ` Julien Aube
2023-05-08 17:49                 ` Julien Aube
2023-05-10  8:19                   ` Schuman Eelco (DC-AE/ESW5) [this message]

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=DB7PR10MB245939B8B568AFB4C7688959EC779@DB7PR10MB2459.EURPRD10.PROD.OUTLOOK.COM \
    --to=eelco.schuman@boschrexroth.nl \
    --cc=xenomai@lists.linux.dev \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).