From: "Michael Rubin" <mrubin@google.com>
To: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org,
linux-mm@kvack.org, wfg@mail.ustc.edu.cn
Subject: Re: [patch 1/1] Writeback fix for concurrent large and small file writes.
Date: Wed, 12 Dec 2007 15:03:04 -0800 [thread overview]
Message-ID: <532480950712121503r64dbd51oc4778e96cbd37e3c@mail.gmail.com> (raw)
In-Reply-To: <1197492954.6353.64.camel@lappy>
On Dec 12, 2007 12:55 PM, Peter Zijlstra <a.p.zijlstra@chello.nl> wrote:
>
> On Mon, 2007-12-10 at 18:02 -0800, Michael Rubin wrote:
> > From: Michael Rubin <mrubin@google.com>
> The part I miss here is the rationale on _how_ you solve the problem.
>
> The patch itself is simple enough, but I've been staring at this code
> for a while now, and I'm just not getting it.
Apologies for the lack of rationale. I have been staring at this code
for awhile also and it makes my head hurt. I have a patch coming
(hopefully today) that proposes using one data structure with a more
consistent priority scheme for 2.6.25. To me it's simpler, but I am
biased.
The problem we encounter when we append to a large file at a fast rate
while also writing to smaller files is that the wb_kupdate thread does
not keep up with disk traffic. In this workload often the inodes end
up at fs/fs-writeback.c:287 after do_writepages, since do_writepages
did not write all the pages. This can be due to congestion but I
think there are other causes also since I have observed so.
The first issue is that the inode is put on the s_more_io queue. This
ensures that more_io is set at the end of sync_sb_inodes. The result
from that is the wb_kupdate routine will perform a sleep at
mm/page-writeback.c:642. This slows us down enough that the wb_kupdate
cannot keep up with traffic.
The other issue is that the inode that has been placed on the
s_more_io queue cannot be processed by sync_sb_inodes until the entire
s_io list is empty. With lots of small files that are not being
dirtied as quickly as the one large inode on the s_more_io queue the
inode with the most pages being dirtied is not given attention and
wb_kupdate cannot keep up again.
mrubin
--
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>
next prev parent reply other threads:[~2007-12-12 23:03 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-11 2:02 [patch 1/1] Writeback fix for concurrent large and small file writes Michael Rubin, Michael Rubin
2007-12-12 20:55 ` Peter Zijlstra
2007-12-12 23:03 ` Michael Rubin [this message]
[not found] ` <E1J89kR-0001v3-CJ@localhost>
2007-12-28 7:35 ` Fengguang Wu
-- strict thread matches above, loose matches on Subject: below --
2007-11-28 19:29 Michael Rubin
[not found] ` <E1IxXMP-0002i8-4S@localhost>
2007-11-29 0:34 ` Fengguang Wu
2007-11-29 19:51 ` Michael Rubin
2007-11-29 20:16 ` Michael Rubin
[not found] ` <E1IxukV-0003Ns-5C@localhost>
2007-11-30 1:32 ` Fengguang Wu
2007-12-04 9:06 ` Michael Rubin
2007-11-29 2:13 ` Frans Pop
2007-11-29 6:58 ` Michael Rubin
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=532480950712121503r64dbd51oc4778e96cbd37e3c@mail.gmail.com \
--to=mrubin@google.com \
--cc=a.p.zijlstra@chello.nl \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=wfg@mail.ustc.edu.cn \
/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;
as well as URLs for NNTP newsgroup(s).