embedded-linux

How to check whether SMP is enabled or disabled in the kernel?

狂风中的少年 提交于 2021-01-27 04:49:19
问题 I was wondering how can I check on my running machine, whether the kernel is configured for SMP or not? Of course, I can look into the kernel .config file and can search for it. But, the question is let's say I don't have a source code, how will I check the SMP configuration? Is there any proc file to check it? The following says that I have no multi-cores: #cat /proc/cpuinfo processor : 1 cpu model : Broadcom BMIPS5000 V1.1 FPU V0.1 BogoMIPS : 651.26 cpu MHz : 1305.018 wait instruction : yes

Unexpected periodic behaviour of an ultra low latency hard real time multi-threaded x86 code

安稳与你 提交于 2021-01-21 11:22:14
问题 I am running code in a loop for multiple iterations on a dedicated CPU with RT priority and want to observe its behaviour over a long time. I found a very strange periodic behaviour of the code. Briefly, this is what the code does: Arraythread { while(1) { if(flag) Multiply matrix record time; reset flag; } } mainthread { for(30 mins) { set flag; record time; busy while(500 μs) } } Here are the details about the machine I am using: CPU: Intel(R) Xeon(R) Gold 6230 CPU @ 2.10 GHz L1 cache: 32K

Unexpected periodic behaviour of an ultra low latency hard real time multi-threaded x86 code

我与影子孤独终老i 提交于 2021-01-21 11:20:38
问题 I am running code in a loop for multiple iterations on a dedicated CPU with RT priority and want to observe its behaviour over a long time. I found a very strange periodic behaviour of the code. Briefly, this is what the code does: Arraythread { while(1) { if(flag) Multiply matrix record time; reset flag; } } mainthread { for(30 mins) { set flag; record time; busy while(500 μs) } } Here are the details about the machine I am using: CPU: Intel(R) Xeon(R) Gold 6230 CPU @ 2.10 GHz L1 cache: 32K

Unexpected periodic behaviour of an ultra low latency hard real time multi-threaded x86 code

a 夏天 提交于 2021-01-21 11:19:03
问题 I am running code in a loop for multiple iterations on a dedicated CPU with RT priority and want to observe its behaviour over a long time. I found a very strange periodic behaviour of the code. Briefly, this is what the code does: Arraythread { while(1) { if(flag) Multiply matrix record time; reset flag; } } mainthread { for(30 mins) { set flag; record time; busy while(500 μs) } } Here are the details about the machine I am using: CPU: Intel(R) Xeon(R) Gold 6230 CPU @ 2.10 GHz L1 cache: 32K

free() not freeing memory in embedded linux.

寵の児 提交于 2020-12-10 07:56:23
问题 I have allocated memory using malloc() in embedded Linux (around 10 MB). And checked the free memory it was 67080 kB but even after freeing it using free() it remains the same. It is only after the application is terminated the memory is available again. Does free() not make the freed memory available to the system, if so how to make it available. 回答1: Does free() not make the freed memory available to the system. No, usually not. malloc() normally requests memory from the OS by the low level

How Linux arm64 switch between AArch32 and AArch64

点点圈 提交于 2020-12-04 05:28:18
问题 Linux supports running 32-bit application, as long as kernel enables CONFIG_COMPAT the hardware supports the AArch32 I assume that 32-bit application must run in arm AArch32 execution state and if the environment has 32-bit application and 64-bit application. 32-bit application process -> arm state is AArch32 64-bit application process and kernel -> arm state is AArch64 Is it correct? If so, how does the Linux handle the AArch32 and AArch64 switch? Does the kernel know the running process is

How Linux arm64 switch between AArch32 and AArch64

送分小仙女□ 提交于 2020-12-04 05:26:01
问题 Linux supports running 32-bit application, as long as kernel enables CONFIG_COMPAT the hardware supports the AArch32 I assume that 32-bit application must run in arm AArch32 execution state and if the environment has 32-bit application and 64-bit application. 32-bit application process -> arm state is AArch32 64-bit application process and kernel -> arm state is AArch64 Is it correct? If so, how does the Linux handle the AArch32 and AArch64 switch? Does the kernel know the running process is

what is the /sys/class/gpio/export and `/sys/class/gpio/unexport mechanism and what is the underlying sysfs functionality?

柔情痞子 提交于 2020-11-29 19:10:19
问题 Using the legacy sysfs GPIO under Android and Linux the first step in the process is toe export the particular GPIO pins you want to use. And when you are done with the GPIO pin to unexport it. I've been looking for an explanation of what the export command actually does however everything I've found is about the builtin bash command which has nothing to do with GPIO. Then I realized the actual command from the command line was echo 938 > /sys/class/gpio/export and /sys/class/gpio/export is a

what is the /sys/class/gpio/export and `/sys/class/gpio/unexport mechanism and what is the underlying sysfs functionality?

社会主义新天地 提交于 2020-11-29 19:05:53
问题 Using the legacy sysfs GPIO under Android and Linux the first step in the process is toe export the particular GPIO pins you want to use. And when you are done with the GPIO pin to unexport it. I've been looking for an explanation of what the export command actually does however everything I've found is about the builtin bash command which has nothing to do with GPIO. Then I realized the actual command from the command line was echo 938 > /sys/class/gpio/export and /sys/class/gpio/export is a

what is the /sys/class/gpio/export and `/sys/class/gpio/unexport mechanism and what is the underlying sysfs functionality?

删除回忆录丶 提交于 2020-11-29 19:05:38
问题 Using the legacy sysfs GPIO under Android and Linux the first step in the process is toe export the particular GPIO pins you want to use. And when you are done with the GPIO pin to unexport it. I've been looking for an explanation of what the export command actually does however everything I've found is about the builtin bash command which has nothing to do with GPIO. Then I realized the actual command from the command line was echo 938 > /sys/class/gpio/export and /sys/class/gpio/export is a