hugetlb: remove sysctl zero and infinity values
Subsystems (3)
PATCH 1/1 hugetlb: remove sysctl zero and infinity values
These appear pretty redundant to me. The sysctl helper that is used only deals with unsigned longs, so it doesn't make much sense to try to deal with values less than zero here. It is equally strange to try to impose a maximum of ~0UL.
There's also something a little bit fishy with putting max_huge_pages in the sysctl table _and_ setting it manually in the handler function. But, I'll leave that for another day.
---
work-dave/include/linux/hugetlb.h | 1 - work-dave/kernel/sysctl.c | 2 -- work-dave/mm/hugetlb.c | 1 - 3 files changed, 4 deletions(-)
kernel/sysctl.c renamed from kernel/sysctl.c~hugetlb-sysctl-remove-zero-infinity +0 -2
@@ -755,8 +755,6 @@ static ctl_table vm_table[] = { .maxlen = sizeof(unsigned long), .mode = 0644, .proc_handler = &hugetlb_sysctl_handler, - .extra1 = (void *)&hugetlb_zero, - .extra2 = (void *)&hugetlb_infinity, }, { .ctl_name = VM_HUGETLB_GROUP,
mm/hugetlb.c renamed from mm/hugetlb.c~hugetlb-sysctl-remove-zero-infinity +0 -1
@@ -19,7 +19,6 @@#include <linux/hugetlb.h> -const unsigned long hugetlb_zero =0 , hugetlb_infinity = ~0UL ;static unsigned long nr_huge_pages, free_huge_pages;unsigned long max_huge_pages;static struct list_head hugepage_freelists[MAX_NUMNODES ];
include/linux/hugetlb.h renamed from include/linux/hugetlb.h~hugetlb-sysctl-remove-zero-infinity +0 -1
@@ -28,7 +28,6 @@ int hugetlb_fault(struct mm_struct *mm, unsigned long address, int write_access);extern unsigned long max_huge_pages; -extern const unsigned long hugetlb_zero, hugetlb_infinity;extern int sysctl_hugetlb_shm_group;/* arch callbacks */
_
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Dave Hansen wrote on Monday, March 06, 2006 2:50 PM
Quoted 3 lines
There's also something a little bit fishy with putting
max_huge_pagesin the sysctl table _and_ setting it manually in the handler function. But, I'll leave that for another day.
max_huge_pages looks OK, maybe it has a bad name. Because that is a variable used to pass desired hugetlb pool size by sys admin. It is used only in the reservation path. Kernel pretty much needs at least two variables: what is the desired target and what is current reservation state (that tracked by nr_huge_pages).
- Ken
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>