Re: [PATCH] proc/sysctl: drop unregistered stale dentries as soon as possible

2017-02-09 Thread Al Viro
On Thu, Feb 09, 2017 at 10:36:15AM +0300, Konstantin Khlebnikov wrote: > Ok, Thank you. I've expected that this fix isn't sane, > > Maybe we could minimize changes for now. For example: keep these > stale dentries in memory but silently unhash them in ->d_compare(). > Memory processure and reclai

Re: [PATCH] proc/sysctl: drop unregistered stale dentries as soon as possible

2017-02-08 Thread Konstantin Khlebnikov
On Thu, Feb 9, 2017 at 6:53 AM, Al Viro wrote: > On Wed, Feb 08, 2017 at 01:48:04PM -0800, Andrew Morton wrote: > >> > This patch detects stale dentry in proc_sys_compare and pretends that >> > it has matching name - revalidation will kill it and lookup restarts. >> > As a result each stale dentry

Re: [PATCH] proc/sysctl: drop unregistered stale dentries as soon as possible

2017-02-08 Thread Al Viro
On Wed, Feb 08, 2017 at 01:48:04PM -0800, Andrew Morton wrote: > > This patch detects stale dentry in proc_sys_compare and pretends that > > it has matching name - revalidation will kill it and lookup restarts. > > As a result each stale dentry will be seen only once and will not > > contaminate h

Re: [PATCH] proc/sysctl: drop unregistered stale dentries as soon as possible

2017-02-08 Thread Andrew Morton
On Wed, 08 Feb 2017 13:48:24 +0300 Konstantin Khlebnikov wrote: > Currently unregistering sysctl does not prune its dentries. > Stale sysctl dentries could slowdown sysctl operations significantly. > > For example, command: > > # for i in {1..10} ; do unshare -n -- sysctl -a &> /dev/null ;

[PATCH] proc/sysctl: drop unregistered stale dentries as soon as possible

2017-02-08 Thread Konstantin Khlebnikov
Currently unregistering sysctl does not prune its dentries. Stale sysctl dentries could slowdown sysctl operations significantly. For example, command: # for i in {1..10} ; do unshare -n -- sysctl -a &> /dev/null ; done creates a millions of stale denties around sysctls of loopback interface