OSDN Git Service

mm: remove noisy remainder of the scan_unevictable interface
authorJohannes Weiner <hannes@cmpxchg.org>
Thu, 9 Oct 2014 22:27:39 +0000 (15:27 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 10 Oct 2014 02:25:55 +0000 (22:25 -0400)
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 264e56d8247e ("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>
Documentation/ABI/stable/sysfs-devices-node
drivers/base/node.c
include/linux/swap.h
kernel/sysctl.c
mm/vmscan.c

index ce259c1..5b2d0f0 100644 (file)
@@ -85,14 +85,6 @@ Description:
                will be compacted. When it completes, memory will be freed
                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>/
 Date:          December 2009
 Contact:       Lee Schermerhorn <lee.schermerhorn@hp.com>
index d51c49c..472168c 100644 (file)
@@ -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_vmstat);
 
-               scan_unevictable_register_node(node);
-
                hugetlb_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_vmstat);
 
-       scan_unevictable_unregister_node(node);
        hugetlb_unregister_node(node);          /* no-op, if memoryless node */
 
        device_unregister(&node->dev);
index 1b72060..ea4f926 100644 (file)
@@ -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 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 void kswapd_stop(int nid);
 #ifdef CONFIG_MEMCG
index 75875a7..9118098 100644 (file)
@@ -1460,13 +1460,6 @@ static struct ctl_table vm_table[] = {
                .extra2         = &one,
        },
 #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
        {
                .procname       = "memory_failure_early_kill",
index 1a71b8b..af72fe8 100644 (file)
@@ -3797,66 +3797,3 @@ void check_move_unevictable_pages(struct page **pages, int nr_pages)
        }
 }
 #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