linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Nick Piggin <nickpiggin@yahoo.com.au>
To: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Christian Borntraeger <borntraeger@de.ibm.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	Martin Schwidefsky <schwidefsky@de.ibm.com>,
	Theodore Ts'o <tytso@mit.edu>,
	stable@kernel.org
Subject: Re: [PATCH] rd: Use a private inode for backing storage
Date: Sun, 21 Oct 2007 19:39:03 +1000	[thread overview]
Message-ID: <200710211939.04015.nickpiggin@yahoo.com.au> (raw)
In-Reply-To: <m1d4v9c690.fsf@ebiederm.dsl.xmission.com>

On Sunday 21 October 2007 16:48, Eric W. Biederman wrote:
> Nick Piggin <nickpiggin@yahoo.com.au> writes:
> > Yes it does. It is exactly breaking the coherency between block
> > device and filesystem metadata coherency that Andrew cared about.
> > Whether or not that matters, that is a much bigger conceptual
> > change than simply using slightly more (reclaimable) memory in
> > some situations that my patch does.
> >
> > If you want to try convincing people to break that coherency,
> > fine, but it has to be done consistently and everywhere rather than
> > for a special case in rd.c.
>
> Nick.  Reread the patch.  The only thing your arguments have
> established for me is that this patch is not obviously correct.  Which
> makes it ineligible for a back port.

OK, I missed that you set the new inode's aops to the ramdisk_aops
rather than the bd_inode. Which doesn't make a lot of sense because
you just have a lot of useless aops there now.


> Frankly I suspect the whole 
> issue is to subtle and rare to make any backport make any sense.  My
> apologies Christian.

It's a data corruption issue. I think it should be fixed.


> >> The only way we make it to that inode is through block
> >> device I/O so it lives at exactly the same level in the hierarchy as
> >> a real block device.
> >
> > No, it doesn't. A real block device driver does have its own
> > buffer cache as it's backing store. It doesn't know about
> > readpage or writepage or set_page_dirty or buffers or pagecache.
>
> Well those pages are only accessed through rd_blkdev_pagecache_IO
> and rd_ioctl.

Wrong. It will be via the LRU, will get ->writepage() called,
block_invalidate_page, etc. And I guess also via sb->s_inodes, where
drop_pagecache_sb might do stuff to it (although it probably escapes
harm). But you're right that it isn't the obviously correct fix for
the problem.


> >> My patch is the considered rewrite boiled down
> >> to it's essentials and made a trivial patch.
> >
> > What's the considered rewrite here? The rewrite I posted is the
> > only one so far that's come up that I would consider [worthy],
> > while these patches are just more of the same wrongness.
>
> Well it looks like you were blind when you read the patch.

If you think it is a nice way to go, then I think you are
blind ;)


> Because the semantics between the two are almost identical,
> except I managed to implement BLKFLSBUF in a backwards compatible
> way by flushing both the buffer cache and my private cache.  You
> failed to flush the buffer cache in your implementation.

Obviously a simple typo that can be fixed by adding one line
of code.


> Yes. I use an inode 99% for it's mapping and the mapping 99% for it's
> radix_tree.  But having truncate_inode_pages and grab_cache_page
> continue to work sure is convenient.

It's horrible. And using truncate_inode_pages / grab_cache_page and
new_inode is an incredible argument to save a few lines of code. You
obviously didn't realise your so called private pages would get
accessed via the LRU, for example. This is making a relatively
larger logical change than my patch, because now as well as having
a separate buffer cache and backing store, you are also making the
backing store pages visible to the VM.


> I certainly think it makes it a 
> lot simpler to audit the code to change just one thing at a time (the
> backing store) then to rip out and replace everything and then try and
> prove that the two patches are equivalent.

I think it's a bad idea just to stir the shit. We should take the
simple fix for the problem, and then fix it properly.

--
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:"dont@kvack.org"> email@kvack.org </a>

  parent reply	other threads:[~2007-10-21  9:39 UTC|newest]

Thread overview: 77+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-15  8:28 [PATCH resend] ramdisk: fix zeroed ramdisk pages on memory pressure Christian Borntraeger
2007-10-15 14:06 ` Nick Piggin
2007-10-15  9:05   ` Christian Borntraeger
2007-10-15 14:38     ` Nick Piggin
2007-10-15 18:38       ` Eric W. Biederman
2007-10-15 22:37         ` Eric W. Biederman
2007-10-15 22:40           ` [PATCH] rd: Preserve the dirty bit in init_page_buffers() Eric W. Biederman
2007-10-15 22:42             ` [PATCH] rd: Mark ramdisk buffers heads dirty Eric W. Biederman
2007-10-16  7:56               ` Christian Borntraeger
2007-10-16  9:22                 ` Eric W. Biederman
2007-10-17 16:14                 ` Christian Borntraeger
2007-10-17 17:57                   ` Eric W. Biederman
2007-10-17 19:14                     ` Chris Mason
2007-10-17 20:29                       ` Eric W. Biederman
2007-10-17 20:54                         ` Chris Mason
2007-10-17 21:30                           ` Eric W. Biederman
2007-10-17 22:58                             ` Chris Mason
2007-10-17 23:28                               ` Eric W. Biederman
2007-10-18  0:03                                 ` Chris Mason
2007-10-18  3:27                                   ` Eric W. Biederman
2007-10-18  3:59                                   ` [RFC][PATCH] block: Isolate the buffer cache in it's own mappings Eric W. Biederman
2007-10-18  4:32                                     ` Andrew Morton
2007-10-19 21:27                                       ` Eric W. Biederman
2007-10-21  4:24                                         ` Nick Piggin
2007-10-21  4:53                                           ` Eric W. Biederman
2007-10-21  5:36                                             ` Nick Piggin
2007-10-21  7:09                                               ` Eric W. Biederman
2007-10-22  0:15                                           ` David Chinner
2007-10-18  5:10                                     ` Nick Piggin
2007-10-19 21:35                                       ` Eric W. Biederman
2007-10-17 21:48                     ` [PATCH] rd: Mark ramdisk buffers heads dirty Christian Borntraeger
2007-10-17 22:22                       ` Eric W. Biederman
2007-10-18  9:26                         ` Christian Borntraeger
2007-10-19 22:46                           ` Eric W. Biederman
2007-10-19 22:51                           ` [PATCH] rd: Use a private inode for backing storage Eric W. Biederman
2007-10-21  4:28                             ` Nick Piggin
2007-10-21  5:10                               ` Eric W. Biederman
2007-10-21  5:24                                 ` Nick Piggin
2007-10-21  6:48                                   ` Eric W. Biederman
2007-10-21  7:28                                     ` Christian Borntraeger
2007-10-21  8:23                                       ` Eric W. Biederman
2007-10-21  9:56                                         ` Nick Piggin
2007-10-21 18:39                                           ` Eric W. Biederman
2007-10-22  1:56                                             ` Nick Piggin
2007-10-22 13:11                                             ` Chris Mason
2007-10-21  9:39                                     ` Nick Piggin [this message]
2007-10-21 17:56                                       ` Eric W. Biederman
2007-10-22  0:29                                         ` Nick Piggin
2007-10-16  8:19               ` [PATCH] rd: Mark ramdisk buffers heads dirty Nick Piggin
2007-10-16  8:48                 ` Christian Borntraeger
2007-10-16 19:06                 ` Eric W. Biederman
2007-10-16 22:06                   ` Nick Piggin
2007-10-16  8:12             ` [PATCH] rd: Preserve the dirty bit in init_page_buffers() Nick Piggin
2007-10-16  9:35               ` Eric W. Biederman
2007-10-15  9:16   ` [PATCH resend] ramdisk: fix zeroed ramdisk pages on memory pressure Andrew Morton
2007-10-15 15:23     ` Nick Piggin
2007-10-16  3:14       ` Eric W. Biederman
2007-10-16  6:45         ` Nick Piggin
2007-10-16  4:57           ` Eric W. Biederman
2007-10-16  8:08             ` Nick Piggin
2007-10-16  7:47               ` [patch][rfc] rewrite ramdisk Nick Piggin
2007-10-16  7:52                 ` Jan Engelhardt
2007-10-16  8:07                   ` Nick Piggin
2007-10-16  8:17                     ` Jan Engelhardt
2007-10-16  8:26                       ` Nick Piggin
2007-10-16  8:53                         ` Jan Engelhardt
2007-10-16  9:08                 ` Eric W. Biederman
2007-10-16 21:28                 ` Theodore Tso
2007-10-16 22:08                   ` Nick Piggin
2007-10-16 23:48                     ` Eric W. Biederman
2007-10-17  0:28                       ` Nick Piggin
2007-10-17  1:13                         ` Eric W. Biederman
2007-10-17  1:47                           ` Nick Piggin
2007-10-17 10:30                 ` Eric W. Biederman
2007-10-17 12:49                   ` Nick Piggin
2007-10-17 18:45                     ` Eric W. Biederman
2007-10-18  1:06                       ` Nick Piggin

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=200710211939.04015.nickpiggin@yahoo.com.au \
    --to=nickpiggin@yahoo.com.au \
    --cc=akpm@linux-foundation.org \
    --cc=borntraeger@de.ibm.com \
    --cc=ebiederm@xmission.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=schwidefsky@de.ibm.com \
    --cc=stable@kernel.org \
    --cc=tytso@mit.edu \
    /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