Re: [patch 0/7] cpuset writeback throttling

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: David Rientjes
Date: Friday, October 31, 2008 - 9:36 am

On Fri, 31 Oct 2008, Dave Chinner wrote:


I've regression tested it to ensure that there is no significant 
degradation for unconstrained (non-cpuset) configurations, which is 
identical to single system-wide cpuset configurations with ratios that 
match the global sysctls.

So there should be no noticeable difference for non-cpuset users or users 
who attach all system tasks to the root cpuset with this new feature.

To simulate large NUMA systems, numa=fake=32 was used on my small 4G 
machine for 32 system nodes.  A 4G file was created from /dev/zero and a 
non-iterative version of my aforementioned test program (see the end of 
this message) was used to mmap(), dirty, and msync().  This was done with 
Linus' latest -git both with and without this patchset.

Although only 32 nodes were online, these kernels both had a 
CONFIG_NODES_SHIFT of 8 to use the patchset's slowpath (the kmalloc() for 
a struct address_space's dirty_nodes) since MAX_NUMNODES > BITS_PER_LONG.

Without this patchset (five iterations):

	real	2m43.824s   2m41.842s   2m44.103s   2m42.176s   2m43.692s
	user	0m18.946s   0m18.875s   0m18.747s   0m18.969s   0m19.091s
	sys	0m7.722s    0m7.817s    0m7.618s    0m7.635s    0m7.450s

	Device:        tps    MB_read/s    MB_wrtn/s    MB_read    MB_wrtn
	sda         376.68        18.60        17.90       4269       4108
	sda         367.37        18.13        17.45       4269       4108
	sda         388.59        19.19        18.46       4269       4107
	sda         399.44        19.73        18.98       4269       4106
	sda         407.15        20.08        19.33       4271       4110

With this patchset (five iterations):

	real	2m46.337s   2m44.321s   2m46.406s   2m43.237s   2m47.165s
	user	0m19.014s   0m18.985s   0m19.146s   0m18.778s   0m18.937s
	sys	0m7.008s    0m7.180s    0m7.067s    0m7.116s    0m7.188s

	Device:        tps    MB_read/s    MB_wrtn/s    MB_read    MB_wrtn
	sda         399.10        19.71        18.97       4269       4109
	sda         396.85        19.55        18.78       4272       4111
	sda         404.72        19.96        19.23       4270       4112
	sda         403.51        19.93        19.18       4269       4108
	sda         396.33        19.54        18.80       4276       4114


Do we need a development freeze of the writeback path for features that 
would be targeted to 2.6.29 at the earliest?

Nasty data integrity problems seem like something that would be addressed 
during the -rc stage.

		David
---
#include <stdlib.h>
#include <stdio.h>
#include <sys/mman.h>
#include <fcntl.h>

int main(int argc, char **argv)
{
	void *addr;
	unsigned long length;
	unsigned long i;
	int fd;

	if (argc != 3) {
		fprintf(stderr, "usage: %s <filename> <length>\n",
			argv[0]);
		exit(1);
	}

	fd = open(argv[1], O_RDWR, 0644);
	if (fd < 0) {
		fprintf(stderr, "Cannot open file %s\n", argv[1]);
		exit(1);
	}

	length = strtoul(argv[2], NULL, 0);
	if (!length) {
		fprintf(stderr, "Invalid length %s\n", argv[2]);
		exit(1);
	}

	addr = mmap(0, length, PROT_READ | PROT_WRITE, MAP_SHARED, fd,
		    0);
	if (addr == MAP_FAILED) {
		fprintf(stderr, "mmap() failed\n");
		exit(1);
	}

	for (i = 0; i < length; i++)
		(*(char *)(addr + i))++;
	msync(addr, length, MS_SYNC);
	return 0;
}
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[patch 0/7] cpuset writeback throttling, David Rientjes, (Thu Oct 30, 12:23 pm)
[patch 1/7] cpusets: add dirty map to struct address_space, David Rientjes, (Thu Oct 30, 12:23 pm)
[patch 3/7] mm: make page writeback obey cpuset constraints, David Rientjes, (Thu Oct 30, 12:23 pm)
[patch 4/7] mm: cpuset aware reclaim writeout, David Rientjes, (Thu Oct 30, 12:23 pm)
[patch 5/7] mm: throttle writeout with cpuset awareness, David Rientjes, (Thu Oct 30, 12:23 pm)
[patch 6/7] cpusets: per cpuset dirty ratios, David Rientjes, (Thu Oct 30, 12:23 pm)
Re: [patch 0/7] cpuset writeback throttling, Dave Chinner, (Thu Oct 30, 2:08 pm)
Re: [patch 0/7] cpuset writeback throttling, Christoph Lameter, (Thu Oct 30, 2:33 pm)
Re: [patch 0/7] cpuset writeback throttling, Dave Chinner, (Thu Oct 30, 3:03 pm)
Re: [patch 0/7] cpuset writeback throttling, Christoph Lameter, (Fri Oct 31, 6:47 am)
Re: [patch 0/7] cpuset writeback throttling, David Rientjes, (Fri Oct 31, 9:36 am)
Re: [patch 0/7] cpuset writeback throttling, Andrew Morton, (Tue Nov 4, 1:47 pm)
Re: [patch 0/7] cpuset writeback throttling, Peter Zijlstra, (Tue Nov 4, 1:53 pm)
Re: [patch 0/7] cpuset writeback throttling, Christoph Lameter, (Tue Nov 4, 1:58 pm)
Re: [patch 0/7] cpuset writeback throttling, David Rientjes, (Tue Nov 4, 2:10 pm)
Re: [patch 0/7] cpuset writeback throttling, Andrew Morton, (Tue Nov 4, 2:16 pm)
Re: [patch 0/7] cpuset writeback throttling, Peter Zijlstra, (Tue Nov 4, 2:21 pm)
Re: [patch 0/7] cpuset writeback throttling, Andrew Morton, (Tue Nov 4, 2:50 pm)
Re: [patch 0/7] cpuset writeback throttling, Christoph Lameter, (Tue Nov 4, 3:17 pm)
Re: [patch 0/7] cpuset writeback throttling, Andrew Morton, (Tue Nov 4, 3:35 pm)
Re: [patch 0/7] cpuset writeback throttling, Christoph Lameter, (Tue Nov 4, 3:52 pm)
Re: [patch 0/7] cpuset writeback throttling, Andrew Morton, (Tue Nov 4, 4:36 pm)
Re: [patch 0/7] cpuset writeback throttling, KAMEZAWA Hiroyuki, (Tue Nov 4, 6:31 pm)
Re: [patch 0/7] cpuset writeback throttling, Christoph Lameter, (Tue Nov 4, 7:45 pm)
Re: [patch 0/7] cpuset writeback throttling, Andrew Morton, (Tue Nov 4, 8:05 pm)
Re: [patch 0/7] cpuset writeback throttling, Andrew Morton, (Tue Nov 4, 8:09 pm)
Re: [patch 0/7] cpuset writeback throttling, KAMEZAWA Hiroyuki, (Tue Nov 4, 9:31 pm)
Re: [patch 0/7] cpuset writeback throttling, Christoph Lameter, (Wed Nov 5, 6:52 am)
Re: [patch 0/7] cpuset writeback throttling, Andrew Morton, (Wed Nov 5, 11:41 am)
Re: [patch 0/7] cpuset writeback throttling, Christoph Lameter, (Wed Nov 5, 1:21 pm)
Re: [patch 0/7] cpuset writeback throttling, Andrew Morton, (Wed Nov 5, 1:31 pm)
Re: [patch 0/7] cpuset writeback throttling, Christoph Lameter, (Wed Nov 5, 1:40 pm)
Re: [patch 0/7] cpuset writeback throttling, Andrew Morton, (Wed Nov 5, 1:56 pm)
Re: [patch 0/7] cpuset writeback throttling, Christoph Lameter, (Wed Nov 5, 2:28 pm)
Re: [patch 0/7] cpuset writeback throttling, Paul Menage, (Wed Nov 5, 2:55 pm)
Re: [patch 0/7] cpuset writeback throttling, David Rientjes, (Wed Nov 5, 3:04 pm)
Re: [patch 0/7] cpuset writeback throttling, KAMEZAWA Hiroyuki, (Wed Nov 5, 6:34 pm)
Re: [patch 0/7] cpuset writeback throttling, David Rientjes, (Thu Nov 6, 1:35 pm)
Re: [patch 0/7] cpuset writeback throttling, Andrea Righi, (Mon Nov 10, 2:02 am)
Re: [patch 0/7] cpuset writeback throttling, David Rientjes, (Mon Nov 10, 3:02 am)