lkml.org 
[lkml]   [2015]   [Jul]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] proc: change proc_subdir_lock to a rwlock
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




\
 
 \ /
  Last update: 2015-07-31 04:41    [from the cache]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog