Comment 46 for bug 148454

Revision history for this message
Remove Me (remove-me) wrote : Re: console-kit-deamon spawns too many threads

It still reserves some stack (65k?), causes unnecessary context switches and takes some attention of the scheduler.
It's still bloat to request a resource which is NEVER used (a thread to monitor console 58? What for?!).

And BTW, why is FreeBSD configured to the number of active consoles?
Could it be because someone was a bit clueless regarding Linux or just lazy?
Lets look at sysfs, /sys/class/vc. It lists allocated kernel consoles:

$ ll /sys/class/vc
total 0
drwxr-xr-x 3 root root 0 2008-07-10 21:39 vcs
drwxr-xr-x 3 root root 0 2008-07-10 21:39 vcs1
drwxr-xr-x 3 root root 0 2008-07-10 21:39 vcs2
drwxr-xr-x 3 root root 0 2008-07-10 21:39 vcs3
drwxr-xr-x 3 root root 0 2008-07-10 21:39 vcs4
drwxr-xr-x 3 root root 0 2008-07-10 21:39 vcs5
drwxr-xr-x 3 root root 0 2008-07-10 21:39 vcs6
drwxr-xr-x 3 root root 0 2008-07-10 21:39 vcs7
...

You can even monitor changes to the directory (with inotify).
Patch attached (without inotify).