mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Daniel Phillips <phillips@bonn-fries.net>
To: Andrew Morton <akpm@zip.com.au>
Cc: lkml <linux-kernel@vger.kernel.org>, Steve Lord <lord@sgi.com>
Subject: Re: [patch] delayed disk block allocation
Date: Mon, 4 Mar 2002 10:23:29 +0100	[thread overview]
Message-ID: <E16hogr-0000ao-00@starship.berlin> (raw)
In-Reply-To: <3C7F3B4A.41DB7754@zip.com.au> <E16hhuI-0000S6-00@starship.berlin> <3C83202D.A9FFB902@zip.com.au>
In-Reply-To: <3C83202D.A9FFB902@zip.com.au>

On March 4, 2002 08:20 am, Andrew Morton wrote:
> You know where this is headed, don't you:

Yes I do, because it's more or less a carbon copy of what I had in mind.

> - writeout is performed by the writers, and by the gang-of-flush-threads.
> - kswapd is 100% non-blocking.  It never does I/O.
> - kswapd is the only process which runs page_launder/shrink_caches.
> - Memory requesters do not perform I/O.  They sleep until memory
>   is available. kswapd gives them pages as they become available, and
>   wakes them up.
> 
> So that's the grand plan.  It may be fatally flawed - I remember Linus
> had a serious-sounding objection to it some time back, but I forget
> what that was.

I remember, since he gently roasted me last autum for thinking such thoughts. 
The idea is that by making threads do their own vm scanning they throttle 
themselves.  I don't think the resulting chaotic scanning behavior is worth 
it.

> > > With this patch, writepage() is still using the buffer layer, so lock
> > > contention will still be high.
> > 
> > Right, and buffers are going away one way or another.
> 
> This is a problem.  I'm adding new stuff which does old things in
> a new way, with no believable plan in place for getting rid of the
> old stuff.
> 
> I don't think it's humanly possible to do away with struct buffer_head.
> It is *the* way of representing a disk block.   And unless we plan
> to live with 4k pages and 4k blocks for ever, the problem is about
> to get worse.  Think 64k pages with 4k blocks.

If struct page refers to an object the same size as a disk block then struct
page can take the place of a buffer in the getblk interface.  For IO we have 
other ways of doing things, kvecs, bio's and so on.  We don't need buffers 
for that, the only thing we need them for is handles for disk blocks, and 
locking thereof.

If you actually had this now your patch would be quite a lot simpler.  It's 
going to take a while though, because first we have to do active physical 
defragmentation, and that requires rmap.  So a prototype is a few months away 
at least, but six months ago I would have said two years.

> Possibly we could handle sub-page segments of memory via a per-page up-to-date
> bitmask.  And then a `dirty' bitmask.  And then a `locked' bitmask, etc.  I
> suspect eventually we'll end up with, say, a vector of structures attached to
> each page which represents the state of each of the page's sub-segments.  whoops.

You could, but that would be a lot messier than what I have in mind.  Your 
work fits really nicely with that since it gets rid of the IO function of 
buffers.

-- 
Daniel

  reply	other threads:[~2002-03-04  9:28 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-03-01  8:26 Andrew Morton
2002-03-04  2:08 ` Daniel Phillips
2002-03-04  3:10   ` Jeff Garzik
2002-03-04  7:27     ` Andrew Morton
2002-03-04  5:04   ` Mike Fedyk
2002-03-04  5:31     ` Andreas Dilger
2002-03-04  5:40       ` Mike Fedyk
2002-03-04  6:14         ` Andreas Dilger
2002-03-04  5:41       ` Jeff Garzik
2002-03-04  6:18         ` Andreas Dilger
2002-03-04 15:02           ` Hans Reiser
2002-03-06 12:59             ` Pavel Machek
2002-03-04  7:53       ` Andrew Morton
2002-03-04  8:06         ` Daniel Phillips
2002-03-04  8:34           ` Andrew Morton
2002-03-04  7:20   ` Andrew Morton
2002-03-04  9:23     ` Daniel Phillips [this message]
2002-03-04 14:54 rwhron
2002-03-04 15:10 ` Jeff Garzik
2002-03-07 12:06 Etienne Lorrain
2002-03-07 14:47 ` Steve Lord
2002-03-07 17:30   ` Mike Fedyk

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=E16hogr-0000ao-00@starship.berlin \
    --to=phillips@bonn-fries.net \
    --cc=akpm@zip.com.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lord@sgi.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

all inboxes | Powered by JetHome®