Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1363413 > unrolled thread

[PATCH v2 5/6] tile: mm: Use hugetlb_bad_size

Started byVaishali Thakkar <vaishali.thakkar@oracle.com>
First post2016-03-23 14:00 +0100
Last post2016-03-23 17:20 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH v2 5/6] tile: mm: Use hugetlb_bad_size Vaishali Thakkar <vaishali.thakkar@oracle.com> - 2016-03-23 14:00 +0100
    Re: [PATCH v2 5/6] tile: mm: Use hugetlb_bad_size Chris Metcalf <cmetcalf@mellanox.com> - 2016-03-23 17:20 +0100

#1363413 — [PATCH v2 5/6] tile: mm: Use hugetlb_bad_size

FromVaishali Thakkar <vaishali.thakkar@oracle.com>
Date2016-03-23 14:00 +0100
Subject[PATCH v2 5/6] tile: mm: Use hugetlb_bad_size
Message-ID<rfQyf-3tm-29@gated-at.bofh.it>
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

[toc] | [next] | [standalone]


#1363517

FromChris Metcalf <cmetcalf@mellanox.com>
Date2016-03-23 17:20 +0100
Message-ID<rfTFM-60M-9@gated-at.bofh.it>
In reply to#1363413
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

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web