aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/compaction.h
diff options
context:
space:
mode:
authorNitin Gupta <nigupta@nvidia.com>2020-08-11 18:31:07 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2020-08-12 10:57:56 -0700
commitd34c0a7599ea8c301bc471dfa1eb2bf2db6752d1 (patch)
tree088c7a1a1d12e342e6be17539f84b74eac3a1e4e /include/linux/compaction.h
parentmm: fix compile error due to COMPACTION_HPAGE_ORDER (diff)
downloadwireguard-linux-d34c0a7599ea8c301bc471dfa1eb2bf2db6752d1.tar.xz
wireguard-linux-d34c0a7599ea8c301bc471dfa1eb2bf2db6752d1.zip
mm: use unsigned types for fragmentation score
Proactive compaction uses per-node/zone "fragmentation score" which is always in range [0, 100], so use unsigned type of these scores as well as for related constants. Signed-off-by: Nitin Gupta <nigupta@nvidia.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Reviewed-by: Baoquan He <bhe@redhat.com> Cc: Luis Chamberlain <mcgrof@kernel.org> Cc: Kees Cook <keescook@chromium.org> Cc: Iurii Zaikin <yzaikin@google.com> Cc: Vlastimil Babka <vbabka@suse.cz> Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com> Link: http://lkml.kernel.org/r/20200618010319.13159-1-nigupta@nvidia.com Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/compaction.h')
-rw-r--r--include/linux/compaction.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/compaction.h b/include/linux/compaction.h
index 7a242d46454e..25a521d299c1 100644
--- a/include/linux/compaction.h
+++ b/include/linux/compaction.h
@@ -85,13 +85,13 @@ static inline unsigned long compact_gap(unsigned int order)
#ifdef CONFIG_COMPACTION
extern int sysctl_compact_memory;
-extern int sysctl_compaction_proactiveness;
+extern unsigned int sysctl_compaction_proactiveness;
extern int sysctl_compaction_handler(struct ctl_table *table, int write,
void *buffer, size_t *length, loff_t *ppos);
extern int sysctl_extfrag_threshold;
extern int sysctl_compact_unevictable_allowed;
-extern int extfrag_for_order(struct zone *zone, unsigned int order);
+extern unsigned int extfrag_for_order(struct zone *zone, unsigned int order);
extern int fragmentation_index(struct zone *zone, unsigned int order);
extern enum compact_result try_to_compact_pages(gfp_t gfp_mask,
unsigned int order, unsigned int alloc_flags,