All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/9] [RFC] pageout work and dirty reclaim throttling
@ 2012-02-28 14:00 ` Fengguang Wu
  0 siblings, 0 replies; 116+ messages in thread
From: Fengguang Wu @ 2012-02-28 14:00 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Greg Thelen, Jan Kara, Ying Han, hannes, KAMEZAWA Hiroyuki,
	Rik van Riel, Linux Memory Management List, Fengguang Wu, LKML

Andrew,

This aims to improve two major page reclaim problems

a) pageout I/O efficiency, by sending pageout work to the flusher
b) interactive performance, by selectively throttle the writing tasks

when under heavy pressure of dirty/writeback pages. The tests results for 1)
and 2) look promising and are included in patches 6 and 9.

However there are still two open problems.

1) ext4 "hung task" problem, as put by Jan Kara:

: We enter memcg reclaim from grab_cache_page_write_begin() and are
: waiting in reclaim_wait(). Because grab_cache_page_write_begin() is
: called with transaction started, this blocks transaction from
: committing and subsequently blocks all other activity on the
: filesystem. The fact is this isn't new with your patches, just your
: changes or the fact that we are running in a memory constrained cgroup
: make this more visible.

2) the pageout work may be deferred by sync work

Like 1), there is also no obvious good way out. The closest fix may be to
service some pageout works each time the other work finishes with one inode.
But problem is, the sync work does not limit chunk size at all. So it's
possible for sync to work on one inode for 1 minute before giving the pageout
works a chance...

Due to problems (1) and (2), it's still not a complete solution. For ease of
debug, several trace_printk() and debugfs interfaces are included for now.

 [PATCH 1/9] memcg: add page_cgroup flags for dirty page tracking
 [PATCH 2/9] memcg: add dirty page accounting infrastructure
 [PATCH 3/9] memcg: add kernel calls for memcg dirty page stats
 [PATCH 4/9] memcg: dirty page accounting support routines
 [PATCH 5/9] writeback: introduce the pageout work
 [PATCH 6/9] vmscan: dirty reclaim throttling
 [PATCH 7/9] mm: pass __GFP_WRITE to memcg charge and reclaim routines
 [PATCH 8/9] mm: dont set __GFP_WRITE on ramfs/sysfs writes                                                  
 [PATCH 9/9] mm: debug vmscan waits

 fs/fs-writeback.c                |  230 +++++++++++++++++++++-
 fs/nfs/write.c                   |    4 
 fs/super.c                       |    1 
 include/linux/backing-dev.h      |    2 
 include/linux/gfp.h              |    2 
 include/linux/memcontrol.h       |   13 +
 include/linux/mmzone.h           |    1 
 include/linux/page_cgroup.h      |   23 ++
 include/linux/sched.h            |    1 
 include/linux/writeback.h        |   18 +
 include/trace/events/vmscan.h    |   68 ++++++
 include/trace/events/writeback.h |   12 -
 mm/backing-dev.c                 |   10 
 mm/filemap.c                     |   20 +
 mm/internal.h                    |    7 
 mm/memcontrol.c                  |  199 ++++++++++++++++++-
 mm/migrate.c                     |    3 
 mm/page-writeback.c              |    6 
 mm/page_alloc.c                  |    1 
 mm/swap.c                        |    4 
 mm/truncate.c                    |    1 
 mm/vmscan.c                      |  298 ++++++++++++++++++++++++++---
 22 files changed, 864 insertions(+), 60 deletions(-)

Thanks,
Fengguang


^ permalink raw reply	[flat|nested] 116+ messages in thread

end of thread, other threads:[~2012-03-12 14:19 UTC | newest]

Thread overview: 116+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-28 14:00 [PATCH 0/9] [RFC] pageout work and dirty reclaim throttling Fengguang Wu
2012-02-28 14:00 ` Fengguang Wu
2012-02-28 14:00 ` [PATCH 1/9] memcg: add page_cgroup flags for dirty page tracking Fengguang Wu
2012-02-28 14:00   ` Fengguang Wu
2012-02-29  0:50   ` KAMEZAWA Hiroyuki
2012-02-29  0:50     ` KAMEZAWA Hiroyuki
2012-03-04  1:29     ` Fengguang Wu
2012-03-04  1:29       ` Fengguang Wu
2012-02-28 14:00 ` [PATCH 2/9] memcg: add dirty page accounting infrastructure Fengguang Wu
2012-02-28 14:00   ` Fengguang Wu
2012-02-28 22:37   ` Andrew Morton
2012-02-28 22:37     ` Andrew Morton
2012-02-29  0:27     ` Fengguang Wu
2012-02-29  0:27       ` Fengguang Wu
2012-02-28 14:00 ` [PATCH 3/9] memcg: add kernel calls for memcg dirty page stats Fengguang Wu
2012-02-28 14:00   ` Fengguang Wu
2012-02-29  1:10   ` KAMEZAWA Hiroyuki
2012-02-29  1:10     ` KAMEZAWA Hiroyuki
2012-02-28 14:00 ` [PATCH 4/9] memcg: dirty page accounting support routines Fengguang Wu
2012-02-28 14:00   ` Fengguang Wu
2012-02-28 15:15   ` Fengguang Wu
2012-02-28 15:15     ` Fengguang Wu
2012-02-28 22:45   ` Andrew Morton
2012-02-28 22:45     ` Andrew Morton
2012-02-29  1:15     ` KAMEZAWA Hiroyuki
2012-02-29  1:15       ` KAMEZAWA Hiroyuki
2012-02-28 14:00 ` [PATCH 5/9] writeback: introduce the pageout work Fengguang Wu
2012-02-28 14:00   ` Fengguang Wu
2012-02-29  0:04   ` Andrew Morton
2012-02-29  0:04     ` Andrew Morton
2012-02-29  2:31     ` Fengguang Wu
2012-02-29  2:31       ` Fengguang Wu
2012-02-29 13:28     ` Fengguang Wu
2012-02-29 13:28       ` Fengguang Wu
2012-03-01 11:04     ` Jan Kara
2012-03-01 11:04       ` Jan Kara
2012-03-01 11:41       ` Fengguang Wu
2012-03-01 11:41         ` Fengguang Wu
2012-03-01 16:50         ` Jan Kara
2012-03-01 16:50           ` Jan Kara
2012-03-01 19:46         ` Andrew Morton
2012-03-01 19:46           ` Andrew Morton
2012-03-03 13:25           ` Fengguang Wu
2012-03-03 13:25             ` Fengguang Wu
2012-03-07  0:37             ` Andrew Morton
2012-03-07  0:37               ` Andrew Morton
2012-03-07  5:40               ` Fengguang Wu
2012-03-07  5:40                 ` Fengguang Wu
2012-03-01 19:42       ` Andrew Morton
2012-03-01 19:42         ` Andrew Morton
2012-03-01 21:15         ` Jan Kara
2012-03-01 21:15           ` Jan Kara
2012-03-01 21:22           ` Andrew Morton
2012-03-01 21:22             ` Andrew Morton
2012-03-01 12:36     ` Fengguang Wu
2012-03-01 12:36       ` Fengguang Wu
2012-03-01 16:38       ` Jan Kara
2012-03-01 16:38         ` Jan Kara
2012-03-02  4:48         ` Fengguang Wu
2012-03-02  4:48           ` Fengguang Wu
2012-03-02  9:59           ` Jan Kara
2012-03-02  9:59             ` Jan Kara
2012-03-02 10:39             ` Fengguang Wu
2012-03-02 10:39               ` Fengguang Wu
2012-03-02 19:57               ` Andrew Morton
2012-03-02 19:57                 ` Andrew Morton
2012-03-03 13:55                 ` Fengguang Wu
2012-03-03 13:55                   ` Fengguang Wu
2012-03-03 14:27                   ` Fengguang Wu
2012-03-03 14:27                     ` Fengguang Wu
2012-03-04 11:13                     ` Fengguang Wu
2012-03-04 11:13                       ` Fengguang Wu
2012-03-07 15:48                   ` Artem Bityutskiy
2012-03-07 15:48                     ` Artem Bityutskiy
2012-03-09  7:31                     ` Fengguang Wu
2012-03-09  7:31                       ` Fengguang Wu
2012-03-09  9:51                       ` Jan Kara
2012-03-09  9:51                         ` Jan Kara
2012-03-09 10:24                         ` Artem Bityutskiy
2012-03-09 10:24                           ` Artem Bityutskiy
2012-03-09 16:10                         ` Artem Bityutskiy
2012-03-09 16:10                           ` Artem Bityutskiy
2012-03-09 21:11                           ` Jan Kara
2012-03-09 21:11                             ` Jan Kara
2012-03-12 12:36                             ` Artem Bityutskiy
2012-03-12 12:36                               ` Artem Bityutskiy
2012-03-12 14:02                               ` Jan Kara
2012-03-12 14:02                                 ` Jan Kara
2012-03-12 14:21                                 ` Artem Bityutskiy
2012-03-12 14:21                                   ` Artem Bityutskiy
2012-03-09 10:15                   ` Jan Kara
2012-03-09 10:15                     ` Jan Kara
2012-03-09 15:10                     ` Fengguang Wu
2012-03-09 15:10                       ` Fengguang Wu
2012-02-29 13:51   ` [PATCH v2 " Fengguang Wu
2012-02-29 13:51     ` Fengguang Wu
2012-03-01 13:35     ` Fengguang Wu
2012-03-01 13:35       ` Fengguang Wu
2012-03-02  6:22       ` [PATCH v3 " Fengguang Wu
2012-03-02  6:22         ` Fengguang Wu
2012-02-28 14:00 ` [PATCH 6/9] vmscan: dirty reclaim throttling Fengguang Wu
2012-02-28 14:00   ` Fengguang Wu
2012-02-28 14:00 ` [PATCH 7/9] mm: pass __GFP_WRITE to memcg charge and reclaim routines Fengguang Wu
2012-02-28 14:00   ` Fengguang Wu
2012-02-28 14:00 ` [PATCH 8/9] mm: dont set __GFP_WRITE on ramfs/sysfs writes Fengguang Wu
2012-02-28 14:00   ` Fengguang Wu
2012-03-01 10:13   ` Johannes Weiner
2012-03-01 10:13     ` Johannes Weiner
2012-03-01 10:30     ` Fengguang Wu
2012-03-01 10:30       ` Fengguang Wu
2012-02-28 14:00 ` [PATCH 9/9] mm: debug vmscan waits Fengguang Wu
2012-02-28 14:00   ` Fengguang Wu
2012-03-02  6:59   ` [RFC PATCH] mm: don't treat anonymous pages as dirtyable pages Fengguang Wu
2012-03-02  6:59     ` Fengguang Wu
2012-03-02  7:18     ` Fengguang Wu
2012-03-02  7:18       ` Fengguang Wu

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.