All of lore.kernel.org
 help / color / mirror / Atom feed
* CPU core reservation and Latency setting via config
@ 2021-08-25  8:16 Neeraj Agrawal
  2021-08-25  9:38 ` Jan Kiszka
  0 siblings, 1 reply; 2+ messages in thread
From: Neeraj Agrawal @ 2021-08-25  8:16 UTC (permalink / raw)
  To: xenomai

Hello,
Seeking advice on two separate issues. One of them may be just the documentation.

Setup is:
                Building via buildroot
                [Xenomai] Cobalt v3.0.10 is running over qemu with 2 CPUs.
                Linux version 4.14.111.
                bootargs: isolcpus=1 processor.max_cstate=0 intel_idle.max_cstate=0 nosoftlockup=0 rcu_nocbs=1 irqaffinity=0 tsc=reliable .....

Issue 1\ Latency setting:
Referring to https://xenomai.org/documentation/xenomai-3/html/man1/autotune/index.html
-enabling CONFIG_XENO_OPT_AUTOTUNE does create entry as '/dev/rtdm/autotune' in target.
-setting XENO_OPT_TIMING_SCHEDLAT does NOT reflect in '/proc/xenomai/clock/coreclk'
-enabling BR2_PACKAGE_XENOMAI_ANALOGY does build autotune application, but running it on target also does NOT reflect XENO_OPT_TIMING_SCHEDLAT setting in '/proc/xenomai/clock/coreclk'

Is my expectation correct that statically defined gravity values should reflect in coreclk?
-If so, how could it be achieved?
-If not, then how to verify if the values are set/used correctly?


Issue 2\ CPU cores distribution:
If bootargs have both ("isolcpus=1 maxcpus=1"), ie:
                isolcpus=1 maxcpus=1 processor.max_cstate=0 intel_idle.max_cstate=0 nosoftlockup=0 rcu_nocbs=1 irqaffinity=0 tsc=reliable .....
Then i get a boot time crash. [Could not collect the log, but crash indicate somewhere in i-pipe]
Idea behind this is to force Linux to use 1st CPU, there by leaving 2nd CPU dedicated for Xenomai. Either of the entry alone works (but not together).
[Also tried xenomai.supported_cpus=0x02 without success].

Any advice whether it is feasible to boot Xenomai with both these bootargs on my setup?
If so, where i could look into for bootup crash?


Regards
Neeraj

---------------------------------------------------------------------------------------------------------------------------------------
This email and any attachments are confidential and are for the use of the
addressee only. If you are not the addressee, you must not use or disclose the
contents to any other person. Please immediately notify the sender and
delete the email. Statements and opinions expressed here may not
represent those of the company. Email correspondence is monitored by
the company. This information may be subject to export control
regulation. You are obliged to comply with such regulations.
Our data privacy notice<http://www.renishaw.com/privacy> sets out how any personal data that we collect about you will be handled.

Renishaw plc (company number 1106260), Renishaw UK Sales Limited (company number 1418812),
and Wotton Travel Limited (company number 01973158) are companies registered in England
and Wales with a registered office at New Mills, Wotton-under-Edge, Gloucestershire, GL12 8JR, United Kingdom.
Renishaw Neuro Solutions Limited (company number 10375761) is a company registered in England and Wales
with a registered office at Charfield Road, Wotton-under-Edge, Gloucestershire, GL12 8SP, United Kingdom.
Telephone +44 1453 524524
---------------------------------------------------------------------------------------------------------------------------------------

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

* Re: CPU core reservation and Latency setting via config
  2021-08-25  8:16 CPU core reservation and Latency setting via config Neeraj Agrawal
@ 2021-08-25  9:38 ` Jan Kiszka
  0 siblings, 0 replies; 2+ messages in thread
From: Jan Kiszka @ 2021-08-25  9:38 UTC (permalink / raw)
  To: Neeraj Agrawal, xenomai, Philippe Gerum

On 25.08.21 10:16, Neeraj Agrawal via Xenomai wrote:
> Hello,
> Seeking advice on two separate issues. One of them may be just the documentation.
> 
> Setup is:
>                 Building via buildroot
>                 [Xenomai] Cobalt v3.0.10 is running over qemu with 2 CPUs.
>                 Linux version 4.14.111.
>                 bootargs: isolcpus=1 processor.max_cstate=0 intel_idle.max_cstate=0 nosoftlockup=0 rcu_nocbs=1 irqaffinity=0 tsc=reliable .....

Architecture?

> 
> Issue 1\ Latency setting:
> Referring to https://xenomai.org/documentation/xenomai-3/html/man1/autotune/index.html
> -enabling CONFIG_XENO_OPT_AUTOTUNE does create entry as '/dev/rtdm/autotune' in target.
> -setting XENO_OPT_TIMING_SCHEDLAT does NOT reflect in '/proc/xenomai/clock/coreclk'

There is apparently a translation issue. While the config help says you
should specify in nanoseconds, the value is actually accepted in clock
cycles (TSC in case of x86).

Philippe, all those hard-coded values in
kernel/cobalt/arch/*/*/include/asm/xenomai/calibration.h are actually in
ticks? Or are they also in ns, and we need to convert them to ticks as well?

> -enabling BR2_PACKAGE_XENOMAI_ANALOGY does build autotune application, but running it on target also does NOT reflect XENO_OPT_TIMING_SCHEDLAT setting in '/proc/xenomai/clock/coreclk'

That is likely a buildroot topic. Please address via that community
first (provided you meant BR2_PACKAGE_XENOMAI_AUTOTUNE, not ANALOGY).

> 
> Is my expectation correct that statically defined gravity values should reflect in coreclk?
> -If so, how could it be achieved?
> -If not, then how to verify if the values are set/used correctly?
> 
> 
> Issue 2\ CPU cores distribution:
> If bootargs have both ("isolcpus=1 maxcpus=1"), ie:
>                 isolcpus=1 maxcpus=1 processor.max_cstate=0 intel_idle.max_cstate=0 nosoftlockup=0 rcu_nocbs=1 irqaffinity=0 tsc=reliable .....
> Then i get a boot time crash. [Could not collect the log, but crash indicate somewhere in i-pipe]

Indeed, maxcpus=1 crashes on x86 with I-pipe. Not with dovetail (5.10),
though. With maxcpus=1, we start with any core > 0 being offline, and
that is likely not supported by I-pipe. Taking cores offline later on is
supposed to work, though.

> Idea behind this is to force Linux to use 1st CPU, there by leaving 2nd CPU dedicated for Xenomai. Either of the entry alone works (but not together).
> [Also tried xenomai.supported_cpus=0x02 without success].

Try only isolcpus and possibly xenomai.supported_cpus (if you like to
reduce the impact of Xenomai on non-RT CPUs).

Jan

-- 
Siemens AG, T RDA IOT
Corporate Competence Center Embedded Linux


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

end of thread, other threads:[~2021-08-25  9:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-25  8:16 CPU core reservation and Latency setting via config Neeraj Agrawal
2021-08-25  9:38 ` 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.