All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Phillips <phillips@arcor.de>
To: Andrew Morton <akpm@digeo.com>
Cc: trond.myklebust@fys.uio.no, Chuck Lever <cel@citi.umich.edu>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: invalidate_inode_pages in 2.5.32/3
Date: Tue, 10 Sep 2002 00:12:08 +0200	[thread overview]
Message-ID: <E17oWlM-0006vI-00@starship> (raw)
In-Reply-To: <3D7D1442.1B36E65C@digeo.com>

On Monday 09 September 2002 23:36, Andrew Morton wrote:
> Daniel Phillips wrote:
> Yes, there are still reasons for delayed allocation, the space reservation
> API, etc.  But they are not compelling.  They are certainly not compelling
> when writeback continues to use the (randomly-ordered) mapping->dirty_pages
> walk.
> 
> With radix-tree enhancements to permit a pgoff_t-order walk of the
> dirty pages then yeah, order-of-magnitude gains in the tiobench
> random write pass.

Right.  Coincidently, our emails both drawing the same conclusion just
passed each other on the way through vger.

> > ...
> > In general, I think we'd be better off if page->buffers was not opaque,
> 
> Disagree.   There is zero computational cost to the current setup,

It's not a computational cost, at least not directly, it's an
organizational cost.

> and it's a little cleaner, and it permits things such as the removal
> of ->private from the pageframes, and hashing for it.

That's not really an argument, you can do that with ->buffers too,
and there is zero cost for doing it with both, separately.

> And there is plenty of precedent for putting fs-private hooks into
> core VFS data structures.

But you have to have a clear argument why.  I don't see one yet, and I
do see why the vfs wants to know about them.  None of your reasons for
wanting ->private have anything to do with buffers, they are all about
other fancy features that somebody might want to add.

> > and that it should remain non-opaque until we are definitely ready to
> > get rid of them.
> 
> There is nothing wrong with buffers, except the name.  They no longer
> buffer anything.

Understood.  However, the spelling patch to correct that would touch
the kernel in a few hundred places and break an indeterminate-but-large
number of pending patches.

> They _used_ to be the buffering entity, and an IO container, and
> the abstraction of a disk block.
>
> They are now just the abstraction of a disk block.  s/buffer_head/block/g
> should make things clearer.

Oooh, yes, that would be nice, but see above spelling patch objection.

> And there is no way in which the kernel can get along without
> some structure which represents a disk block.  It does one thing,
> and it does it well.
> 
> The page is the buffering entity.
> 
> The buffer_head is a disk block.
> 
> The BIO is the IO container.
> 
> Sometimes, for efficiency, we bypass the "block" part and go direct
> page-into-BIO.  That's a conceptually-wrong performance hack.

Right, and what I *want* to do is introduce sub-page struct pages,
along with generalizing struct page via mapping->page_size_shift, so
that we can use struct page as a handle for a block, solving a number
of nasty structural problems.  The patch to do this will be less
intrusive than you'd think at first blush, especially after
Christoph has been in there for a while longer, dunging out filemap.c.

> Yes, one could try to graft the "block" abstraction up into struct
> page, or down into struct BIO.

Err, right ;-)

> But one would be mistaken, I expect.

I expect not, but it falls to me to prove that, doesn't it?  I was
definitely not contemplating putting this forward for halloween, but
instead to undertake the grunt work when the new stable series opens
(and while *you* are busy chasing all the new bugs you made, *cackle*
*cackle*).

> >  Doing otherwise will just allow various applications
> > to start growing tendrils into the field, making it that much harder
> > to get rid of when the time comes.
> > 
> > So the question is, does anyone *really* need (void *) page->private
> > instead of page->buffers?
> 
> Don't know.  But leaving it as-is tells the world that this is
> per-fs metadata which the VM/VFS supports.  This has no cost.

It has a creeping-rot cost, because filesystems will invitably come up
with large numbers of mostly-bogus reasons for using it.  I think the
solution to this is to introduce a hashed ->private_frob_me structure
and restore ->buffers to visibility by the vfs, which needs all the
help it can get to survive the current misfit between page and block
size.

On second thought, your name change sounds really attractive, how
about:

-	struct buffer_head *buffers;
+	struct block *blocks;

Unfortunately, I can't think of any nice macro way to ease the pain
of the patch.

-- 
Daniel

  reply	other threads:[~2002-09-09 22:14 UTC|newest]

Thread overview: 77+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-05 14:25 invalidate_inode_pages in 2.5.32/3 Chuck Lever
2002-09-05 18:27 ` Andrew Morton
2002-09-05 18:53   ` Chuck Lever
2002-09-05 19:17     ` Andrew Morton
2002-09-05 20:00       ` Trond Myklebust
2002-09-05 20:15         ` Andrew Morton
2002-09-05 20:27           ` Trond Myklebust
2002-09-05 20:37             ` Andrew Morton
2002-09-05 20:51               ` Trond Myklebust
2002-09-05 21:12                 ` Andrew Morton
2002-09-05 21:31                   ` Trond Myklebust
2002-09-05 22:19                     ` Andrew Morton
2002-09-06  0:48                       ` Trond Myklebust
2002-09-06  1:08                         ` Andrew Morton
2002-09-06  6:49                           ` Trond Myklebust
2002-09-07  8:37                           ` Daniel Phillips
2002-09-07 16:09                             ` Andrew Morton
2002-09-07 17:02                               ` Andrew Morton
2002-09-07  8:24                       ` Daniel Phillips
2002-09-07 16:06                         ` Andrew Morton
2002-09-09 21:08                           ` Daniel Phillips
2002-09-09 21:36                             ` Andrew Morton
2002-09-09 22:12                               ` Daniel Phillips [this message]
2002-09-07 18:47                         ` Rik van Riel
2002-09-07 23:09                           ` Andrew Morton
2002-09-09 21:44                             ` Daniel Phillips
2002-09-09 22:03                               ` Andrew Morton
2002-09-09 22:19                                 ` Daniel Phillips
2002-09-09 22:32                                   ` Andrew Morton
2002-09-10 16:57                                     ` Daniel Phillips
2002-09-09 23:51                                   ` Chuck Lever
2002-09-10  1:07                                     ` Daniel Phillips
2002-09-10 15:09                                       ` Chuck Lever
2002-09-10 16:13                                         ` Daniel Phillips
2002-09-10 19:04                                           ` Chuck Lever
2002-09-10 20:52                                             ` Daniel Phillips
2002-09-11  0:07                                               ` Andrew Morton
2002-09-11  0:27                                                 ` Daniel Phillips
2002-09-11  0:38                                                   ` Andrew Morton
2002-09-11  0:53                                                     ` Daniel Phillips
2002-09-11  1:49                                                       ` Andrew Morton
2002-09-11  2:14                                                         ` Daniel Phillips
2002-09-11 16:18                                                 ` Rik van Riel
2002-09-11 17:14                                                   ` Daniel Phillips
2002-09-12 19:06                                             ` Daniel Phillips
2002-09-12 22:05                                         ` Urban Widmark
2002-09-12 22:21                                           ` Andrew Morton
2002-09-12 22:30                                             ` Rik van Riel
2002-09-12 22:43                                               ` Daniel Phillips
2002-09-12 22:51                                               ` Andrew Morton
2002-09-12 23:05                                                 ` Randy.Dunlap
2002-09-12 23:23                                                 ` Rik van Riel
2002-09-12 23:53                                                   ` Daniel Phillips
2002-09-23 16:38                                                 ` Trond Myklebust
2002-09-23 17:16                                                   ` Daniel Phillips
2002-09-23 18:57                                                   ` Andrew Morton
2002-09-23 20:41                                                     ` Trond Myklebust
2002-09-23 20:49                                                       ` Daniel Phillips
2002-09-23 22:43                                                         ` Trond Myklebust
2002-09-24  5:09                                                           ` Daniel Phillips
2002-09-24 16:40                                                             ` Trond Myklebust
2002-09-23 19:13                                                   ` Daniel Phillips
2002-09-13  4:19                                               ` Daniel Phillips
2002-09-13  4:52                                               ` Daniel Phillips
2002-09-14  9:58                                             ` Urban Widmark
2002-09-12 13:04                                     ` Trond Myklebust
2002-09-12 18:21                                       ` Andrew Morton
2002-09-12 21:15                                         ` Daniel Phillips
2002-09-12 21:38                                           ` Andrew Morton
2002-09-12 21:52                                             ` Daniel Phillips
2002-09-05 22:01                   ` Chuck Lever
2002-09-05 22:23                     ` Andrew Morton
2002-09-05 21:41           ` Chuck Lever
2002-09-06  9:35     ` Helge Hafting
2002-09-06 16:16       ` Chuck Lever
2002-09-07  8:01   ` Daniel Phillips
2002-09-07 10:01     ` Daniel Phillips

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=E17oWlM-0006vI-00@starship \
    --to=phillips@arcor.de \
    --cc=akpm@digeo.com \
    --cc=cel@citi.umich.edu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=trond.myklebust@fys.uio.no \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.