Re: [PATCH] Avoid useless inodes and dentries reclamation

2013-09-06 Thread Tim Chen
On Fri, 2013-09-06 at 10:55 +1000, Dave Chinner wrote: > On Tue, Sep 03, 2013 at 11:38:27AM -0700, Tim Chen wrote: > > On Sat, 2013-08-31 at 19:00 +1000, Dave Chinner wrote: > > > On Fri, Aug 30, 2013 at 09:21:34AM -0700, Tim Chen wrote: > > > > > > > > > > > > Signed-off-by: Tim Chen > > > >

Re: [PATCH] Avoid useless inodes and dentries reclamation

2013-09-06 Thread Tim Chen
On Fri, 2013-09-06 at 10:55 +1000, Dave Chinner wrote: On Tue, Sep 03, 2013 at 11:38:27AM -0700, Tim Chen wrote: On Sat, 2013-08-31 at 19:00 +1000, Dave Chinner wrote: On Fri, Aug 30, 2013 at 09:21:34AM -0700, Tim Chen wrote: Signed-off-by: Tim Chen tim.c.c...@linux.intel.com

Re: [PATCH] Avoid useless inodes and dentries reclamation

2013-09-05 Thread Dave Chinner
On Tue, Sep 03, 2013 at 11:38:27AM -0700, Tim Chen wrote: > On Sat, 2013-08-31 at 19:00 +1000, Dave Chinner wrote: > > On Fri, Aug 30, 2013 at 09:21:34AM -0700, Tim Chen wrote: > > > > > > > > > Signed-off-by: Tim Chen > > > --- > > > diff --git a/fs/super.c b/fs/super.c > > > index

Re: [PATCH] Avoid useless inodes and dentries reclamation

2013-09-05 Thread Dave Chinner
On Tue, Sep 03, 2013 at 11:38:27AM -0700, Tim Chen wrote: On Sat, 2013-08-31 at 19:00 +1000, Dave Chinner wrote: On Fri, Aug 30, 2013 at 09:21:34AM -0700, Tim Chen wrote: Signed-off-by: Tim Chen tim.c.c...@linux.intel.com --- diff --git a/fs/super.c b/fs/super.c index

Re: [PATCH] Avoid useless inodes and dentries reclamation

2013-09-03 Thread Tim Chen
On Sat, 2013-08-31 at 19:00 +1000, Dave Chinner wrote: > On Fri, Aug 30, 2013 at 09:21:34AM -0700, Tim Chen wrote: > > > > > > Signed-off-by: Tim Chen > > --- > > diff --git a/fs/super.c b/fs/super.c > > index 73d0952..4df1fab 100644 > > --- a/fs/super.c > > +++ b/fs/super.c > > @@ -112,9 +112,6

Re: [PATCH] Avoid useless inodes and dentries reclamation

2013-09-03 Thread Tim Chen
On Sat, 2013-08-31 at 19:00 +1000, Dave Chinner wrote: On Fri, Aug 30, 2013 at 09:21:34AM -0700, Tim Chen wrote: Signed-off-by: Tim Chen tim.c.c...@linux.intel.com --- diff --git a/fs/super.c b/fs/super.c index 73d0952..4df1fab 100644 --- a/fs/super.c +++ b/fs/super.c @@ -112,9

Re: [PATCH] Avoid useless inodes and dentries reclamation

2013-08-31 Thread Dave Chinner
On Fri, Aug 30, 2013 at 09:21:34AM -0700, Tim Chen wrote: > On Fri, 2013-08-30 at 11:40 +1000, Dave Chinner wrote: > > > > > The new shrinker infrastructure has a ->count_objects() callout to > > specifically return the number of objects in the cache. > > shrink_slab_node() can check that return

Re: [PATCH] Avoid useless inodes and dentries reclamation

2013-08-31 Thread Dave Chinner
On Fri, Aug 30, 2013 at 09:21:34AM -0700, Tim Chen wrote: On Fri, 2013-08-30 at 11:40 +1000, Dave Chinner wrote: The new shrinker infrastructure has a -count_objects() callout to specifically return the number of objects in the cache. shrink_slab_node() can check that return value

Re: [PATCH] Avoid useless inodes and dentries reclamation

2013-08-30 Thread Tim Chen
On Fri, 2013-08-30 at 11:40 +1000, Dave Chinner wrote: > > The new shrinker infrastructure has a ->count_objects() callout to > specifically return the number of objects in the cache. > shrink_slab_node() can check that return value against the "minimum > call count" and determine whether it

Re: [PATCH] Avoid useless inodes and dentries reclamation

2013-08-30 Thread Tim Chen
On Fri, 2013-08-30 at 11:40 +1000, Dave Chinner wrote: The new shrinker infrastructure has a -count_objects() callout to specifically return the number of objects in the cache. shrink_slab_node() can check that return value against the minimum call count and determine whether it needs to

Re: [PATCH] Avoid useless inodes and dentries reclamation

2013-08-29 Thread Dave Chinner
On Thu, Aug 29, 2013 at 11:36:10AM -0700, Dave Hansen wrote: > The new shrinker infrastructure in mmotm looks like it will make this > problem worse. > > old code: > shrink_slab() > for_each_shrinker { > do_shrinker_shrink(); // one per batch >

Re: [PATCH] Avoid useless inodes and dentries reclamation

2013-08-29 Thread Dave Chinner
On Thu, Aug 29, 2013 at 11:07:56AM -0700, Tim Chen wrote: > > > > Signed-off-by: Tim Chen > > > --- > > > fs/super.c | 8 > > > 1 file changed, 8 insertions(+) > > > > > > diff --git a/fs/super.c b/fs/super.c > > > index 68307c0..70fa26c 100644 > > > --- a/fs/super.c > > > +++

Re: [PATCH] Avoid useless inodes and dentries reclamation

2013-08-29 Thread Dave Hansen
The new shrinker infrastructure in mmotm looks like it will make this problem worse. old code: shrink_slab() for_each_shrinker { do_shrinker_shrink(); // one per batch prune_super() grab_super_passive() } }

Re: [PATCH] Avoid useless inodes and dentries reclamation

2013-08-29 Thread Tim Chen
> > Signed-off-by: Tim Chen > > --- > > fs/super.c | 8 > > 1 file changed, 8 insertions(+) > > > > diff --git a/fs/super.c b/fs/super.c > > index 68307c0..70fa26c 100644 > > --- a/fs/super.c > > +++ b/fs/super.c > > @@ -53,6 +53,7 @@ static char *sb_writers_name[SB_FREEZE_LEVELS] = {

Re: [PATCH] Avoid useless inodes and dentries reclamation

2013-08-29 Thread Dave Chinner
On Wed, Aug 28, 2013 at 02:52:12PM -0700, Tim Chen wrote: > This patch detects that when free inodes and dentries are really > low, their reclamation is skipped so we do not have to contend > on the global sb_lock uselessly under memory pressure. Otherwise > we create a log jam trying to acquire

Re: [PATCH] Avoid useless inodes and dentries reclamation

2013-08-29 Thread Dave Chinner
On Wed, Aug 28, 2013 at 02:52:12PM -0700, Tim Chen wrote: This patch detects that when free inodes and dentries are really low, their reclamation is skipped so we do not have to contend on the global sb_lock uselessly under memory pressure. Otherwise we create a log jam trying to acquire the

Re: [PATCH] Avoid useless inodes and dentries reclamation

2013-08-29 Thread Tim Chen
Signed-off-by: Tim Chen tim.c.c...@linux.intel.com --- fs/super.c | 8 1 file changed, 8 insertions(+) diff --git a/fs/super.c b/fs/super.c index 68307c0..70fa26c 100644 --- a/fs/super.c +++ b/fs/super.c @@ -53,6 +53,7 @@ static char

Re: [PATCH] Avoid useless inodes and dentries reclamation

2013-08-29 Thread Dave Hansen
The new shrinker infrastructure in mmotm looks like it will make this problem worse. old code: shrink_slab() for_each_shrinker { do_shrinker_shrink(); // one per batch prune_super() grab_super_passive() } }

Re: [PATCH] Avoid useless inodes and dentries reclamation

2013-08-29 Thread Dave Chinner
On Thu, Aug 29, 2013 at 11:07:56AM -0700, Tim Chen wrote: Signed-off-by: Tim Chen tim.c.c...@linux.intel.com --- fs/super.c | 8 1 file changed, 8 insertions(+) diff --git a/fs/super.c b/fs/super.c index 68307c0..70fa26c 100644 --- a/fs/super.c +++

Re: [PATCH] Avoid useless inodes and dentries reclamation

2013-08-29 Thread Dave Chinner
On Thu, Aug 29, 2013 at 11:36:10AM -0700, Dave Hansen wrote: The new shrinker infrastructure in mmotm looks like it will make this problem worse. old code: shrink_slab() for_each_shrinker { do_shrinker_shrink(); // one per batch prune_super()

Re: [PATCH] Avoid useless inodes and dentries reclamation

2013-08-28 Thread Tim Chen
On Thu, 2013-08-29 at 00:19 +0300, Kirill A. Shutemov wrote: > > --- > > fs/super.c | 8 > > 1 file changed, 8 insertions(+) > > > > diff --git a/fs/super.c b/fs/super.c > > index 68307c0..70fa26c 100644 > > --- a/fs/super.c > > +++ b/fs/super.c > > @@ -53,6 +53,7 @@ static char

Re: [PATCH] Avoid useless inodes and dentries reclamation

2013-08-28 Thread Kirill A. Shutemov
On Wed, Aug 28, 2013 at 02:52:12PM -0700, Tim Chen wrote: > This patch detects that when free inodes and dentries are really > low, their reclamation is skipped so we do not have to contend > on the global sb_lock uselessly under memory pressure. Otherwise > we create a log jam trying to acquire

[PATCH] Avoid useless inodes and dentries reclamation

2013-08-28 Thread Tim Chen
This patch detects that when free inodes and dentries are really low, their reclamation is skipped so we do not have to contend on the global sb_lock uselessly under memory pressure. Otherwise we create a log jam trying to acquire the sb_lock in prune_super(), with little or no freed memory to

[PATCH] Avoid useless inodes and dentries reclamation

2013-08-28 Thread Tim Chen
This patch detects that when free inodes and dentries are really low, their reclamation is skipped so we do not have to contend on the global sb_lock uselessly under memory pressure. Otherwise we create a log jam trying to acquire the sb_lock in prune_super(), with little or no freed memory to

Re: [PATCH] Avoid useless inodes and dentries reclamation

2013-08-28 Thread Kirill A. Shutemov
On Wed, Aug 28, 2013 at 02:52:12PM -0700, Tim Chen wrote: This patch detects that when free inodes and dentries are really low, their reclamation is skipped so we do not have to contend on the global sb_lock uselessly under memory pressure. Otherwise we create a log jam trying to acquire the

Re: [PATCH] Avoid useless inodes and dentries reclamation

2013-08-28 Thread Tim Chen
On Thu, 2013-08-29 at 00:19 +0300, Kirill A. Shutemov wrote: --- fs/super.c | 8 1 file changed, 8 insertions(+) diff --git a/fs/super.c b/fs/super.c index 68307c0..70fa26c 100644 --- a/fs/super.c +++ b/fs/super.c @@ -53,6 +53,7 @@ static char