3

(Related: What do the brackets around processes mean?)

I'd like to really understand what I'm looking at better. I'd rather not need to dig through actual kernel source code just for a quick understanding.

For instance, I looked up kacpid with initially very little success. Eventually I discovered that it is the kernel ACPI Daemon, and reading up on the Wikipedia page for ACPI clarified in general what that process is all about.

What I would love would be a series of simple definitions, such that looking up kacpid would give me something like:

kacpid: Stands for kernel ACPI daemon. ACPI is the Advanced Configuration and Power Interface, a set of standards relating to handling of various "states" including sleep, power off, hibernate; and also states relating to CPU power saving.

Now I'm trying to look up kblockd and all the Google results show is people having trouble running out of memory—not very good for understanding why this process exists!

I could just ask "What is kblockd all about," and I'm interested in that—but:

Given the vast amount of online and off-line documentation relating to Linux (man pages, info pages, POSIX specs, etc.), isn't there a standard solution for the general problem of learning what various kernel processes mean, and what they're doing? What is that standard solution?

2 Answers 2

4

There is no single repository of documentation about Linux kernel threads. Some basic documentation of the Linux kernel exists in the Documentation directory, but there is no specific part about kernel threads (some threads are mentioned in passing in the documentation of the feature they participate in). Beyond this, the (excuse for a) documentation consists, in order of decreasing accessibility, of the LWN articles, the source code, and the LKML archives. The general philosophy of Linux kernel documentation is that if you can't read C code fluently and aren't prepared to spend some time digging through email discussions, you don't deserve to understand what the kernel does.

The easiest way to find information about a thread by name is to search for the name in the kernel source. For example, kblockd is created in blk-core.c. It's a work queue. A bit of LKML searching leads you to its inception with kblockd.patch. It handles asynchronous requests (that's what a work queue does), specifically requests to block devices (i.e. disks and such).

1
  • 1
    It's not necessary to start with LKML to find where it originated. It might be sufficient to try git blame and git log first.
    – Ruslan
    Nov 25, 2020 at 9:19
-1

Have you tried

x="kblockd"
man -k "$x"
locate "$x"
for i in $(locate "$x") ; do
    dpkg -S "$i"
done

This will produce a list of packages related to your "object". Read man dpkg to see how to get a list of files in a package.

2
  • I use RHEL/CentOS, but this might be handy for Debian.
    – Wildcard
    Jun 14, 2016 at 21:09
  • 2
    kblockd is not a program, it's a thread in the kernel. There is no file called kblockd. This is completely irrelevant. Jun 15, 2016 at 0:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .