From: Steve Dodd <steved@loth.demon.co.uk>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: Alexander Viro <aviro@redhat.com>,
"Roman V. Shaposhnick" <vugluskr@unicorn.math.spbu.ru>,
linux-fsdevel@vger.rutgers.edu, linux-kernel@vger.rutgers.edu,
trond.myklebust@fys.uio.no, linux-mm@kvack.org
Subject: Re: [PATCH] address_space_operations unification
Date: Sun, 7 May 2000 11:43:33 +0100 [thread overview]
Message-ID: <20000507114333.A342@loth.demon.co.uk> (raw)
In-Reply-To: <Pine.LNX.4.10.10005061749080.29159-100000@cesium.transmeta.com>; from Linus Torvalds on Sat, May 06, 2000 at 06:29:51PM -0700
[linux-mm added to the mix]
[..]
> - remove "file" from the argument list, replacing it with "void *
> cookie", which actually gets the value "file".
>
> struct file * file = (struct file *)cookie;
>
> which again is not, in my not so d*mn humble opinion, any improvement
> at all.
>
> In short, both of the changes resulted in (a) uglier code and (b) loss of
> typechecking.
>
> Note that the code did not add any new information - it couldn't do that.
> It just hid the information we _did_ have available, and made it uglier.
>
> And people then _applaud_ this move?
Because AFAICS a struct address_space should be usable for caching /anything/
in the page cache, not just file data. Otherwise we might as well merge it
back into struct inode and be done with it. If it is going to be more generic,
having any parameter other than the actual page passed to those methods looks
wrong, but I can't think of another solution for NFS which is conceptually
clean _and_ efficient.
Actually, thinking about this, is there any point now where the generic page
cache code calls address_space methods? I've just looked, and AFAICS all the
calls are from the filemap code. I thought the original idea was that an
address_space should contain the data and function ptrs to allow the page
cache to go about its business without caring what the data was used
for. We don't actually seem to be doing that, other than the new sync_page.
Some of the methods also look downright wrong for this - ->bmap at least
should be an inode op, surely?
I was hoping to use the addr_space stuff to cache fs metadata easily - NTFS
for example has on-disk structures which span blocks, so using the buffer
cache is out. Sure, I could code up a private cache, but then the mm subsystem
has no way to tell me to prune data as memory pressure increases.
Maybe we should put this discussion on ice until 2.5 is opened.. Mind you,
people writing filesystems are going to kill us if/when the API changes
again.
--
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.eu.org/Linux-MM/
next parent reply other threads:[~2000-05-07 10:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <Pine.LNX.4.10.10005061556040.701-100000@aviro.devel.redhat.com>
[not found] ` <Pine.LNX.4.10.10005061749080.29159-100000@cesium.transmeta.com>
2000-05-07 10:43 ` Steve Dodd [this message]
2000-05-07 17:22 ` Linus Torvalds
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=20000507114333.A342@loth.demon.co.uk \
--to=steved@loth.demon.co.uk \
--cc=aviro@redhat.com \
--cc=linux-fsdevel@vger.rutgers.edu \
--cc=linux-kernel@vger.rutgers.edu \
--cc=linux-mm@kvack.org \
--cc=torvalds@transmeta.com \
--cc=trond.myklebust@fys.uio.no \
--cc=vugluskr@unicorn.math.spbu.ru \
/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