linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/14] Zoned VM counters V2
@ 2006-06-08 23:02 Christoph Lameter
  2006-06-08 23:02 ` [PATCH 01/14] Per zone counter functionality Christoph Lameter
                   ` (13 more replies)
  0 siblings, 14 replies; 32+ messages in thread
From: Christoph Lameter @ 2006-06-08 23:02 UTC (permalink / raw)
  To: linux-kernel
  Cc: akpm, Hugh Dickins, Nick Piggin, linux-mm, Andi Kleen,
	Marcelo Tosatti, Christoph Lameter

Zone based VM statistics are necessary to be able to determine what the state
of memory in one zone is. In a NUMA system this can be helpful for local
reclaim and other memory optimizations that may be able to shift VM load
in order to get more balanced memory use.

It is also helpful to know how the computing load affects the memory
allocations on various zones.

The patchset introduces a framework for counters that is a cross between the
existing page_stats --which are simply global counters split per cpu-- and
the approach of deferred incremental updates implemented for nr_pagecache.

Small per cpu 8 bit counters are added to struct zone. If the counter
exceeds certain thresholds then the counters are accumulated in an array of
atomic_long in the zone and in a global array that sums up all
zone values.

Access to VM counter information for a zone and for the whole machine
is then possible by simply indexing an array (Thanks to Nick Piggin for
pointing out that approach). The access to the total number of pages of
various types does no longer require the summing up of all per cpu counters.

Benefits of this patchset right now:

- zone_reclaim_interval vanishes since VM stats can now determine
  when it is worth to scan for reclaimable pages.

- loops over all processors are avoided in writeback and
  reclaim paths.

- Get rid of the nr_pagecache atomic for the single processor case
  (Marcelo's idea).

- Accurate counters in /sys/devices/system/node/node*/meminfo. Current
  counters are based on where the pages were allocated so the counters
  were not useful to show the actual use of pages on a node.

- Detailed VM counters available in more /proc and /sys status files.

References to earlier discussions:
V1 http://marc.theaimsgroup.com/?l=linux-kernel&m=113511649910826&w=2
Earlier approaches:  http://marc.theaimsgroup.com/?l=linux-kernel&m=113460596414687&w=2

Performance test with AIM7 did not show any regressions. Seems to be a tad
faster even. Tested on ia64/ NUMA. Builds fine on i386, SMP / UP.

Changelog

V1->V2:

- Cleanup code, resequence and base patches on 2.6.17-rc6-mm1
- Reduce interrupt holdoffs
- Add zone reclaim interval removal patch
- Rename EVENT_COUNTER to VM_EVENT_COUNTERS (also all variables and functions)

The patchset consists of 14 patches. These are:

01/14 Per zone counter infrastructure

Sets up the functionality to handle per zone counters but does not
define any.

02/14 Add zoned counters to /proc/vmstat

Adds the display of zoned counters

03/14 Conversion of nr_mapped to a per zone counter

Converts nr_mapped and sets up the first per zone counters. This allows
optimizations in various places that avoid looping over counters from all
processors.

04/14 Conversion of nr_pagecache to a per zone counter

Replace the single atomic variable with a per cpu counter. For UP this means
that no atomic operations have to be used for nr_pagecache anymore. Remove
special nr_pagecache code.

05/14 Use zoned counters instead of zone_reclaim_interval

Replace the zone_reclaim_interval logic with a check for
unmapped pages.

06/14 Extend proc per node, per zone stats by adding per zone counters

Adds new counters to various places where we display counters.

07/14 Conversion of nr_slab to a per zone counter

This avoids looping over processors in the reclaim code and allows accurate
accounting of slab use per zone.

08/14 Conversion of nr_pagetable to a per zone counter

Allows accurate accounting of pagetable pages per zone.

09/14 Conversion of nr_dirty to a per zone counter

Avoids loop over processors in writeback state determination

10/14 Conversion of nr_writeback to a per zone counter

Avoids loop over processors in writeback state determination.

11/14 Conversio of nr_unstable to a per zone counter

Avoids loop over proessors in writeback state determination.

12/14 Remove get_page_state functions

There is no need anymoore for the get_page_state function. So remove it.

13/14 Convert nr_bounce to a per zone counter

nr_bounce also counts a type of page.

14/14 Remove writeback structures

There is really no need anymore to cache writeback information since
the counters are readily available. Remove the writeback information
structure.

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

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

end of thread, other threads:[~2006-06-10  4:52 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-08 23:02 [PATCH 00/14] Zoned VM counters V2 Christoph Lameter
2006-06-08 23:02 ` [PATCH 01/14] Per zone counter functionality Christoph Lameter
2006-06-09  4:00   ` Andrew Morton
2006-06-09  4:38     ` Andi Kleen
2006-06-09  9:22     ` Peter Zijlstra
2006-06-09  9:29       ` Andrew Morton
2006-06-09 18:19       ` Horst von Brand
2006-06-09 15:54     ` Christoph Lameter
2006-06-09 17:06       ` Andrew Morton
2006-06-09 17:18         ` Christoph Lameter
2006-06-09 17:38           ` Andrew Morton
2006-06-09  4:28   ` Andi Kleen
2006-06-09 16:00     ` Christoph Lameter
2006-06-08 23:02 ` [PATCH 02/14] Include per zone counters in /proc/vmstat Christoph Lameter
2006-06-08 23:02 ` [PATCH 03/14] Conversion of nr_mapped to per zone counter Christoph Lameter
2006-06-08 23:03 ` [PATCH 04/14] Conversion of nr_pagecache " Christoph Lameter
2006-06-08 23:03 ` [PATCH 04/14] Use per zone counters to remove zone_reclaim_interval Christoph Lameter
2006-06-09  4:00   ` Andrew Morton
2006-06-09 18:54     ` zoned VM stats: Add NR_ANON Christoph Lameter
2006-06-10  4:32       ` KAMEZAWA Hiroyuki
2006-06-10  4:52         ` Christoph Lameter
2006-06-08 23:03 ` [PATCH 06/14] Add per zone counters to zone node and global VM statistics Christoph Lameter
2006-06-09  4:01   ` Andrew Morton
2006-06-09 15:55     ` Christoph Lameter
2006-06-08 23:03 ` [PATCH 07/14] Conversion of nr_slab to per zone counter Christoph Lameter
2006-06-08 23:03 ` [PATCH 08/14] Conversion of nr_pagetable " Christoph Lameter
2006-06-08 23:03 ` [PATCH 09/14] Conversion of nr_dirty " Christoph Lameter
2006-06-08 23:03 ` [PATCH 10/14] Conversion of nr_writeback " Christoph Lameter
2006-06-08 23:03 ` [PATCH 11/14] Conversion of nr_unstable " Christoph Lameter
2006-06-08 23:03 ` [PATCH 12/14] Remove unused get_page_stat functions Christoph Lameter
2006-06-08 23:03 ` [PATCH 13/14] Conversion of nr_bounce to per zone counter Christoph Lameter
2006-06-08 23:03 ` [PATCH 14/14] Remove useless writeback structure Christoph Lameter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox