From: Chris Mason <mason@suse.com>
To: Daniel Phillips <phillips@bonn-fries.net>, linux-kernel@vger.kernel.org
Cc: linux-mm@kvack.org
Subject: Re: [RFC] using writepage to start io
Date: Mon, 06 Aug 2001 12:51:48 -0400 [thread overview]
Message-ID: <651080000.997116708@tiny> (raw)
In-Reply-To: <01080618132007.00294@starship>
On Monday, August 06, 2001 06:13:20 PM +0200 Daniel Phillips
<phillips@bonn-fries.net> wrote:
>> I am saying that it should be possible to have the best buffer flushed
>> under memory pressure (by kswapd/bdflush) and still get the old data
>> to disk in time through kupdate.
>
> Yes, to phrase this more precisely, after we've submitted all the
> too-old buffers we then gain the freedom to select which of the younger
> buffers to flush.
Almost ;-) memory pressure doesn't need to care about how long a buffer has
been dirty, that's kupdate's job. kupdate doesn't care if the buffer it is
writing is a good candidate for freeing, that's taken care of elsewhere.
The two never need to talk (aside from optimizations).
> When there is memory pressure we could benefit by
> skipping over some of the sys_write buffers in favor of page_launder
> buffers. We may well be able to recognize the latter by looking for
> !bh->b_page->age. This method would be an alternative to your
> writepage approach.
Yes, I had experimented with this in addition to the writepage patch, it
would probably be better to try it as a standalone idea.
>
>> > By the way, I think you should combine (2) and (3) using an and,
>> > which gets us back to the "kupdate thing" vs the "bdflush thing".
>>
>> Perhaps, since I think they would be handled in roughly the same way.
>
> (warning: I'm going to drift pretty far off the original topic now...)
>
> I don't see why it makes sense to have both a kupdate and a bdflush
> thread.
Having two threads is exactly what allows memory pressure to not be
concerned about how long a buffer has been dirty.
> We should complete the process of merging these (sharing
> flush_dirty buffers was a big step) and look into the possibility of
> adding more intelligence about what to submit next. The proof of the
> pudding is to come up with a throughput-improving patch, not so easy
> since the ore in these hills has been sought after for a good number of
> years by many skilled prospectors.
>
> Note that bdflush also competes with an unbounded number of threads
> doing wakeup_bdflush(1)->flush_dirty_buffers.
Nods. Of course, processes could wait on bdflush instead, but bdflush
might not be able to keep up. It would be interesting to experiment with a
bdflush thread per device, one that uses write_unlocked_buffers to get the
io done. I'll start by switching from flush_dirty_buffers to
write_unlocked_buffers in the current code...
-chris
WARNING: multiple messages have this Message-ID (diff)
From: Chris Mason <mason@suse.com>
To: Daniel Phillips <phillips@bonn-fries.net>, linux-kernel@vger.kernel.org
Cc: linux-mm@kvack.org
Subject: Re: [RFC] using writepage to start io
Date: Mon, 06 Aug 2001 12:51:48 -0400 [thread overview]
Message-ID: <651080000.997116708@tiny> (raw)
In-Reply-To: <01080618132007.00294@starship>
On Monday, August 06, 2001 06:13:20 PM +0200 Daniel Phillips
<phillips@bonn-fries.net> wrote:
>> I am saying that it should be possible to have the best buffer flushed
>> under memory pressure (by kswapd/bdflush) and still get the old data
>> to disk in time through kupdate.
>
> Yes, to phrase this more precisely, after we've submitted all the
> too-old buffers we then gain the freedom to select which of the younger
> buffers to flush.
Almost ;-) memory pressure doesn't need to care about how long a buffer has
been dirty, that's kupdate's job. kupdate doesn't care if the buffer it is
writing is a good candidate for freeing, that's taken care of elsewhere.
The two never need to talk (aside from optimizations).
> When there is memory pressure we could benefit by
> skipping over some of the sys_write buffers in favor of page_launder
> buffers. We may well be able to recognize the latter by looking for
> !bh->b_page->age. This method would be an alternative to your
> writepage approach.
Yes, I had experimented with this in addition to the writepage patch, it
would probably be better to try it as a standalone idea.
>
>> > By the way, I think you should combine (2) and (3) using an and,
>> > which gets us back to the "kupdate thing" vs the "bdflush thing".
>>
>> Perhaps, since I think they would be handled in roughly the same way.
>
> (warning: I'm going to drift pretty far off the original topic now...)
>
> I don't see why it makes sense to have both a kupdate and a bdflush
> thread.
Having two threads is exactly what allows memory pressure to not be
concerned about how long a buffer has been dirty.
> We should complete the process of merging these (sharing
> flush_dirty buffers was a big step) and look into the possibility of
> adding more intelligence about what to submit next. The proof of the
> pudding is to come up with a throughput-improving patch, not so easy
> since the ore in these hills has been sought after for a good number of
> years by many skilled prospectors.
>
> Note that bdflush also competes with an unbounded number of threads
> doing wakeup_bdflush(1)->flush_dirty_buffers.
Nods. Of course, processes could wait on bdflush instead, but bdflush
might not be able to keep up. It would be interesting to experiment with a
bdflush thread per device, one that uses write_unlocked_buffers to get the
io done. I'll start by switching from flush_dirty_buffers to
write_unlocked_buffers in the current code...
-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/
next prev parent reply other threads:[~2001-08-06 16:52 UTC|newest]
Thread overview: 57+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-08-05 18:34 [RFC] using writepage to start io Chris Mason
2001-08-05 18:34 ` Chris Mason
2001-08-05 22:38 ` Daniel Phillips
2001-08-05 22:38 ` Daniel Phillips
2001-08-05 23:32 ` Chris Mason
2001-08-05 23:32 ` Chris Mason
2001-08-06 5:39 ` Daniel Phillips
2001-08-06 5:39 ` Daniel Phillips
2001-08-06 13:24 ` Chris Mason
2001-08-06 13:24 ` Chris Mason
2001-08-06 16:13 ` Daniel Phillips
2001-08-06 16:13 ` Daniel Phillips
2001-08-06 16:51 ` Chris Mason [this message]
2001-08-06 16:51 ` Chris Mason
2001-08-06 19:45 ` Daniel Phillips
2001-08-06 19:45 ` Daniel Phillips
2001-08-06 20:12 ` Chris Mason
2001-08-06 20:12 ` Chris Mason
2001-08-06 21:18 ` Daniel Phillips
2001-08-06 21:18 ` Daniel Phillips
2001-08-07 11:02 ` Stephen C. Tweedie
2001-08-07 11:02 ` Stephen C. Tweedie
2001-08-07 11:39 ` Ed Tomlinson
2001-08-07 11:39 ` Ed Tomlinson
2001-08-07 18:36 ` Daniel Phillips
2001-08-07 18:36 ` Daniel Phillips
2001-08-07 12:07 ` Anton Altaparmakov
2001-08-07 12:07 ` Anton Altaparmakov
2001-08-07 12:02 ` Anton Altaparmakov
2001-08-07 12:02 ` Anton Altaparmakov
2001-08-07 13:29 ` Daniel Phillips
2001-08-07 13:29 ` Daniel Phillips
2001-08-07 13:31 ` Alexander Viro
2001-08-07 13:31 ` Alexander Viro
2001-08-07 15:52 ` Daniel Phillips
2001-08-07 15:52 ` Daniel Phillips
2001-08-07 14:23 ` Stephen C. Tweedie
2001-08-07 14:23 ` Stephen C. Tweedie
2001-08-07 15:51 ` Daniel Phillips
2001-08-07 15:51 ` Daniel Phillips
2001-08-08 14:49 ` Stephen C. Tweedie
2001-08-08 14:49 ` Stephen C. Tweedie
2001-08-06 15:13 ` Eric W. Biederman
2001-08-06 15:13 ` Eric W. Biederman
-- strict thread matches above, loose matches on Subject: below --
2001-08-07 15:19 Chris Mason
2001-08-07 15:19 ` Chris Mason
2001-07-28 16:01 Chris Mason
2001-07-28 16:18 ` Alexander Viro
2001-07-28 16:25 ` Chris Mason
2001-07-31 19:07 ` Chris Mason
2001-07-31 19:07 ` Chris Mason
2001-08-01 1:01 ` Daniel Phillips
2001-08-01 1:01 ` Daniel Phillips
2001-08-01 2:05 ` Chris Mason
2001-08-01 2:05 ` Chris Mason
2001-08-01 14:57 ` Daniel Phillips
2001-08-01 14:57 ` 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=651080000.997116708@tiny \
--to=mason@suse.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=phillips@bonn-fries.net \
/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.