* [PATCH v2 5/6] tile: mm: Use hugetlb_bad_size
@ 2016-03-23 12:37 Vaishali Thakkar
2016-03-23 16:03 ` Chris Metcalf
0 siblings, 1 reply; 2+ messages in thread
From: Vaishali Thakkar @ 2016-03-23 12:37 UTC (permalink / raw)
To: akpm
Cc: cmetcalf, linux-mm, linux-kernel, Vaishali Thakkar, Hillf Danton,
Michal Hocko, Yaowei Bai, Dominik Dingel, Kirill A. Shutemov,
Paul Gortmaker, Dave Hansen
Update the setup_hugepagesz function to call the routine
hugetlb_bad_size when unsupported hugepage size is found.
Signed-off-by: Vaishali Thakkar <vaishali.thakkar@oracle.com>
Reviewed-by: Mike Kravetz <mike.kravetz@oracle.com>
Reviewed-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Cc: Hillf Danton <hillf.zj@alibaba-inc.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Yaowei Bai <baiyaowei@cmss.chinamobile.com>
Cc: Dominik Dingel <dingel@linux.vnet.ibm.com>
Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
---
- Please note that the patch is tested for x86 only. But as this
is one line change I just changed them. So, it would be good if
the patch can be tested for other architectures before adding
this in to mainline.
Changes since v1:
- Separate different arch specific changes in different
patches instead of one
---
arch/tile/mm/hugetlbpage.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/arch/tile/mm/hugetlbpage.c b/arch/tile/mm/hugetlbpage.c
index e212c64..77ceaa3 100644
--- a/arch/tile/mm/hugetlbpage.c
+++ b/arch/tile/mm/hugetlbpage.c
@@ -308,11 +308,16 @@ static bool saw_hugepagesz;
static __init int setup_hugepagesz(char *opt)
{
+ int rc;
+
if (!saw_hugepagesz) {
saw_hugepagesz = true;
memset(huge_shift, 0, sizeof(huge_shift));
}
- return __setup_hugepagesz(memparse(opt, NULL));
+ rc = __setup_hugepagesz(memparse(opt, NULL));
+ if (rc)
+ hugetlb_bad_size();
+ return rc;
}
__setup("hugepagesz=", setup_hugepagesz);
--
2.1.4
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2 5/6] tile: mm: Use hugetlb_bad_size
2016-03-23 12:37 [PATCH v2 5/6] tile: mm: Use hugetlb_bad_size Vaishali Thakkar
@ 2016-03-23 16:03 ` Chris Metcalf
0 siblings, 0 replies; 2+ messages in thread
From: Chris Metcalf @ 2016-03-23 16:03 UTC (permalink / raw)
To: Vaishali Thakkar, akpm
Cc: linux-mm, linux-kernel, Hillf Danton, Michal Hocko, Yaowei Bai,
Dominik Dingel, Kirill A. Shutemov, Paul Gortmaker, Dave Hansen
On 3/23/2016 8:37 AM, Vaishali Thakkar wrote:
> Update the setup_hugepagesz function to call the routine
> hugetlb_bad_size when unsupported hugepage size is found.
>
> Signed-off-by: Vaishali Thakkar<vaishali.thakkar@oracle.com>
> Reviewed-by: Mike Kravetz<mike.kravetz@oracle.com>
> Reviewed-by: Naoya Horiguchi<n-horiguchi@ah.jp.nec.com>
> Cc: Hillf Danton<hillf.zj@alibaba-inc.com>
> Cc: Michal Hocko<mhocko@suse.com>
> Cc: Yaowei Bai<baiyaowei@cmss.chinamobile.com>
> Cc: Dominik Dingel<dingel@linux.vnet.ibm.com>
> Cc: Kirill A. Shutemov<kirill.shutemov@linux.intel.com>
> Cc: Paul Gortmaker<paul.gortmaker@windriver.com>
> Cc: Dave Hansen<dave.hansen@linux.intel.com>
Acked-by: Chris Metcalf <cmetcalf@mellanox.com>
--
Chris Metcalf, Mellanox Technologies
http://www.mellanox.com
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-03-23 16:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-23 12:37 [PATCH v2 5/6] tile: mm: Use hugetlb_bad_size Vaishali Thakkar
2016-03-23 16:03 ` Chris Metcalf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).