Quantcast
Channel: Active questions tagged kernel - Stack Overflow
Viewing all articles
Browse latest Browse all 6334

How is the kernel process kswapd started step by step?

$
0
0

I understand the impacts and functions of the kernel processkswapd.

As the output of ps -elf | grep swapd, I found kswapd is started by kthreadd. But how is it started step by step? Where's the extract related source code?

Here is the output of ps -elf | grep swapd:

$ ps -elf | head -n 1; sudo ps -elf | grep -i kswapdF S UID        PID  PPID  C PRI  NI ADDR SZ WCHAN  STIME TTY          TIME CMD1 S root        46     2  0  80   0 -     0 kswapd 11:42 ?        00:00:00 [kswapd0]

You see, the PID of the kernel process kthreadd is 2:

F S UID        PID  PPID  C PRI  NI ADDR SZ WCHAN  STIME TTY          TIME CMD1 S root         2     0  0  80   0 -     0 kthrea  6/2       00:00:00 [kthreadd]

In addition, I can't find a binary program with the same name throughout the rootfs. For details, see below:

$ cat /proc/46/cmdline#outputs nothingsudo find / -iname kswapd 2>/dev/null#outputs nothing

Viewing all articles
Browse latest Browse all 6334

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>