linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Chris Mason <mason@suse.com>
To: Andrew Morton <akpm@osdl.org>
Cc: nikita@clusterfs.com, Andrea@suse.de, linux-mm@kvack.org
Subject: Re: "orphaned pagecache memleak fix" question.
Date: Wed, 6 Apr 2005 17:50:58 -0400	[thread overview]
Message-ID: <200504061751.00066.mason@suse.com> (raw)
In-Reply-To: <20050406143013.72c9ca92.akpm@osdl.org>

On Wednesday 06 April 2005 17:30, Andrew Morton wrote:
> Chris Mason <mason@suse.com> wrote:
> > On Wednesday 06 April 2005 03:58, Andrew Morton wrote:
> > > >  - wouldn't it be simpler to unconditionally remove page from LRU in
> > > >  ->invalidatepage()?
> > >
> > > I guess that's an option, yes.  If the fs cannot successfully
> > > invalidate the page then it can either block (as described above) or
> > > remove the page from the LRU.  The fs then wholly owns the page.
> > >
> > > I think it would be better to make ->invalidatepage always succeed
> > > though. The situation is probably rare.
> >
> > In data=journal it isn't rare at all.  Dropping the page from the lru
> > would be the best solution I think.
>
> Does that mean that my printk comes out?

To trigger the printk, you've got to stand on your head (at least for reiser3)

1) data=journal needs to log a file data buffer
2) The transaction starts to commit
3) Before the committing transaction calls mark_buffer_dirty on the data 
buffer, the file is truncated
4) The transaction commit calls mark_buffer_dirty, but only if the blocks 
corresponding to this buffer have not been freed on disk.  

It's the filesystem truncate call that frees the blocks, so the commit 
operation has to pop up in between the truncate_inodes_pages and 
inode->i_op->truncate().  The only way I found to make this happen reliably 
is to sprinkle schedules and busy loops into critical sections.

-chris
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>

      reply	other threads:[~2005-04-06 21:50 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-05 16:02 Nikita Danilov
2005-04-06  7:58 ` Andrew Morton
2005-04-06 12:06   ` Nikita Danilov
2005-04-06 19:27     ` Andrew Morton
2005-04-06 21:07       ` Nikita Danilov
2005-04-06 21:34         ` Andrew Morton
2005-04-06 21:12   ` Chris Mason
2005-04-06 21:30     ` Andrew Morton
2005-04-06 21:50       ` Chris Mason [this message]

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=200504061751.00066.mason@suse.com \
    --to=mason@suse.com \
    --cc=Andrea@suse.de \
    --cc=akpm@osdl.org \
    --cc=linux-mm@kvack.org \
    --cc=nikita@clusterfs.com \
    /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