Skip to content
Advertisement

Tag: linux-kernel

Linux kernel: get information of page cache distribution over NUMA nodes

When Linux kernel runs on NUMA, each NUMA node has partially separate memory management. There is echo ‘?’ > /proc/sysrq-trigger function “Will dump current memory info to your console.” of SysRq (implemented as sysrq_handle_showmem and show_mem) to get basic memory statistics for every NUMA node to system console, dmesg and system kernel log. As I understand, there is data printed

Reading in kernel second time overrides first instance

I have written a read function to read a file into buffer in Kernel space. Now, this function works really well and I am able to read contents of filename into buf by calling this function from my system call Then, I am calling this function again to read contents of secondfile into secondbuffer. The problem is that after calling

Linux user space threads, kernel threads , lightweight processes

I am bit confused with all this enteties and how they interconnected in Linux. “Unix internals” book states that lightweight process (LWP) is kernel-supported user thread, and that kernel doesn’t see threads inside processes. Is it stil true for Linux? As I understand, user-space threads scheduled inside process, by higher level abstraction as pthread library, without kernel’s intervention. Am I

Security concerns around KSM

When using KSM (Kernel Same-page Mapping), if two completely identical pages of memory are owned by two completely isolated processes, for example, two virtual machines, will those pages be merged? Or will they remain separate due to the fact that each process is isolated from each other? I’m confused because the VMs boil down to a single process on the

How does linux kernel switch between user-mode and kernel-mode stack?

How does linux kernel switch between user-mode and kernel-mode stack when a system call or an interrupt appears? I mean what is the exact mechanism – what happens to user-mode stack pointer and where does kernel-mode stack pointer come from? What is done by hardware and what must be done by software? Answer All of the words below are about

Advertisement