mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jiri Slaby <jirislaby@gmail.com>
To: Eric Paris <eparis@redhat.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>,
	Kay Sievers <kay.sievers@suse.de>,
	Linux kernel mailing list <linux-kernel@vger.kernel.org>,
	linux-fsdevel@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>
Subject: udev loops eating 100 % CPU [mmotm 2010-05-21-16-05]
Date: Tue, 25 May 2010 14:12:39 +0200	[thread overview]
Message-ID: <4BFBBEB7.4070107@gmail.com> (raw)

Hi,

>From next/master:
commit a7cf4145bb86aaf85d4d4d29a69b50b688e2e49d
Author: Eric Paris <eparis@redhat.com>
Date:   Fri May 14 11:44:10 2010 -0400

    anon_inode: set S_IFREG on the anon_inode

    anon_inode_mkinode() sets inode->i_mode = S_IRUSR | S_IWUSR;  This means
    that (inode->i_mode & S_IFMT) == 0.  This trips up some SELinux code
that
    needs to determine if a given inode is a regular file, a directory, etc.
    The easiest solution is to just make sure that the anon_inode also sets
    S_IFREG.

    Signed-off-by: Eric Paris <eparis@redhat.com>
    Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>





causes my udev and psi both eating 100 % CPU. When I revert that on the
top of mmotm 2010-05-21-16-05, the problem disappears.

These are red-numbered lines from perf:
    13.96%    udevd  [kernel.kallsyms]      [k] _raw_spin_unlock_irqrestore
    10.22%    udevd  [kernel.kallsyms]      [k] signalfd_poll
     7.82%    udevd  [kernel.kallsyms]      [k] system_call_after_swapgs
     6.33%    udevd  [kernel.kallsyms]      [k] do_sys_poll
     5.43%    udevd  udevd                  [.] 0x0000000000dc72


It loops with this strace:
ioctl(7, FIONREAD, [0])                 = 0
poll([{fd=4, events=POLLIN}, {fd=6, events=POLLIN}, {fd=7,
events=POLLIN}, {fd=8, events=POLLIN}, {fd=9, events=POLLIN}], 5, 3000)
= 1 ([{fd=7, revents=POLLIN}])

where /proc/.../fd is:
lrwx------ 1 root root 64 May 25 14:06 0 -> /dev/null
lrwx------ 1 root root 64 May 25 14:06 1 -> /dev/null
lrwx------ 1 root root 64 May 25 14:06 10 -> socket:[1676]
lrwx------ 1 root root 64 May 25 14:06 2 -> /dev/null
lrwx------ 1 root root 64 May 25 14:06 3 -> /dev/.udev/queue.bin
lrwx------ 1 root root 64 May 25 14:06 4 -> socket:[1673]
l-wx------ 1 root root 64 May 25 14:06 5 -> /dev/blog
lrwx------ 1 root root 64 May 25 14:06 6 -> socket:[1674]
lr-x------ 1 root root 64 May 25 14:06 7 -> anon_inode:inotify
lrwx------ 1 root root 64 May 25 14:06 8 -> anon_inode:[signalfd]
lrwx------ 1 root root 64 May 25 14:06 9 -> socket:[1675]

             reply	other threads:[~2010-05-25 12:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-25 12:12 Jiri Slaby [this message]
2010-05-25 12:22 ` Eric Paris
2010-05-25 12:28   ` Christoph Hellwig
2010-05-26  9:18 Sedat Dilek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4BFBBEB7.4070107@gmail.com \
    --to=jirislaby@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=eparis@redhat.com \
    --cc=kay.sievers@suse.de \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®