Skip to content

RFC Cpuset aware writeback

Christoph Lameter linux-mm lkml 1 version In review

Get series with b4
b4 am 20070116054743.15358.77287.sendpatchset@schroedinger.engr.sgi.com

Versions newest first

  1. v1 RFC Latest8 patches 63 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8Convert higest_possible_node_id() into nr_node_idsinclude/linux/nodemask.h mm/page_alloc.c net/sunrpc/svc.c+25 -184 replies
2/8Add a map to inodes to track dirty pages per nodefs/buffer.c fs/fs-writeback.c fs/inode.c +3 more+36 -00 replies
3/8Add a nodemask to pdflush functionsfs/buffer.c fs/super.c fs/sync.c +4 more+32 -220 replies
4/8Per cpuset dirty ratio handling and writeoutfs/fs-writeback.c include/linux/writeback.h mm/page-writeback.c+96 -420 replies
5/8Make writeout during reclaim cpuset awaremm/vmscan.c+2 -17 replies
6/8Throttle vm writeout per cpusetinclude/linux/writeback.h mm/page-writeback.c mm/vmscan.c+4 -40 replies
7/8Exclude unreclaimable pages from dirty ration calculationdrivers/base/node.c fs/proc/proc_misc.c include/linux/mmzone.h +3 more+18 -42 replies
8/8Reduce inode memory usage for systems with a high MAX_NUMNODESfs/ext3/super.c fs/inode.c fs/nfs/inode.c +6 more+43 -124 replies

Reviews trailers per patch

None of the 8 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchPeter ZijlstraChristoph Lameter
SeriesA-b A-b
1/8
2/8
3/8
4/8
5/8
6/8
7/8
8/8

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [RFC 0/8] Cpuset aware writeback

Currently cpusets are not able to do proper writeback since dirty ratio calculations and writeback are all done for the system as a whole. This may result in a large percentage of a cpuset to become dirty without writeout being triggered. Under NFS this can lead to OOM conditions.

Writeback will occur during the LRU scans. But such writeout is not effective since we write page by page and not in inode page order (regular writeback).

In order to fix the problem we first of all introduce a method to establish a map of nodes that contain dirty pages for each inode mapping.

Secondly we modify the dirty limit calculation to be based on the acctive cpuset.

If we are in a cpuset then we select only inodes for writeback that have pages on the nodes of the cpuset.

After we have the cpuset throttling in place we can then make further fixups:

A. We can do inode based writeout from direct reclaim
avoiding single page writes to the filesystem.

B. We add a new counter NR_UNRECLAIMABLE that is subtracted
from the available pages in a node. This allows us to accurately calculate the dirty ratio even if large portions of the node have been allocated for huge pages or for slab pages.

There are a couple of points where some better ideas could be used:

1. The nodemask expands the inode structure significantly if the architecture allows a high number of nodes. This is only an issue for IA64. For that platform we expand the inode structure by 128 byte (to support 1024 nodes). The last patch attempts to address the issue by using the knowledge about the maximum possible number of nodes determined on bootup to shrink the nodemask.

2. The calculation of the per cpuset limits can require looping over a number of nodes which may bring the performance of get_dirty_limits near pre 2.6.18 performance (before the introduction of the ZVC counters) (only for cpuset based limit calculation). There is no way of keeping these counters per cpuset since cpusets may overlap.

Paul probably needs to go through this and may want additional fixes to keep things in harmony with cpusets.

Tested on:
IA64 NUMA 128p, 12p

Compiles on:
i386 SMP
x86_64 UP

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>