WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: 3 x /sbin/udevd ?  (Read 2215 times)

Online patrikg

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 722
3 x /sbin/udevd ?
« on: September 08, 2021, 05:07:55 AM »
Is there some reason that udevd is running 3 daemons ?

Code: (bash) [Select]
tc@box:~$ ps | grep udev                                                       
  111 root     /sbin/udevd --daemon                                             
 1448 root     /sbin/udevd --daemon                                             
 1449 root     /sbin/udevd --daemon                                             
 1652 tc       grep udev                                                       
tc@box:~$

I trying to optimize picore as much as possible.
One or more boot scripts calling udevd 3 times ??

That can just run something like this to reload itself.
Sorry for bad spelling but this forum has lots of problem with some characters and words :)

Code: (bash) [Select]
s_u_d_o kill -hup dollarsign(pidof udevd)

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11049
Re: 3 x /sbin/udevd ?
« Reply #1 on: September 08, 2021, 10:57:58 AM »
They are spawned helpers and expected. Most likely they are waiting for an event, or for modprobe to complete, or some other thing.
The only barriers that can stop you are the ones you create yourself.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11694
Re: 3 x /sbin/udevd ?
« Reply #2 on: September 08, 2021, 11:43:26 AM »
Hi patrikg
I just checked under x86 TC9 and TC10 and see the same thing. The daemon with the low PID number was launched by
/etc/init.d/tc-config. The others as curaga mentioned are helpers launched later on. On TC4 I see a total of 8 processes.

See if this reduces the daemon count to one:
Code: [Select]
sudo udevadm control --children-max=0
Code: [Select]
sudo udevadm control --reload-rules
« Last Edit: September 08, 2021, 11:45:02 AM by Rich »

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11049
Re: 3 x /sbin/udevd ?
« Reply #3 on: September 08, 2021, 12:25:32 PM »
0 is probably unlimited?
The only barriers that can stop you are the ones you create yourself.

Online patrikg

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 722
Re: 3 x /sbin/udevd ?
« Reply #4 on: September 08, 2021, 12:26:39 PM »
Hi Rich
thanks for reply, and curaga that's it. The father/mother daemon spawns children daemons.

Code: (bash) [Select]
tc@box:/etc$ sudo udevadm control --children-max=0                             
invalid number '0'

Code: (bash) [Select]
tc@box:/etc$ sudo udevadm control --children-max=1                             
tc@box:/etc$

But the father/mother daemon wouldn't you to set that he/she have no children. :)




« Last Edit: September 08, 2021, 12:29:29 PM by patrikg »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11694
Re: 3 x /sbin/udevd ?
« Reply #5 on: September 08, 2021, 12:41:36 PM »
Hi patrikg
... But the father/mother daemon wouldn't you to set that he/she have no children. :)
That's what I thought too. Rereading the man page suggests they count the parent as a child:
Quote
       -m, --children-max=value
           Set the maximum number of events, systemd-udevd will handle
           at the same time.

Found here:
https://man7.org/linux/man-pages/man8/udevadm.8.html

So I guess the parent is chosen first to handle events, and if busy, a child is called  to handle the task