public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Chris Mason <mason@suse.com>
To: Andrew Morton <akpm@osdl.org>
Cc: andrea@suse.de, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] fix nr_unused accounting, and avoid recursing in iput with I_WILL_FREE set
Date: Mon, 24 Oct 2005 22:21:02 -0400	[thread overview]
Message-ID: <20051025022102.GC5099@watt.suse.com> (raw)
In-Reply-To: <20051018192646.2ddcbf57.akpm@osdl.org>

On Tue, Oct 18, 2005 at 07:26:46PM -0700, Andrew Morton wrote:
> Chris Mason <mason@suse.com> wrote:
> >
> > On Tue, Oct 18, 2005 at 06:15:48PM -0700, Andrew Morton wrote:
> > > > > Well according to my assertion (below), the inode in __sync_single_inode()
> > > > > cannot have a zero refcount, so the whole if() statement is never executed.
> > > > 
> > > > generic_forget_inode->write_inode_now->__writeback_single_inode->
> > > > __sync_single_inode
> > > 
> > > oshit.
> > 
> > When does this ever happen?  Just for private inodes released during
> > put_super right?
> 
> I suppose so, yes.

It's not related to the bug, but prune_icache can jump in at any
time during generic_shutdown_super, except during the invalidate_inodes
runs.  Something like this:

proc1				proc2
generic_shutdown_super
s->s_flags &= ~MS_ACTIVE
invalidate_inodes
put_super
				shrink_icache_memory
				prune_icache
				invalidate_inode_pages
				try_to_release_page
				
I doubt any FS triggers this.  They would need to generate inodes
with pages during the put_super call, and get them onto the unused list.
But, I think prune_icache should just skip any inodes where the super
doesn't have MS_ACTIVE set.

At any rate, this wasn't the race I was looking for.  Aside from the
bugs fixed by Andrea's patch, we were seeing inodes go negative thanks
to a bad interaction between a latency fix and a backport of something
else from mainline.   Our latency code has a goto again, and mainline
has a big fat comment explaining why goto again isn't needed.  

If the super->s_inodes list was long enough to reschedule in invalidate_list,
we would process the same inodes in multiple times without removing them.

The short version is that no additional patches should be needed for
mainline.

-chris


  parent reply	other threads:[~2005-10-25  2:21 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-18  8:26 [PATCH] fix nr_unused accounting, and avoid recursing in iput with I_WILL_FREE set Andrea Arcangeli
2005-10-19  0:13 ` Andrew Morton
2005-10-19  0:40   ` Chris Mason
2005-10-19  1:15     ` Andrew Morton
2005-10-19  1:58       ` Chris Mason
2005-10-19  2:26         ` Andrew Morton
2005-10-19  2:58           ` Chris Mason
2005-10-25  2:21           ` Chris Mason [this message]
2005-10-25 14:14             ` Andrea Arcangeli
2005-10-19  7:47   ` Andrea Arcangeli

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=20051025022102.GC5099@watt.suse.com \
    --to=mason@suse.com \
    --cc=akpm@osdl.org \
    --cc=andrea@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    /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