From: Alexey Dobriyan <adobriyan@gmail.com>
To: akpm@linux-foundation.org
Cc: linux-kernel@vger.kernel.org, viro@zeniv.linux.org.uk
Subject: Re: [PATCH 2/2] proc: faster /proc/$PID lookup
Date: Wed, 9 Jul 2014 00:50:29 +0300 [thread overview]
Message-ID: <20140708215029.GC2382@p183.telecom.by> (raw)
In-Reply-To: <20140708214557.GB2256@p183.telecom.by>
On Wed, Jul 09, 2014 at 12:45:57AM +0300, Alexey Dobriyan wrote:
> Currently lookup for /proc/$PID first goes through spinlock and
> whole list of misc /proc entries only to confirm that, yes,
> /proc/42 can not possibly match random proc entry.
>
> List is is several dozens entries long (52 entries on my setup).
>
> None of this is necessary.
>
> Try to convert dentry name to integer first.
> If it works, it must be /proc/$PID.
> If it doesn't, it must be random proc entry.
Recycled from Al Viro's patch as well!
prev parent reply other threads:[~2014-07-08 21:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-08 21:40 [PATCH 1/2] proc: add and remove /proc entry create checks Alexey Dobriyan
2014-07-08 21:45 ` [PATCH 2/2] proc: faster /proc/$PID lookup Alexey Dobriyan
2014-07-08 21:50 ` Alexey Dobriyan [this message]
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=20140708215029.GC2382@p183.telecom.by \
--to=adobriyan@gmail.com \
--cc=akpm@linux-foundation.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®