mm/compaction: remove unused variable sysctl_compact_memory
The sysctl_compact_memory is mostly unused in mm/compaction.c It just acts as a place holder for sysctl to store .data. But the .data itself is not needed here. So we can get ride of this variable completely and make .data as NULL. This will also eliminate the extern declaration from header file. No functionality is broken or changed this way. Link: https://lkml.kernel.org/r/1614852224-14671-1-git-send-email-pintu@codeaurora.org Signed-off-by: Pintu Kumar <pintu@codeaurora.org> Signed-off-by: Pintu Agarwal <pintu.ping@gmail.com> Reviewed-by: Vlastimil Babka <vbabka@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Родитель
18bb473e50
Коммит
ef49843841
|
@ -81,7 +81,6 @@ static inline unsigned long compact_gap(unsigned int order)
|
|||
}
|
||||
|
||||
#ifdef CONFIG_COMPACTION
|
||||
extern int sysctl_compact_memory;
|
||||
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);
|
||||
|
|
|
@ -2830,7 +2830,7 @@ static struct ctl_table vm_table[] = {
|
|||
#ifdef CONFIG_COMPACTION
|
||||
{
|
||||
.procname = "compact_memory",
|
||||
.data = &sysctl_compact_memory,
|
||||
.data = NULL,
|
||||
.maxlen = sizeof(int),
|
||||
.mode = 0200,
|
||||
.proc_handler = sysctl_compaction_handler,
|
||||
|
|
|
@ -2692,9 +2692,6 @@ static void compact_nodes(void)
|
|||
compact_node(nid);
|
||||
}
|
||||
|
||||
/* The written value is actually unused, all memory is compacted */
|
||||
int sysctl_compact_memory;
|
||||
|
||||
/*
|
||||
* Tunable for proactive compaction. It determines how
|
||||
* aggressively the kernel should compact memory in the
|
||||
|
|
Загрузка…
Ссылка в новой задаче