Questions tagged [linux-kernel]

This tag is for questions about the internals of the Linux kernel itself - particularly about writing code that runs within the context of the kernel (like kernel modules or drivers). Questions about writing userspace code in Linux should generally be tagged [linux] instead. Since the internals of the Linux kernel are constantly changing, it is helpful to include the precise kernel version(s) that you are interested in.

This tag is for questions about the internals of the Linux kernel itself - particularly about writing code that runs within the context of the kernel (like kernel modules or drivers).

Questions about writing userspace code in Linux should generally be tagged instead. Since the internals of the Linux kernel are constantly changing, it is helpful to include the precise kernel version(s) that you are interested in.

The kernel is a UNIX-like kernel initially created by Linus Torvalds in 1991 and now is maintained by developers around the world.

Frequently Asked Questions

Online resources

Books

Kernel source code and source code browsers

Further reading

Mailing lists

17371 questions
6
votes
1 answer

what is Inactive(file) and Active(file) in /proc/meminfo?

After ran a process Active(file) and Inactive(file) size is continuously increasing in my Linux system. What is mean by Active(file) and Inactive(file) memory in /proc/meminfo ? $ cat /proc/meminfo MemTotal: 16464260 kB MemFree: 5206868…
BEPP
  • 875
  • 1
  • 12
  • 36
6
votes
4 answers

When I have per-CPU data structures, does it improve performance to have them on different pages?

I have a small struct of per-CPU data in a linux kernel module, where each CPU frequently writes and reads its own data. I know that I need to make sure these items of data aren't on the same cache line, because if they were then the cores would be…
kdt
  • 27,905
  • 33
  • 92
  • 139
6
votes
1 answer

Can Hard and Soft-IRQ for the same network-packet be executed on different CPU-Cores?

Can Hard and Soft-IRQ for the same network-packet be executed on different CPU-Cores when network packets are processed on Linux x86_64 kernel 3.16? Hard-IRQ raises Soft-IRQ: http://she-devel.com/Chaiken_ELCE2016.pdf Soft IRQs may run directly…
Alex
  • 12,578
  • 15
  • 99
  • 195
6
votes
2 answers

How zero-fill-on demand is implemented in Linux kernel, and where I can disable it?

When we malloc memory, only virtual memory is available, and it actually pointed to zero-page. The real physical memory will be allocated when we try to write to the malloced memory, at this moment, there will be copy-on-wright that copy zeros from…
Qinchen
  • 381
  • 1
  • 3
  • 14
6
votes
3 answers

Change default kernel version in GRUB

This is the content of the grub.cfg file of my Arch Linux system. # # DO NOT EDIT THIS FILE # # It is automatically generated by grub-mkconfig using templates # from /etc/grub.d and settings from /etc/default/grub # ### BEGIN /etc/grub.d/00_header…
Júlio César
  • 95
  • 2
  • 7
6
votes
1 answer

Generating segfault from a custom syscall

I'm doing copy_to_user() from a syscall. How can I get it to generate a segfault or sigbus on error, as if userspace was trying to access the same memory?
Petr Skocik
  • 58,047
  • 6
  • 95
  • 142
6
votes
2 answers

LKML mailing list RSS feed?

I am keen on following the activity that goes on on the official Linux Kernel Mailing list (https://lkml.org/). Looking through the website, it seems quite a tedious task to follow any thread or topic of interest. Alternatively, I was wondering if…
TheLoneJoker
  • 1,589
  • 1
  • 23
  • 36
6
votes
2 answers

What is the difference between DMA-Engine and DMA-Controller?

As mentioned above, what is the difference between a dma engine and a dma-controller (on focus on linux)? When does the linux dma engine come into place? Is this a special device or always part of all periphery devices, which support dma? When…
john s.
  • 476
  • 9
  • 21
6
votes
2 answers

File systems with support to directory hard-linking

Does anybody know one? preferrably with linux implementation? alternatively, does anybody know how much effort would it take to add it in any open-source implementation? (i mean: maybe it's enough to change an if statement, maybe i have to go…
ribamar
  • 1,435
  • 1
  • 16
  • 26
6
votes
2 answers

nfhook (netfilter) error: assignment from incompatible pointer type

I have seen this page with similar error message: Nf_hook_ops returns incompatible pointer when assigning to hook_func -C -Linux -Netfilter However, it didn't give a clear answer to how to solve the issue. The author for that question says that he…
6
votes
1 answer

Building Perf with Babeltrace (for Perf to CTF Conversion)

I am trying to use TraceCompass in order to further investigate my system trace. For that purpose, you need CTF format and there are two possible ways to obtain it in Linux, afaik: Using LTTng for tracing and using CTF format from that Using 'perf…
mozcelikors
  • 2,582
  • 8
  • 43
  • 77
6
votes
2 answers

Linux SLUB: Unable to allocate memory on node

We are getting very frequently below message in /var/log/messages kernel: SLUB: Unable to allocate memory on node -1 (gfp=0x8020) In some cases followed by an allocation table kernel: cache:…
Pawan Kumar
  • 830
  • 1
  • 9
  • 15
6
votes
3 answers

How to enable SD card with Nios II MMU and Linux 4.9

I fetched and built the linux-socfpa for my Altera DE2-115. I used buildroot and u-boot to build it. It starts but there is no filesystem. I have an SD card plugged into the FPGA, is there some way I can use the SD card as a filesystem? System…
Niklas Rosencrantz
  • 25,640
  • 75
  • 229
  • 424
6
votes
1 answer

buildroot for arm kernel defconfig

I am trying to build a buildroot with kernel image, and after doing make menuconfig and make, I am getting: No kernel defconfig name specified, check your BR2_LINUX_KERNEL_DEFCONFIG setting I can set a string to the defconfig, but I don't know what…
Gobliins
  • 3,848
  • 16
  • 67
  • 122
6
votes
2 answers

Arm64 Linux Page Table Walk

Currently I'm developing some research-related programs and I need to find the pte of some specific addresses. My development environment is Juno r1 board (CPUs are A53 and A57 ) and it's running arm64 Linux kernel. I use some typical page table…
S.Wan
  • 396
  • 3
  • 18