All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fengguang Wu <wfg@mail.ustc.edu.cn>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Michael Rubin <mrubin@google.com>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [patch] Converting writeback linked lists to a tree based data structure
Date: Wed, 16 Jan 2008 12:25:53 +0800	[thread overview]
Message-ID: <400457571.32162@ustc.edu.cn> (raw)
Message-ID: <E1JEzqb-0003YX-Rg@localhost.localdomain> (raw)
In-Reply-To: <20080115194415.64ba95f2.akpm@linux-foundation.org>

On Tue, Jan 15, 2008 at 07:44:15PM -0800, Andrew Morton wrote:
> On Wed, 16 Jan 2008 11:01:08 +0800 Fengguang Wu <wfg@mail.ustc.edu.cn> wrote:
> 
> > On Tue, Jan 15, 2008 at 09:53:42AM -0800, Michael Rubin wrote:
> > > On Jan 15, 2008 12:46 AM, Peter Zijlstra <a.p.zijlstra@chello.nl> wrote:
> > > > Just a quick question, how does this interact/depend-uppon etc.. with
> > > > Fengguangs patches I still have in my mailbox? (Those from Dec 28th)
> > > 
> > > They don't. They apply to a 2.6.24rc7 tree. This is a candidte for 2.6.25.
> > > 
> > > This work was done before Fengguang's patches. I am trying to test
> > > Fengguang's for comparison but am having problems with getting mm1 to
> > > boot on my systems.
> > 
> > Yeah, they are independent ones. The initial motivation is to fix the
> > bug "sluggish writeback on small+large files". Michael introduced
> > a new rbtree, and me introduced a new list(s_more_io_wait).
> > 
> > Basically I think rbtree is an overkill to do time based ordering.
> > Sorry, Michael. But s_dirty would be enough for that. Plus, s_more_io
> > provides fair queuing between small/large files, and s_more_io_wait
> > provides waiting mechanism for blocked inodes.
> > 
> > The time ordered rbtree may delay io for a blocked inode simply by
> > modifying its dirtied_when and reinsert it. But it would no longer be
> > that easy if it is to be ordered by location.
> 
> What does the term "ordered by location" mean?  Attemting to sort inodes by
> physical disk address?  By using their i_ino as a key?
> 
> That sounds optimistic.

Yes, exactly. Think about email servers with lots of dirty files.

> > If we are going to do location based ordering in the future, the lists
> > will continue to be useful. It would simply be a matter of switching
> > from the s_dirty(order by time) to some rbtree or radix tree(order by
> > location).
> > 
> > We can even provide both ordering at the same time to different
> > fs/inodes which is configurable by the user. Because the s_dirty
> > and/or rbtree would provide _only_ ordering(not faireness or waiting)
> > and hence is interchangeable.
> > 
> > This patchset could be a good reference. It does location based
> > ordering with radix tree:
> > 
> > [RFC][PATCH] clustered writeback <http://lkml.org/lkml/2007/8/27/45>
> 
> list_heads are just the wrong data structure for this function.  Especially
> list_heads which are protected by a non-sleeping lock.

list_heads are OK if we use them for one and only function. We have
been trying to jam too much into s_dirty in the past.  Grabbing a
refcount could be better than locking - anyway if we split the
functions today, it would be easy to replace the list_heads one by
one in the future.


WARNING: multiple messages have this Message-ID (diff)
From: Fengguang Wu <wfg@mail.ustc.edu.cn>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Michael Rubin <mrubin@google.com>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [patch] Converting writeback linked lists to a tree based data structure
Date: Wed, 16 Jan 2008 12:25:53 +0800	[thread overview]
Message-ID: <400457571.32162@ustc.edu.cn> (raw)
Message-ID: <E1JEzqb-0003YX-Rg@localhost.localdomain> (raw)
In-Reply-To: <20080115194415.64ba95f2.akpm@linux-foundation.org>

On Tue, Jan 15, 2008 at 07:44:15PM -0800, Andrew Morton wrote:
> On Wed, 16 Jan 2008 11:01:08 +0800 Fengguang Wu <wfg@mail.ustc.edu.cn> wrote:
> 
> > On Tue, Jan 15, 2008 at 09:53:42AM -0800, Michael Rubin wrote:
> > > On Jan 15, 2008 12:46 AM, Peter Zijlstra <a.p.zijlstra@chello.nl> wrote:
> > > > Just a quick question, how does this interact/depend-uppon etc.. with
> > > > Fengguangs patches I still have in my mailbox? (Those from Dec 28th)
> > > 
> > > They don't. They apply to a 2.6.24rc7 tree. This is a candidte for 2.6.25.
> > > 
> > > This work was done before Fengguang's patches. I am trying to test
> > > Fengguang's for comparison but am having problems with getting mm1 to
> > > boot on my systems.
> > 
> > Yeah, they are independent ones. The initial motivation is to fix the
> > bug "sluggish writeback on small+large files". Michael introduced
> > a new rbtree, and me introduced a new list(s_more_io_wait).
> > 
> > Basically I think rbtree is an overkill to do time based ordering.
> > Sorry, Michael. But s_dirty would be enough for that. Plus, s_more_io
> > provides fair queuing between small/large files, and s_more_io_wait
> > provides waiting mechanism for blocked inodes.
> > 
> > The time ordered rbtree may delay io for a blocked inode simply by
> > modifying its dirtied_when and reinsert it. But it would no longer be
> > that easy if it is to be ordered by location.
> 
> What does the term "ordered by location" mean?  Attemting to sort inodes by
> physical disk address?  By using their i_ino as a key?
> 
> That sounds optimistic.

Yes, exactly. Think about email servers with lots of dirty files.

> > If we are going to do location based ordering in the future, the lists
> > will continue to be useful. It would simply be a matter of switching
> > from the s_dirty(order by time) to some rbtree or radix tree(order by
> > location).
> > 
> > We can even provide both ordering at the same time to different
> > fs/inodes which is configurable by the user. Because the s_dirty
> > and/or rbtree would provide _only_ ordering(not faireness or waiting)
> > and hence is interchangeable.
> > 
> > This patchset could be a good reference. It does location based
> > ordering with radix tree:
> > 
> > [RFC][PATCH] clustered writeback <http://lkml.org/lkml/2007/8/27/45>
> 
> list_heads are just the wrong data structure for this function.  Especially
> list_heads which are protected by a non-sleeping lock.

list_heads are OK if we use them for one and only function. We have
been trying to jam too much into s_dirty in the past.  Grabbing a
refcount could be better than locking - anyway if we split the
functions today, it would be easy to replace the list_heads one by
one in the future.

--
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>

  reply	other threads:[~2008-01-16  4:26 UTC|newest]

Thread overview: 68+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-15  8:09 [patch] Converting writeback linked lists to a tree based data structure Michael Rubin
2008-01-15  8:09 ` Michael Rubin, Michael Rubin
2008-01-15  8:46 ` Peter Zijlstra
2008-01-15  8:46   ` Peter Zijlstra
2008-01-15 17:53   ` Michael Rubin
2008-01-15 17:53     ` Michael Rubin
2008-01-16  3:01     ` Fengguang Wu
2008-01-16  3:01       ` Fengguang Wu
2008-01-16  3:01         ` Fengguang Wu
2008-01-16  3:44         ` Andrew Morton
2008-01-16  3:44           ` Andrew Morton
2008-01-16  4:25           ` Fengguang Wu [this message]
2008-01-16  4:25             ` Fengguang Wu
2008-01-16  4:25               ` Fengguang Wu
2008-01-16  4:42               ` Andrew Morton
2008-01-16  4:42                 ` Andrew Morton
2008-01-16  4:55                 ` Fengguang Wu
2008-01-16  4:55                   ` Fengguang Wu
2008-01-16  4:55                     ` Fengguang Wu
2008-01-16  5:51                     ` Andrew Morton
2008-01-16  5:51                       ` Andrew Morton
2008-01-16  9:07                       ` Fengguang Wu
2008-01-16  9:07                         ` Fengguang Wu
2008-01-16  9:07                           ` Fengguang Wu
2008-01-18  7:36                           ` Mike Waychison
2008-01-18  7:36                             ` Mike Waychison
2008-01-16 22:35                         ` David Chinner
2008-01-16 22:35                           ` David Chinner
2008-01-17  3:16                           ` Fengguang Wu
2008-01-17  3:16                             ` Fengguang Wu
2008-01-17  3:16                               ` Fengguang Wu
2008-01-17  5:21                             ` David Chinner
2008-01-17  5:21                               ` David Chinner
2008-01-16  7:55           ` David Chinner
2008-01-16  7:55             ` David Chinner
2008-01-16  8:13             ` Andrew Morton
2008-01-16  8:13               ` Andrew Morton
2008-01-16 13:06               ` Fengguang Wu
2008-01-16 13:06                 ` Fengguang Wu
2008-01-16 13:06                   ` Fengguang Wu
2008-01-16 18:55         ` Michael Rubin
2008-01-16 18:55           ` Michael Rubin
2008-01-17  3:31           ` Fengguang Wu
2008-01-17  3:31             ` Fengguang Wu
2008-01-17  3:31               ` Fengguang Wu
2008-01-17  9:41 ` Fengguang Wu
2008-01-17  9:41   ` Fengguang Wu
2008-01-17  9:41     ` Fengguang Wu
2008-01-17 21:07     ` Michael Rubin
2008-01-17 21:07       ` Michael Rubin
2008-01-18  4:56       ` Fengguang Wu
2008-01-18  4:56         ` Fengguang Wu
2008-01-18  4:56           ` Fengguang Wu
2008-01-18  5:41           ` Andi Kleen
2008-01-18  5:41             ` Andi Kleen
2008-01-18  6:01             ` Fengguang Wu
2008-01-18  6:01               ` Fengguang Wu
2008-01-18  6:01                 ` Fengguang Wu
2008-01-18  7:48             ` Mike Waychison
2008-01-18  7:48               ` Mike Waychison
2008-01-18  6:43           ` Michael Rubin
2008-01-18  6:43             ` Michael Rubin
2008-01-18  9:32             ` Fengguang Wu
2008-01-18  9:32               ` Fengguang Wu
2008-01-18  9:32                 ` Fengguang Wu
2008-01-18  5:01       ` David Chinner
2008-01-18  5:01         ` David Chinner
2008-01-18  5:38         ` Michael Rubin
2008-01-18  5:38           ` Michael Rubin
2008-01-18  8:54           ` David Chinner
2008-01-18  8:54             ` David Chinner
2008-01-18  9:26             ` Michael Rubin
2008-01-18  9:26               ` Michael Rubin
2008-01-18  5:41         ` Fengguang Wu
2008-01-18  5:41           ` Fengguang Wu
2008-01-18  5:41             ` Fengguang Wu
2008-01-19  2:50           ` David Chinner
2008-01-19  2:50             ` David Chinner
  -- strict thread matches above, loose matches on Subject: below --
2007-12-13  0:32 Michael Rubin
2007-12-13  0:32 ` Michael Rubin, 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=400457571.32162@ustc.edu.cn \
    --to=wfg@mail.ustc.edu.cn \
    --cc=a.p.zijlstra@chello.nl \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mrubin@google.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 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.