Mystery Processes I: kthrotld

Another series of posts looking into what all those strange processes that appear in a ps listing on Linux are doing (obviously, I take it as read that we all know the processes that appear in a ps listing in square brackets are linux kernel threads upto good healthy kernelly stuff, but what stuff?)

Starting, for no particular reason, with kthrotld.

I have to admit I had expected I could just search for each of the process names and find helpful bits of documentation that I could compile down into one pithy summary, such as "kthrotld throttles the wizbang I/O widget" but I seemed to have picked a hard one to start with, as nothing is currently easy to find. A previous quest along the same lines to document kernel threads

So, digging into the kernel source, in linux/block/blk-throttle.c there is:

 kthrotld_workqueue = alloc_workqueue("kthrotld", WQ_MEM_RECLAIM, 0);

which creates the thread. And the thread is 'controlling IO bandwidth on a request queue', by throttling requests.