lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Tue,  3 Aug 2010 09:46:11 +0900 (JST)
From:	KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>
To:	Thadeu Lima de Souza Cascardo <cascardo@...oscopio.com>
Cc:	kosaki.motohiro@...fujitsu.com,
	Lee Schermerhorn <lee.schermerhorn@...com>,
	linux-kernel@...r.kernel.org, linux-mm@...ck.org
Subject: Re: [PATCH] mm: only build per-node scan_unevictable when NUMA is enabled

> Non-NUMA systems do never create these files anyway, since they are only
> created by driver subsystem when NUMA is configured.
> 
> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@...oscopio.com>

This patch look good to me.
	Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>


However, I'm not sure scan_unevictable feature have enough worth that
we continue to maintain. This feature mean "admins can restore unevictable
even if kernel have some bug". but I haven't seen such situation.

Anyway, I'm waiting Lee's response.


> ---
>  include/linux/swap.h |    5 +++++
>  mm/vmscan.c          |    3 ++-
>  2 files changed, 7 insertions(+), 1 deletions(-)
> 
> diff --git a/include/linux/swap.h b/include/linux/swap.h
> index ff4acea..3c0876d 100644
> --- a/include/linux/swap.h
> +++ b/include/linux/swap.h
> @@ -271,8 +271,13 @@ extern void scan_mapping_unevictable_pages(struct address_space *);
>  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);
> diff --git a/mm/vmscan.c b/mm/vmscan.c
> index b94fe1b..ba8f6fd 100644
> --- a/mm/vmscan.c
> +++ b/mm/vmscan.c
> @@ -2898,6 +2898,7 @@ int scan_unevictable_handler(struct ctl_table *table, int write,
>  	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.
> @@ -2944,4 +2945,4 @@ void scan_unevictable_unregister_node(struct node *node)
>  {
>  	sysdev_remove_file(&node->sysdev, &attr_scan_unevictable_pages);
>  }
> -
> +#endif
> -- 
> 1.7.1
> 
> --
> To unsubscribe, send a message with 'unsubscribe linux-mm' in
> the body to majordomo@...ck.org.  For more info on Linux MM,
> see: http://www.linux-mm.org/ .
> Don't email: <a href=mailto:"dont@...ck.org"> email@...ck.org </a>



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ