mm: remove noisy remainder of the scan_unevictable interface
The deprecation warnings for the scan_unevictable interface triggers by
scripts doing `sysctl -a | grep something else'. This is annoying and not
helpful.
The interface has been defunct since 264e56d824
("mm: disable user
interface to manually rescue unevictable pages"), which was in 2011, and
there haven't been any reports of usecases for it, only reports that the
deprecation warnings are annying. It's unlikely that anybody is using
this interface specifically at this point, so remove it.
Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
f606b77f1a
commit
1f13ae399c
@ -85,14 +85,6 @@ Description:
|
|||||||
will be compacted. When it completes, memory will be freed
|
will be compacted. When it completes, memory will be freed
|
||||||
into blocks which have as many contiguous pages as possible
|
into blocks which have as many contiguous pages as possible
|
||||||
|
|
||||||
What: /sys/devices/system/node/nodeX/scan_unevictable_pages
|
|
||||||
Date: October 2008
|
|
||||||
Contact: Lee Schermerhorn <lee.schermerhorn@hp.com>
|
|
||||||
Description:
|
|
||||||
When set, it triggers scanning the node's unevictable lists
|
|
||||||
and move any pages that have become evictable onto the respective
|
|
||||||
zone's inactive list. See mm/vmscan.c
|
|
||||||
|
|
||||||
What: /sys/devices/system/node/nodeX/hugepages/hugepages-<size>/
|
What: /sys/devices/system/node/nodeX/hugepages/hugepages-<size>/
|
||||||
Date: December 2009
|
Date: December 2009
|
||||||
Contact: Lee Schermerhorn <lee.schermerhorn@hp.com>
|
Contact: Lee Schermerhorn <lee.schermerhorn@hp.com>
|
||||||
|
@ -289,8 +289,6 @@ static int register_node(struct node *node, int num, struct node *parent)
|
|||||||
device_create_file(&node->dev, &dev_attr_distance);
|
device_create_file(&node->dev, &dev_attr_distance);
|
||||||
device_create_file(&node->dev, &dev_attr_vmstat);
|
device_create_file(&node->dev, &dev_attr_vmstat);
|
||||||
|
|
||||||
scan_unevictable_register_node(node);
|
|
||||||
|
|
||||||
hugetlb_register_node(node);
|
hugetlb_register_node(node);
|
||||||
|
|
||||||
compaction_register_node(node);
|
compaction_register_node(node);
|
||||||
@ -314,7 +312,6 @@ void unregister_node(struct node *node)
|
|||||||
device_remove_file(&node->dev, &dev_attr_distance);
|
device_remove_file(&node->dev, &dev_attr_distance);
|
||||||
device_remove_file(&node->dev, &dev_attr_vmstat);
|
device_remove_file(&node->dev, &dev_attr_vmstat);
|
||||||
|
|
||||||
scan_unevictable_unregister_node(node);
|
|
||||||
hugetlb_unregister_node(node); /* no-op, if memoryless node */
|
hugetlb_unregister_node(node); /* no-op, if memoryless node */
|
||||||
|
|
||||||
device_unregister(&node->dev);
|
device_unregister(&node->dev);
|
||||||
|
@ -354,22 +354,6 @@ static inline int zone_reclaim(struct zone *z, gfp_t mask, unsigned int order)
|
|||||||
extern int page_evictable(struct page *page);
|
extern int page_evictable(struct page *page);
|
||||||
extern void check_move_unevictable_pages(struct page **, int nr_pages);
|
extern void check_move_unevictable_pages(struct page **, int nr_pages);
|
||||||
|
|
||||||
extern unsigned long scan_unevictable_pages;
|
|
||||||
extern int scan_unevictable_handler(struct ctl_table *, int,
|
|
||||||
void __user *, size_t *, loff_t *);
|
|
||||||
#ifdef CONFIG_NUMA
|
|
||||||
extern int scan_unevictable_register_node(struct node *node);
|
|
||||||
extern void scan_unevictable_unregister_node(struct node *node);
|
|
||||||
#else
|
|
||||||
static inline int scan_unevictable_register_node(struct node *node)
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
static inline void scan_unevictable_unregister_node(struct node *node)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
extern int kswapd_run(int nid);
|
extern int kswapd_run(int nid);
|
||||||
extern void kswapd_stop(int nid);
|
extern void kswapd_stop(int nid);
|
||||||
#ifdef CONFIG_MEMCG
|
#ifdef CONFIG_MEMCG
|
||||||
|
@ -1460,13 +1460,6 @@ static struct ctl_table vm_table[] = {
|
|||||||
.extra2 = &one,
|
.extra2 = &one,
|
||||||
},
|
},
|
||||||
#endif
|
#endif
|
||||||
{
|
|
||||||
.procname = "scan_unevictable_pages",
|
|
||||||
.data = &scan_unevictable_pages,
|
|
||||||
.maxlen = sizeof(scan_unevictable_pages),
|
|
||||||
.mode = 0644,
|
|
||||||
.proc_handler = scan_unevictable_handler,
|
|
||||||
},
|
|
||||||
#ifdef CONFIG_MEMORY_FAILURE
|
#ifdef CONFIG_MEMORY_FAILURE
|
||||||
{
|
{
|
||||||
.procname = "memory_failure_early_kill",
|
.procname = "memory_failure_early_kill",
|
||||||
|
63
mm/vmscan.c
63
mm/vmscan.c
@ -3797,66 +3797,3 @@ void check_move_unevictable_pages(struct page **pages, int nr_pages)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_SHMEM */
|
#endif /* CONFIG_SHMEM */
|
||||||
|
|
||||||
static void warn_scan_unevictable_pages(void)
|
|
||||||
{
|
|
||||||
printk_once(KERN_WARNING
|
|
||||||
"%s: The scan_unevictable_pages sysctl/node-interface has been "
|
|
||||||
"disabled for lack of a legitimate use case. If you have "
|
|
||||||
"one, please send an email to linux-mm@kvack.org.\n",
|
|
||||||
current->comm);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* scan_unevictable_pages [vm] sysctl handler. On demand re-scan of
|
|
||||||
* all nodes' unevictable lists for evictable pages
|
|
||||||
*/
|
|
||||||
unsigned long scan_unevictable_pages;
|
|
||||||
|
|
||||||
int scan_unevictable_handler(struct ctl_table *table, int write,
|
|
||||||
void __user *buffer,
|
|
||||||
size_t *length, loff_t *ppos)
|
|
||||||
{
|
|
||||||
warn_scan_unevictable_pages();
|
|
||||||
proc_doulongvec_minmax(table, write, buffer, length, ppos);
|
|
||||||
scan_unevictable_pages = 0;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef CONFIG_NUMA
|
|
||||||
/*
|
|
||||||
* per node 'scan_unevictable_pages' attribute. On demand re-scan of
|
|
||||||
* a specified node's per zone unevictable lists for evictable pages.
|
|
||||||
*/
|
|
||||||
|
|
||||||
static ssize_t read_scan_unevictable_node(struct device *dev,
|
|
||||||
struct device_attribute *attr,
|
|
||||||
char *buf)
|
|
||||||
{
|
|
||||||
warn_scan_unevictable_pages();
|
|
||||||
return sprintf(buf, "0\n"); /* always zero; should fit... */
|
|
||||||
}
|
|
||||||
|
|
||||||
static ssize_t write_scan_unevictable_node(struct device *dev,
|
|
||||||
struct device_attribute *attr,
|
|
||||||
const char *buf, size_t count)
|
|
||||||
{
|
|
||||||
warn_scan_unevictable_pages();
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static DEVICE_ATTR(scan_unevictable_pages, S_IRUGO | S_IWUSR,
|
|
||||||
read_scan_unevictable_node,
|
|
||||||
write_scan_unevictable_node);
|
|
||||||
|
|
||||||
int scan_unevictable_register_node(struct node *node)
|
|
||||||
{
|
|
||||||
return device_create_file(&node->dev, &dev_attr_scan_unevictable_pages);
|
|
||||||
}
|
|
||||||
|
|
||||||
void scan_unevictable_unregister_node(struct node *node)
|
|
||||||
{
|
|
||||||
device_remove_file(&node->dev, &dev_attr_scan_unevictable_pages);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
Loading…
Reference in New Issue
Block a user