Everything about UNIX kernels: development, configuration, compilation, design, etc.

learn more… | top users | synonyms

67
votes
3answers
37k views

How do I read from /proc/$pid/mem under Linux?

The Linux proc(5) man page tells me that /proc/$pid/mem “can be used to access the pages of a process's memory”. But a straightforward attempt to use it only gives me $ cat /proc/$$/mem ...
23
votes
4answers
1k views

What are the responsibilities of each Pseudo-Terminal (PTY) component (software, master side, slave side)?

I am trying to figure out how a tty works1 (the work-flow and responsibilities of each elements). I have read several interesting articles about it, but there are still some blurry areas. This is ...
38
votes
2answers
46k views

How do you empty the buffers and cache on a Linux system?

Prior to doing some benchmarking work how would one free up the memory (RAM) that the Linux Kernel is consuming for its buffers and cache?
43
votes
4answers
61k views

How to reload udev rules without reboot?

How should one reload udev rules, so that newly created one can function? I'm running Arch Linux, and I don't have a udevstart command here. Also checked /etc/rc.d, no udev service there.
17
votes
2answers
4k views

How to blacklist a correct bad RAM sector according to MemTest86+ error indication?

MemTest86+ (the version included with Ubuntu 13.04) says Failing address: 002f796c48 - 759.5 MB What should I specify in the memmap kernel parameter to bypass this area? I've tried running ...
9
votes
1answer
6k views

Description of kernel.printk values

Between Debian 5 and 6, the default suggested value for kernel.printk in /etc/sysctl.conf was changed from kernel.printk = 4 4 1 7 to kernel.printk = 3 4 1 3. I understand that the first value ...
25
votes
7answers
18k views

Linux Kernel: Good beginners' tutorial

I'm interested in modifying the kernel internals, applying patches, handling device drivers and modules, for my own personal fun. Is there a comprehensive resource for kernel hacking, intended for ...
21
votes
1answer
2k views

Why isn't a straightforward 1/5/15 minute moving average used in Linux load calculation?

Until recently i thought the load average (as shown for example in top) was a moving average on the n last values of the number of process in state "runnable" or "running". And n would have been ...
19
votes
3answers
4k views

What does the vm.swappiness parameter really control?

Per the kernel documentation: This control is used to define how aggressive the kernel will swap memory pages. Higher values will increase aggressiveness, lower values decrease the amount of swap. ...
13
votes
1answer
2k views

How do pdflush, kjournald, swapd, etc interoperate?

Recently saw a question that sparked this thought. Couldn't really find an answer here or via the Google machine. Basically, I'm interested in knowing how the kernel I/O architecture is layered. For ...
9
votes
4answers
4k views

How can same fd in different processes point to the same file?

Say I have process 1 and process 2. Both have a file descriptor corresponding to the integer 4. In each process however the file descriptor 4 points to a totally different file in the Open File Table ...
10
votes
6answers
2k views

Can Linux “run out of RAM”?

I saw several posts around the web of people apparently complaining about a hosted VPS unexpectedly killing processes because they used too much RAM. How is this possible? I thought all modern OS' ...
21
votes
2answers
12k views

Why is swappiness set to 60 by default?

I just read some stuff about swappiness on Linux. I don't understand why the default is set to 60. According to me this parameter should be set to 10 in order to reduce swap. Swap is on my hard ...
9
votes
1answer
1k views

What's the progress regarding improving system performance/responsiveness during high disk I/O?

Whenever there is high disk I/O, the system tends to be much slower and less responsive than usual. What's the progress on Linux kernel regarding this? Is this problem actively being worked on?
3
votes
4answers
7k views

How do I upgrade the Debian Wheezy kernel offline?

I using Debian (Wheezy) with the 3.2.0-4 amd64 kernel version and want to upgrade my kernel to newest version, like 3.13.3 stable, but I have no internet connection to my Debian OS. I have installed ...
11
votes
1answer
4k views

What does a kernel source tree contain? Is this related to Linux kernel headers?

In books, I typically read references to the Linux Source Tree at /usr/src/linux with the usual set of subdirectories (arch, block, crypto, ...). I was expecting this tree to contain the binary files ...
8
votes
1answer
2k views

When was `relatime` made the default?

What is the first Linux kernel release to set relatime as the default mount option?
55
votes
5answers
27k views

What are high memory and low memory on Linux?

I'm interested in the difference between Highmem and Lowmem: Why is there such a differentiation? What do we gain by doing so? What features does each have?
66
votes
12answers
9k views

What is the benefit of compiling your own linux kernel?

What benefit could I see by compiling a Linux kernel myself? Is there some efficiency you could create by customizing it to your hardware?
35
votes
4answers
47k views

What is the difference between reboot , init 6 and shutdown -r now?

I just want to know difference between in reboot init 6 shutdown -r now and which is the safest and the best?
25
votes
12answers
3k views

How can I tweak my Linux desktop to be more responsive?

I have the experience that Linux works fine until the physical memory is exhausted. As soon as swap space is used the performance is severely degraded and the GUI becomes unresponsive. This problem ...
11
votes
1answer
5k views

What does the Virtual kernel Memory Layout in dmesg imply?

While going through the "Output of dmesg" I could see a list of values which i am not able to understand properly. Memory: 2047804k/2086248k available (3179k kernel code, 37232k reserved, 1935k ...
5
votes
6answers
9k views

How does a kernel mount the root partition?

My question is with regards to booting a Linux system from a separate /boot partition. If most configuration files are located on a separate / partition, how does the kernel correctly mount it at boot ...
13
votes
3answers
626 views

Contents of /proc

Is there a site someplace that lists the contents of /proc and what each entry means?
8
votes
2answers
6k views

Cleancache vs zram?

I have an old laptop here with only 512 MB of RAM. Since a few kernel releases, I am using zram to convert 256 MB of it to a compressed ramdisk which is then used as swap. This has proved to be very ...
6
votes
3answers
4k views

How to generate initramfs image with busybox links?

Having been directed to initramfs by an answer to my earlier question (thanks!), I've been working on getting initramfs working. I can now boot the kernel and drop to a shell prompt, where I can ...
15
votes
6answers
5k views

How does Linux kernel compare to microkernel architectures?

I read once that one advantage of a microkernel architecture is that you can stop/start essential services like networking and filesystems, without needing to restart the whole system. But considering ...
13
votes
4answers
14k views

disable transparent hugepages

We are installing SAP HANA in a RAID machine. As part of the installation step, it is mentioned that, To disable the usage of transparent hugepages set the kernel settings at runtime with echo ...
7
votes
1answer
4k views

What is the loopback interface

What is the loopback interface and how does it differ from the eth0 interface? And why do I need to use it when mounting an ISO or running a service on localhost?
9
votes
3answers
3k views

How do I begin with building a Linux system from scratch?

I tried to make an operating system with my on custom built kernel. It didn't work out too well. I am using Ubuntu and have downloaded Linux 3.2.7 from kernel.org . I am not trying to change the ...
5
votes
1answer
474 views

What are the main differences between Unix and Linux kernels today?

I know that many of the same programs run flawlessly on top of both kernels. I know that historically, the two kernels came from different origins. I know philosophically too that they stood for ...
10
votes
3answers
1k views

What defines the maximum size for a command single argument?

I was under the impression that the maximum length of a single argument was not the problem here so much as the total size of the overall argument array plus the size of the environment, which is ...
7
votes
1answer
590 views

Linux kernel 3.3 power regression

I am using Fedora 16 in my DELL n4110. I recently upgraded the kernel from 3.2 to 3.3. In contradiction to the official claim, my system still drains battery as hell. It only provides 1:30 to 2 hrs of ...
3
votes
1answer
99 views

How security programs like firewall, IPS and IDS have access to network data?

It is said that kernel responsible for the transport, internet and network access layers for a network data. Then, the network data is passed on the appropriate process based on port number. How ...
3
votes
3answers
750 views

Debugging ethernet before NFS boot

I'm trying to boot Linux from U-boot on an embedded ARM board using a filesystem on a remote machine served via NFS. It appears that the ethernet connection is not coming up correctly, which results ...
2
votes
1answer
102 views

Which Debian kernel should I install?

I've started installing Debian testing on amd64 and I've come to a screen asking me to install a kernel. It gives me a choice between linux-image-3.16-2-amd64, linux-image-amd64, and none. What is ...
2
votes
3answers
222 views

Why is kernel boot starting too late

Log message from ARM Cortex A9 based board. Running linux. [Sat Apr 12 19:33:50.207 2014] [Sat Apr 12 19:33:50.207 2014] [Sat Apr 12 19:33:50.207 2014] U-Boot 2013.07 (Apr 09 2014 - 12:31:52) ...
1
vote
1answer
40 views

How to modify huge patch file properly?

I have this patch. I want to disable patching of Makefile and drivers/video/logo/logo_linux. What is best way of doing this? Do I edit it, and delete that specific entries? If so, is there a tool ...
1
vote
2answers
286 views

TLB cache flusing when a page is swapped out

I recently heard that Linux simply flushes the TLB cache when the corresponding data in that physical address is swapped out, resulting in underutilization of the TLB. I don't know whether all OSes do ...
1
vote
0answers
405 views

Make and apt-get Have Stopped Working

So I downloaded the non-free broadcom driver(b44) for my debian install, however when I try to make it I get the following error: make make -C /lib/modules/2.6.32-5-amd64/build ...
-1
votes
3answers
1k views

How can I create my own distro and include a custom kernel & packages? [closed]

I wanted to know how to add packages to the Linux kernel and then package it to a ISO or CD for friends. Thanks in advance and please don't point me to LFS - Linux From Scratch!
46
votes
5answers
2k views

How to compile the C compiler from scratch, then compile Unix/Linux from scratch

Let's say I work for a large services organisation outside the US/UK. We use UNIX and Linux servers extensively. Reading through this article it mentions that it would be easy to insert a backdoor ...
20
votes
1answer
12k views

How to assign USB driver to device

This question is two-fold: First, how do you manually detach a driver from a USB device and attach a different one? For example, I have a device that when connected automatically uses the ...
23
votes
5answers
8k views

Who's consuming my inotify resources?

After a recent upgrade to Fedora 15, I'm finding that a number of tools are failing with errors along the lines of: tail: inotify resources exhausted tail: inotify cannot be used, reverting to ...
14
votes
4answers
462 views

How do I learn what I can do with /proc and /sys

I'd like to know more about the advanced uses of the /proc and /sys virtual filesystems, but I don't know where to begin. Can anyone suggest any good sources to learn from? Also, since I think sys has ...
18
votes
1answer
9k views

What is difference between User space and Kernel space?

Is Kernel space used when Kernel is executing on the behalf of the user program i.e. System Call? Or is it the address space for all the Kernel threads (for example scheduler)? If it is the first ...
14
votes
1answer
12k views

How to use Linux kernel driver bind/unbind interface for USB-HID devices?

First background. I am developing a driver for Logitech game-panel devices. It's a keyboard with a screen on it. The driver is working nicely but by default the device is handled by HID. In order to ...
7
votes
2answers
6k views

How does the Linux kernel handle shared IRQs?

According to what I've read so far, "when the kernel receives an interrupt, all the registered handlers are invoked." I understand that the registered handlers for each IRQ can be viewed via ...
24
votes
1answer
2k views

High CPU usage with CFS?

I asked a previous question to try and isolate the source of an increase in CPU usage when moving an application from RHEL 5 to RHEL 6. The analysis that I did for that seems to indicate that it is ...
18
votes
3answers
188 views

How did the Linux Kernel project track bugs in the Early Days?

We all know that Linus Torvalds created Git because of issues with Bitkeeper. What is not known (at least to me) is, how were issues/tickets/bugs tracked up until then? I tried but didn't get anything ...