diff options
-rw-r--r-- | include/linux/hugetlb.h | 1 | ||||
-rw-r--r-- | kernel/sysctl.c | 2 | ||||
-rw-r--r-- | mm/hugetlb.c | 10 |
3 files changed, 12 insertions, 1 deletions
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index 30d606afcafe..7ca198b379af 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h | |||
@@ -17,6 +17,7 @@ static inline int is_vm_hugetlb_page(struct vm_area_struct *vma) | |||
17 | } | 17 | } |
18 | 18 | ||
19 | int hugetlb_sysctl_handler(struct ctl_table *, int, struct file *, void __user *, size_t *, loff_t *); | 19 | int hugetlb_sysctl_handler(struct ctl_table *, int, struct file *, void __user *, size_t *, loff_t *); |
20 | int hugetlb_overcommit_handler(struct ctl_table *, int, struct file *, void __user *, size_t *, loff_t *); | ||
20 | int hugetlb_treat_movable_handler(struct ctl_table *, int, struct file *, void __user *, size_t *, loff_t *); | 21 | int hugetlb_treat_movable_handler(struct ctl_table *, int, struct file *, void __user *, size_t *, loff_t *); |
21 | int copy_hugetlb_page_range(struct mm_struct *, struct mm_struct *, struct vm_area_struct *); | 22 | int copy_hugetlb_page_range(struct mm_struct *, struct mm_struct *, struct vm_area_struct *); |
22 | int follow_hugetlb_page(struct mm_struct *, struct vm_area_struct *, struct page **, struct vm_area_struct **, unsigned long *, int *, int, int); | 23 | int follow_hugetlb_page(struct mm_struct *, struct vm_area_struct *, struct page **, struct vm_area_struct **, unsigned long *, int *, int, int); |
diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 8c98d8147d88..9dadc9d88a03 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c | |||
@@ -982,7 +982,7 @@ static struct ctl_table vm_table[] = { | |||
982 | .data = &nr_overcommit_huge_pages, | 982 | .data = &nr_overcommit_huge_pages, |
983 | .maxlen = sizeof(nr_overcommit_huge_pages), | 983 | .maxlen = sizeof(nr_overcommit_huge_pages), |
984 | .mode = 0644, | 984 | .mode = 0644, |
985 | .proc_handler = &proc_doulongvec_minmax, | 985 | .proc_handler = &hugetlb_overcommit_handler, |
986 | }, | 986 | }, |
987 | #endif | 987 | #endif |
988 | { | 988 | { |
diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 1a5642074e34..d9a380312467 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c | |||
@@ -605,6 +605,16 @@ int hugetlb_treat_movable_handler(struct ctl_table *table, int write, | |||
605 | return 0; | 605 | return 0; |
606 | } | 606 | } |
607 | 607 | ||
608 | int hugetlb_overcommit_handler(struct ctl_table *table, int write, | ||
609 | struct file *file, void __user *buffer, | ||
610 | size_t *length, loff_t *ppos) | ||
611 | { | ||
612 | spin_lock(&hugetlb_lock); | ||
613 | proc_doulongvec_minmax(table, write, file, buffer, length, ppos); | ||
614 | spin_unlock(&hugetlb_lock); | ||
615 | return 0; | ||
616 | } | ||
617 | |||
608 | #endif /* CONFIG_SYSCTL */ | 618 | #endif /* CONFIG_SYSCTL */ |
609 | 619 | ||
610 | int hugetlb_report_meminfo(char *buf) | 620 | int hugetlb_report_meminfo(char *buf) |