All of lore.kernel.org
 help / color / mirror / Atom feed
From: Waiman Long <waiman.long@hp.com>
To: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Nicolas Dichtel <nicolas.dichtel@6wind.com>,
	Al Viro <viro@zeniv.linux.org.uk>,
	Alexey Dobriyan <adobriyan@gmail.com>,
	linux-kernel@vger.kernel.org,
	Scott J Norton <scott.norton@hp.com>,
	Douglas Hatch <doug.hatch@hp.com>
Subject: Re: [PATCH] proc: change proc_subdir_lock to a rwlock
Date: Thu, 30 Jul 2015 22:16:56 -0400	[thread overview]
Message-ID: <55BADA98.3000304@hp.com> (raw)
In-Reply-To: <DDAFF52F-3277-4645-9DA9-62C388DA445C@xmission.com>

On 07/29/2015 06:21 PM, Eric W. Biederman wrote:
> Two quick questions.
>
> - What motivates this work?  Are you seeing lots of
>    parallel reads on proc?

The micro-benchmark that I used was artificial, but it was used to 
reproduce an exit hanging problem that I saw in real application. In 
fact, only allow one task to do a lookup seems too limiting to me.
> - Why not rcu?  Additions and removal of proc generic
>    files is very rare.  Conversion to rcu for reads should
>    perform better and not take much more work.

RCU is harder to verify its correctness, whereas rwlock is easier to use 
and understand. If it is really a performance critical path where every 
extra bit of performance counts, I will certainly think RCU may be the 
right choice. However, in this particular case, I don't think using RCU 
will give any noticeable performance gain compared with a rwlock.

Cheers,
Longman



  parent reply	other threads:[~2015-07-31  2:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-29 20:19 [PATCH] proc: change proc_subdir_lock to a rwlock Waiman Long
2015-07-29 22:21 ` Eric W. Biederman
2015-07-30 10:04   ` Alexey Dobriyan
2015-07-31  2:16   ` Waiman Long [this message]
2015-07-31  2:53     ` Waiman Long
2015-08-03 18:03       ` Eric W. Biederman

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=55BADA98.3000304@hp.com \
    --to=waiman.long@hp.com \
    --cc=adobriyan@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=doug.hatch@hp.com \
    --cc=ebiederm@xmission.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nicolas.dichtel@6wind.com \
    --cc=scott.norton@hp.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.