diff options
author | Yu Zhao <yuzhao@google.com> | 2018-02-01 03:19:59 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-02-01 04:18:39 +0300 |
commit | 9c3760eb80880f3e02546e0a2ef479e1454986b3 (patch) | |
tree | e0f90aca53a602676bf50160ad1efbe0ac66a352 /arch/score/boot | |
parent | a7ab400d6fe73d0119fdc234e9982a6f80faea9f (diff) | |
download | linux-9c3760eb80880f3e02546e0a2ef479e1454986b3.tar.xz |
zswap: only save zswap header when necessary
We waste sizeof(swp_entry_t) for zswap header when using zsmalloc as
zpool driver because zsmalloc doesn't support eviction.
Add zpool_evictable() to detect if zpool is potentially evictable, and
use it in zswap to avoid waste memory for zswap header.
[yuzhao@google.com: The zpool->" prefix is a result of copy & paste]
Link: http://lkml.kernel.org/r/20180110225626.110330-1-yuzhao@google.com
Link: http://lkml.kernel.org/r/20180110224741.83751-1-yuzhao@google.com
Signed-off-by: Yu Zhao <yuzhao@google.com>
Acked-by: Dan Streetman <ddstreet@ieee.org>
Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Cc: Seth Jennings <sjenning@redhat.com>
Cc: Minchan Kim <minchan@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/score/boot')
0 files changed, 0 insertions, 0 deletions