diff options
author | Chunwei Chen <[email protected]> | 2016-10-26 00:32:23 -0400 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2016-11-29 14:34:33 -0800 |
commit | 982957483450d53683681f456d1c84cfeb56afad (patch) | |
tree | 6efbe72e9a2b57474e855dae9d74377443bc9f27 /include | |
parent | 4f60152910c6bbc1c7975409f852af7ef11c7007 (diff) |
ABD optimized page allocation code
* Convert ABD to use the Linux Kernel scatterlist implementation
instead of the hand rolled one from illumos.
* Scatter ABDs are preferentially populated with higher order
compound pages from a single zone. Allocation size is
progressively decreased until it can be satisfied without
performing reclaim or compaction.
* An alternate page allocator is provided for kernels older
than 3.6 and for CONFIG_HIGHMEM systems. This allocator
is designed as a fallback for maximum compatibility.
* Extended abdstats to provide visibility in the the allocator.
* Add cached value for PAGESIZE in userspace.
Contributions-by:
Chunwei Chen <[email protected]>
Gvozden Neskovic <[email protected]>
Jinshan Xiong <[email protected]>
Isaac Huang <[email protected]>
David Quigley <[email protected]>
Brian Behlendorf <[email protected]>
Diffstat (limited to 'include')
-rw-r--r-- | include/sys/abd.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/include/sys/abd.h b/include/sys/abd.h index 321c64713..d2db7e199 100644 --- a/include/sys/abd.h +++ b/include/sys/abd.h @@ -43,7 +43,9 @@ extern "C" { typedef enum abd_flags { ABD_FLAG_LINEAR = 1 << 0, /* is buffer linear (or scattered)? */ ABD_FLAG_OWNER = 1 << 1, /* does it own its data buffers? */ - ABD_FLAG_META = 1 << 2 /* does this represent FS metadata? */ + ABD_FLAG_META = 1 << 2, /* does this represent FS metadata? */ + ABD_FLAG_MULTI_ZONE = 1 << 3, /* pages split over memory zones */ + ABD_FLAG_MULTI_CHUNK = 1 << 4 /* pages split over multiple chunks */ } abd_flags_t; typedef struct abd { @@ -54,8 +56,8 @@ typedef struct abd { union { struct abd_scatter { uint_t abd_offset; - uint_t abd_chunk_size; - struct page *abd_chunks[]; + uint_t abd_nents; + struct scatterlist *abd_sgl; } abd_scatter; struct abd_linear { void *abd_buf; |