diff options
author | Seth Jennings <[email protected]> | 2013-07-10 16:04:55 -0700 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2013-07-10 18:11:34 -0700 |
commit | 4e2e2770b1529edc5849c86b29a6febe27e2f083 (patch) | |
tree | 0f74fa76b95f3e61c25d07af31ff110eacb9e777 /tools/perf/scripts/python | |
parent | bfffbea1aaeeb1eb6500c83ff9653416daa5b490 (diff) |
zbud: add to mm/
zbud is an special purpose allocator for storing compressed pages. It
is designed to store up to two compressed pages per physical page.
While this design limits storage density, it has simple and
deterministic reclaim properties that make it preferable to a higher
density approach when reclaim will be used.
zbud works by storing compressed pages, or "zpages", together in pairs
in a single memory page called a "zbud page". The first buddy is "left
justifed" at the beginning of the zbud page, and the last buddy is
"right justified" at the end of the zbud page. The benefit is that if
either buddy is freed, the freed buddy space, coalesced with whatever
slack space that existed between the buddies, results in the largest
possible free region within the zbud page.
zbud also provides an attractive lower bound on density. The ratio of
zpages to zbud pages can not be less than 1. This ensures that zbud can
never "do harm" by using more pages to store zpages than the
uncompressed zpages would have used on their own.
This implementation is a rewrite of the zbud allocator internally used
by zcache in the driver/staging tree. The rewrite was necessary to
remove some of the zcache specific elements that were ingrained
throughout and provide a generic allocation interface that can later be
used by zsmalloc and others.
This patch adds zbud to mm/ for later use by zswap.
Signed-off-by: Seth Jennings <[email protected]>
Acked-by: Rik van Riel <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: Nitin Gupta <[email protected]>
Cc: Minchan Kim <[email protected]>
Cc: Konrad Rzeszutek Wilk <[email protected]>
Cc: Dan Magenheimer <[email protected]>
Cc: Robert Jennings <[email protected]>
Cc: Jenifer Hopper <[email protected]>
Cc: Mel Gorman <[email protected]>
Cc: Johannes Weiner <[email protected]>
Cc: Larry Woodman <[email protected]>
Cc: Benjamin Herrenschmidt <[email protected]>
Cc: Dave Hansen <[email protected]>
Cc: Joe Perches <[email protected]>
Cc: Joonsoo Kim <[email protected]>
Cc: Cody P Schafer <[email protected]>
Cc: Hugh Dickens <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Bob Liu <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions