In sched.h, task_struct has following 2 fields: thread_group & thread_node. They keep the first element of their list but I could not find which type of variables they contain. Answer thread_group and thread_node are both intrusive linked-lists of all the threads in a thread group – they are use to link together task_structs, they don’t “contain” anything. The difference between
Tag: linux-kernel
How does perf associate events to functions?
More precisely how does the perf tool associate PMU events to functions i already realized that when the kernel perf subsystem records the event counters it also records the Program Counter (PC) so it can associate the count to a function. However to really get fine grain result, you need to sample the counters in a very high rate, otherwise
How do I use a newer perf tool front end with a record from an older perf version
I am running perf record on an older version of the kernel on an ARM board. The kernel version is 3.18.21-rt19 The perf version on the board is similarly perf version 3.18.21. While I can record and use the report feature on this perf, the TUI for report on this version is quite awful/non-existent. Instead of the expandable sections (in
What is use of struct i2c_device_id if we are already using struct of_device_id?
I was trying to understand a codec driver code on Linux kernel 4.4. The codec is connected to sound card using i2c bus and the codec driver code is written as I2C client. Client’s struct i2c_driver contains both i2c_device_id information and of_device_id information. Now as per my understanding client’s probe function will be called when compatible string of struct of_device_id
Linux default scheduler alternatives
The Linux kernel implements the Completely Fair Scheduling (SCHED_NORMAL) algorithm as its default scheduling algorithm for scheduling real-time processes. How to modify the linux kernel such that the default scheduling policy is set to round-robin (SCHED_RR) or any other scheduling policy ? Is there a generic way to do so ? What files need to be exactly changed here ?
Read /proc//fd/ without full root access
I have a program (https://github.com/raboof/connbeat) that relies on /proc/[pid]/fd/* to find processes given a (networking) inode. /proc/[pid]/fd can only be read by root, but I’d like to drop privileges as much as possible for security. Is there some way I could (efficiently) get to the relationship between processes and inodes without requiring full root rights? Perhaps some syscall that I
Checking if errno != EINTR: what does it mean?
I’ve found this piece of code used several times (also a similar one where it’s used open() instead of write()). Why it is checked if && errno != EINTR here ? Looking for errno on man I found the following text about EINTR, but even if I visited man 7 signal that doesn’t enlighten me. EINTR Interrupted function call (POSIX.1);
How can I “mount” within my process space without being root?
I’m trying to mount overlayfs without being root in my C++ code; I would want to be able to have this mount happen and be visible just for my own process and its descendants: Unfortunately the error I get is Operation not permitted. How can I make this happen? Even a simple tmpfs mount fails not being root; I’m running
Linux device tree (AD5628)
I am trying to use AD5628 Digital to analog converter on my raspberry Pi 3 board . I have enabled the driver for that (http://lxr.free-electrons.com/source/drivers/iio/dac/ad5064.c) in the Yocto kernel . But when i opened the path /sys/bus/iio/devices/ Mentioned in (https://wiki.analog.com/resources/tools-software/linux-drivers/iio-dac/ad5446) i am not getting any device0. I got to know that it is a Device tree issue , So i
U-boot to load two images on separate cores
I have NXP/Free-scale Imx6 sabre lite development board. My task is to flash two OS kernels (Linux and RTOS)in such a way that linux runs on core0 and RTOS on core1. I have 1GB DDR3 in which i have to allocate first 128MB for RTOS and rest for LINUX image. How to configure U-boot in this case? core-0 should load