mm: vmscan: convert lumpy_mode into a bitmask
Currently lumpy_mode is an enum and determines if lumpy reclaim is off, syncronous or asyncronous. In preparation for using compaction instead of lumpy reclaim, this patch converts the flags into a bitmap. Signed-off-by: Mel Gorman <mel@csn.ul.ie> Cc: Andrea Arcangeli <aarcange@redhat.com> Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Cc: Rik van Riel <riel@redhat.com> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Andy Whitcroft <apw@shadowen.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:

committed by
Linus Torvalds

parent
b7aba6984d
commit
ee64fc9354
@@ -25,13 +25,13 @@
|
||||
|
||||
#define trace_reclaim_flags(page, sync) ( \
|
||||
(page_is_file_cache(page) ? RECLAIM_WB_FILE : RECLAIM_WB_ANON) | \
|
||||
(sync == LUMPY_MODE_SYNC ? RECLAIM_WB_SYNC : RECLAIM_WB_ASYNC) \
|
||||
(sync & LUMPY_MODE_SYNC ? RECLAIM_WB_SYNC : RECLAIM_WB_ASYNC) \
|
||||
)
|
||||
|
||||
#define trace_shrink_flags(file, sync) ( \
|
||||
(sync == LUMPY_MODE_SYNC ? RECLAIM_WB_MIXED : \
|
||||
(sync & LUMPY_MODE_SYNC ? RECLAIM_WB_MIXED : \
|
||||
(file ? RECLAIM_WB_FILE : RECLAIM_WB_ANON)) | \
|
||||
(sync == LUMPY_MODE_SYNC ? RECLAIM_WB_SYNC : RECLAIM_WB_ASYNC) \
|
||||
(sync & LUMPY_MODE_SYNC ? RECLAIM_WB_SYNC : RECLAIM_WB_ASYNC) \
|
||||
)
|
||||
|
||||
TRACE_EVENT(mm_vmscan_kswapd_sleep,
|
||||
|
Reference in New Issue
Block a user