Skip to contentSkip to conversation

udevd high cpu hogging in kernel-2.6.34 git8 to git-13

DISCUSSION JD 2 participants 4 messages May 28, 2010 – Jun 17, 2010 1 message not in the archive

lore
Share & tools
lore

JD

author
#0 lore raw

I noticed that since git8, udevd consumes from 50 to 80 percent of cpu. The main udevd thread is niced to -4, and 6 or more child threads are niced -2.

So, I backpedaled to git7, which does not have this "feature" :)

Cheers,

JD

#1 lore raw
Quoted 5 lines · JD

I noticed that since git8, udevd consumes from 50 to 80 percent of cpu. The main udevd thread is niced to -4, and 6 or more child threads are niced -2.

So, I backpedaled to git7, which does not have this "feature" :)

Is it this one again?
http://lkml.org/lkml/2010/5/22/150

Could you try to revert the patch?

Signature · 1 line
js

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw

Added lkml back to CC.

Quoted 9 lines · JD

But here goes:
I have seen this behaviour in all the git releases from git8 to the current 2.6.34-git13

I have some of the analysis based on strace, and kernel stack trace.
Instead of backing out the whole code for the new udevd, perhaps it (udevd) should sleep for some time before polling the same fd again.

So if you see in the strace output the poll to return immediately with out fd being an anon_inode (check /proc/pid_of_udev/fd/), it is the issue. AFAIK, it was not fixed upstream yet.

So could you try to revert a7cf4145b?

Signature · 1 line
js
author
#4 lore raw
Quoted 14 lines · Jiri Slaby

Added lkml back to CC.

Quoted 10 lines · JD

But here goes:
I have seen this behaviour in all the git releases from git8 to the current 2.6.34-git13

I have some of the analysis based on strace, and kernel stack trace.
Instead of backing out the whole code for the new udevd, perhaps it (udevd) should sleep for some time before polling the same fd again.

Quoted 7 lines

So if you see in the strace output the poll to return immediately with out fd being an anon_inode (check /proc/pid_of_udev/fd/), it is the issue. AFAIK, it was not fixed upstream yet.

So could you try to revert a7cf4145b?

As promised, I tested the patch submitted by Eric Paris (See http://marc.info/?l=linux-kernel&m=127479018618584&w=2).
I patched kernel-2.6.34-git13 with it, without reverting a7cf4145b. The thing is it works and works extremely well.
The behaviour is back to what it used to be: Only 3 udevd threads, as in before git8, and they do not consume any cpu bandwidth that I can see. It is well below the threshold of 1% .

Also, it seems that it has been picked up by upstream. Compiled and booted 2.6.34-git16 and all is well.