How to implement futex_wait sysccall for pid
I have a code which puts threads to sleep using futex_wait syscall. how can i put a process to sleep using futex_wait syscall?I understand this program, it creates the thread and put them on sleep and...
View ArticleGPIO: Getting ISR on both edges though edge is set to ''rising"
Specific GPIO pin is connected to switch, upon pressing the switch the ISR needs to triggeredSo I have the userspace application to read the ISR, but i am getting the ISR on both the edges.Receiving...
View Article(linux kernel) Adding new functions in available_filter_functions
Hardware - Raspberry pi 4 Model B 8GBOS - Raspberry pi OS Buster(10)(2020-05-27-raspios-buster-full-armhf.img)(linux kerenl 4.19.y)I added rpi_get_interrupt_info() and modified show_interrupts() in...
View ArticleNo response to GPIO with sysfs
Platform: Intel Apollo Lake N3350OS Platform: Ubuntu 18.04GPIO number: GPIO126$ cat /sys/kernel/debug/gpiogpiochip3: GPIOs 267-309, parent: platform/INT3452:03, INT3452:03:gpiochip2: GPIOs 310-356,...
View Articlekernel hang when not doing tasklet_kill
I write simple code to test the function of tasklet. When I don't do tasklet_kill, the kernel will be hang after the insmod command is using. Since there is no log, I have no idea what happens.The...
View ArticleCentOs in VirtualBox always drive CPU to 100% when wake up from sleep
Environment: macOS Big Sur, VirtualBox6.1, CentOs8.CPU always run to 100% even if CentOs guest is idlefrom search, I known the time interrupt frequency is 10 times higher than other linux.Add parameter...
View ArticleRapsberri Pi 3B+ as a USB device
I have a project that is to allow my Raspberry Pi to be used as a USB storage device by connecting to a computer. Since the computer and the RPi will both behave like a USB master, they will not be...
View ArticleWhat does it mean when a macro store the values inside his own arguments?
rdtsc is used to atomically read the 64-bit counter register in the Linux kernel (TSC) into two 32-bit variables. I read Linux Device Drivers 3 and it says that this macro store the values (low32 and...
View Article"dmesg" not working with Linux Kernel module spanning over multiple files
Hi all Stackoverflow users.I am a beginner into Linux kernel module programming. I have written a simple kernel module having two source files and two header files and the module builds...
View ArticleYocto - Zeus Build Fails at compilation of perf
I am attempting to upgrade Yocto from Thud to Zeus. I am currently running into issues however where perf is being compiled. I have seen a lot of issues with this but I haven't seem to come across any...
View ArticleBest approach to get all recursive child processes of a PID from either the...
Let's say, I have chrome running, which has 100 different processeses, not all of which are direct children. What's the best way to programmatically get all of the processes from either the procfs or...
View ArticleAvoid fallback to "performance" governor from "schedutil" governor in 5.4...
I'm working with 5.4 Kernel on Odroidxu4 board in order to construct an Energy Aware Schedule. I need to use schedutil governor to do that, but altough system boots with schedutil governor, it...
View ArticleUsing printk in tracepoint causes the system to freeze
I am learning tracepoint related knowledge of Linux, and I wrote a module, as shown below.#include <linux/module.h>#include <linux/kernel.h>#include <linux/init.h>#include...
View Articleperf results show a lot of finish_task_switch and seems inconsistent with...
I am trying to analyze CPU issues in my code.(1) atop command shows my application typically taking similar amounts of USR and SYS CPU.(2) however, if I look at my perf results, it looks like kernel...
View ArticleA bash script that monitors number of processes per user count all processes...
The bash script is running successfully, but if you look at the second image you will that some of the count arent aligned. Any ideas why?
View ArticleBreakpoints not being hit in remote linux kernel debugging using gdb
I am trying to remotely debug a linux kernel running on an arm cortex-a9 target using jtag probe and gdb.I can connect to the kernel and halt it with gdb. I am able to set breakpoints in the kernel...
View ArticleNeed help patching kernel [closed]
I am trying to run hpsahba on a Debian VM before I try to use the tool on my Debian server (ML350 G6)Please tell me how to permanently patch the kernel linux 5.10 I am very new to linux please help me...
View Articlegcda file is empty when using GCOV on arm linux kernel
I have rebuilt linux kernel with GCOV enabled on X86 server.Then boot up arm board with the new kernel.I could see below info after boot up.root@imx6qpdlsolox:/sys/kernel/debug/gcov# lshome resetBut...
View ArticleLinux Perf reports less syscall events with the system-wide (-a) option than...
I am using Linux's Perf to profile an AI program's system call behavior. The program is Mozilla's Deepspeech.Specifically, I ran perf stat -e 'syscalls:*' ./my_program, and the output is like this: ......
View ArticleDMA zone free enough but vmalloc with GFP_DMA still failed
I have a memory leak process which cause OOM kill to other process. The OOM log below: [3669.400 s]4,1153,3669403826,-;test_process: vmalloc: allocation failure, allocated 102400 of 135168 bytes,...
View Article