I’m writing a network related program in linux. the program is in kernel space and not user space. All I need in this program is a regular expression library that supports all gnu regex library features plus non-greedy repeat. Is there any such library that has those features and also I can compile and use it in kernel space? Answer
Tag: kernel
Setting limit to total physical memory available in Linux
I know that I am supposed to set mem=MEMORY_LIMIT. But I do not know where to go, during runtime, or during boot time, in order to set a limit to the total physical memory that the OS has control of. I am running I/O benchmarks, and I would like to limit the amount of overall physical memory that is available.
What is the meaning of question marks ‘?’ in Linux kernel panic call traces?
The Call Trace contains entries like that: What is the meaning of the ‘?’ mark before AnotherFunctionName? Answer ‘?’ means that the information about this stack entry is probably not reliable. The stack output mechanism (see the implementation of dump_trace() function) was unable to prove that the address it has found is a valid return address in the call stack.
Linux Kernel Memory Management Paging Levels
I’m reading through the book “Understanding Linux Kernel” by Bovet and Cesati. In the second chapter, under “Paging in Linux” the author mentions how Page Middle and Upper Directories are eliminated with 32 architectures not having PAE enabled. I’m having trouble following what the author means. They have been loose in their treatment and does not make a whole lot
Context switches much slower in new linux kernels
We are looking to upgrade the OS on our servers from Ubuntu 10.04 LTS to Ubuntu 12.04 LTS. Unfortunately, it seems that the latency to run a thread that has become runnable has significantly increased from the 2.6 kernel to the 3.2 kernel. In fact the latency numbers we are getting are hard to believe. Let me be more specific
Why is the close function is called release in `struct file_operations` in the Linux kernel?
I’m trying to make a linux kernel module, which supports open, close, read and write operations. So I want to register these functions via struct file_operations, however I can’t find ‘close’ entry in the struct. I think I should use ‘release’ instead of ‘close’, but I wonder why the name is ‘release’ and not ‘close’? Answer Because the file may
How do I know if my server has NUMA?
Hopping from Java Garbage Collection, I came across JVM settings for NUMA. Curiously I wanted to check if my CentOS server has NUMA capabilities or not. Is there a *ix command or utility that could grab this info? Answer I’m no expert here, but here’s something: Box 1, no NUMA: Box 2, some NUMA:
The difference between initrd and initramfs?
As far as I know, initrd acts as a block device, thus requiring a filesystem driver (such as ext2). The kernel must have at least one built-in module for detecting filesystem of initrd. In this article, Introducing initramfs, a new model for initial RAM disks, it is written that: But ramdisks actually waste even more memory due to caching. Linux
In what context Kernel Thread runs in Linux?
I am newbie to Linux Kernel. I know that there are two context 1. Process Context, running in user space or in Kernel Space (for ex: as part of System call) 2. Interrupt Context In what context Kernel Thread (not related to any User Thread, for ex:flush task) runs ? Is there any other context other than Process and Interrupt
How do I execute javascript programs from the Linux shell?
I would like to execute my javascript programs with the Rhino shell without making the first line #!/bin/sh. ‘#’ isn’t a comment character in javascript. I also don’t want to have to have a .js extension. Is this possible? I remember reading something a long while about a method of making java programs to run without an explicit interpreter. Google