From patchwork Thu Apr 9 21:58:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Xu X-Patchwork-Id: 11482523 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8FB6192A for ; Thu, 9 Apr 2020 21:58:08 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 519562083E for ; Thu, 9 Apr 2020 21:58:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="KvT2x+nE" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 519562083E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 686038E001E; Thu, 9 Apr 2020 17:58:07 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 635678E0003; Thu, 9 Apr 2020 17:58:07 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 54BAA8E001E; Thu, 9 Apr 2020 17:58:07 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0101.hostedemail.com [216.40.44.101]) by kanga.kvack.org (Postfix) with ESMTP id 493D68E0003 for ; Thu, 9 Apr 2020 17:58:07 -0400 (EDT) Received: from smtpin22.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 14586180AD811 for ; Thu, 9 Apr 2020 21:58:07 +0000 (UTC) X-FDA: 76689680214.22.nail72_46d5c5e215057 X-Spam-Summary: 1,0,0,,d41d8cd98f00b204,peterx@redhat.com,,RULES_HIT:30045:30054:30062:30070:30089,0,RBL:207.211.31.81:@redhat.com:.lbl8.mailshell.net-62.18.0.100 66.10.201.10,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:ft,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:15,LUA_SUMMARY:none X-HE-Tag: nail72_46d5c5e215057 X-Filterd-Recvd-Size: 6397 Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) by imf07.hostedemail.com (Postfix) with ESMTP for ; Thu, 9 Apr 2020 21:58:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1586469486; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bAljujnznaafCa0/fy26VO18/CP20gbcOTTly+WMlzY=; b=KvT2x+nEhI3fibbx7MZ5SJlQIp8DZZ2U+KWL4GWxq2J/k3F1UX4E46A/kv0hFisK9RsFIq M/MNi6GwI5dlCQ/o772nAGDmPm2fPzhwS07V3u+xvFVOpyp8HZee+wkv2FkZBTByX6BS2V ps4rsu1D01fu8OyDJS5O7pyUoSjuoXc= Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-391-GlsIJfT3P3iUjWiA6L-KXQ-1; Thu, 09 Apr 2020 17:58:04 -0400 X-MC-Unique: GlsIJfT3P3iUjWiA6L-KXQ-1 Received: by mail-qk1-f200.google.com with SMTP id q198so452241qke.2 for ; Thu, 09 Apr 2020 14:58:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=9YlJfp8gcnULlH0Iw/uIfxlGLQ2jILFfQLjgtpxox2c=; b=Wuad+SSaZqOB/BpSSeYr43djeP3fzHZ4I49cVqlybiekSTVlA8ghqT+kashakUZrQG EHqa5IgAaC57WC8tsCSVY+B8RKEVHAhi1SQcTVJuuOT8ASPXwULarIzIJ+BAXn58NASu +2f0AbBighEvLSLYlWdFv+51yCjZ/9qJHOJ66U41K1ed0ggzurACJR+3MVnZqdBrFyTs tXKDAYHixZ6or//UmWkU07n6vX0UWrsMMaKD39SW4FQAmx2D+e4kswTkQTf+NpfAN02m hM0wl0CM2KZX9qABm0b04TSokmONwXyOTDucsWbySa6tAyclIxaAovmC1KUzvVPIqjWj WbDA== X-Gm-Message-State: AGi0PuY0oatuKkjWf5+DpngDBzrCnsuF/LDQBx3i+dbjXXlsjmwFiwcZ lVpjvwDm0L62SCIMCnLzARDOgF93a6rBJ01w1fsmkDfmt1BY6pRey4hKABO+MrBafpUE0LwkdoP sfODR1psgN5k= X-Received: by 2002:ae9:e8c1:: with SMTP id a184mr988564qkg.242.1586469484034; Thu, 09 Apr 2020 14:58:04 -0700 (PDT) X-Google-Smtp-Source: APiQypKLmS8XXUNIiGvZvCrKQlsPyUcVaCnI5PoZiI1hPytd9AWi1VwgIeqBvXPZH/X8OoxSv8t7aw== X-Received: by 2002:ae9:e8c1:: with SMTP id a184mr988543qkg.242.1586469483726; Thu, 09 Apr 2020 14:58:03 -0700 (PDT) Received: from xz-x1.hitronhub.home ([2607:9880:19c0:32::2]) by smtp.gmail.com with ESMTPSA id m11sm103828qkg.130.2020.04.09.14.58.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Apr 2020 14:58:03 -0700 (PDT) From: Peter Xu To: linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: Nitesh Narayan Lal , peterx@redhat.com, Andrew Morton , Mike Kravetz Subject: [PATCH] Documentation: hugetlb: Update hugetlb options Date: Thu, 9 Apr 2020 17:58:00 -0400 Message-Id: <20200409215800.8967-1-peterx@redhat.com> X-Mailer: git-send-email 2.24.1 MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: The hugepage options are not documented clearly. Firstly, default_hugepagesz= should always be specified after the declaration of the same type of huge page using hugepagesz=. For example, if we boot a x86_64 system with kernel cmdline "default_hugepagesz=2M", we'll get a very funny error message: "HugeTLB: unsupported default_hugepagesz 2097152. Reverting to 2097152" It's understandable from code-wise because when hugetlb_init() we didn't have the 2M page hstate registered, so it's unsupported. However 2M is actually the default huge page size on x86_64, so we'll register it right after the error message. However it's very confusing if without these knowledges. Secondly, hugepages= option must be used _after_ another hugepagesz=. The word "interleave" is fine but it didn't declare the fact that each of the hugepages= option will be applied to the previous parsed hugepagesz= option. State all these clear. Signed-off-by: Peter Xu --- .../admin-guide/kernel-parameters.txt | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt index 86aae1fa099a..2a77b2b01e5e 100644 --- a/Documentation/admin-guide/kernel-parameters.txt +++ b/Documentation/admin-guide/kernel-parameters.txt @@ -839,7 +839,8 @@ the legacy /proc/ hugepages APIs, used for SHM, and default size when mounting hugetlbfs filesystems. Defaults to the default architecture's huge page size - if not specified. + if not specified. This option can only be used with a + pre-defined "hugepagesz=" of the same size. deferred_probe_timeout= [KNL] Debugging option to set a timeout in seconds for @@ -1475,13 +1476,17 @@ hpet_mmap= [X86, HPET_MMAP] Allow userspace to mmap HPET registers. Default set by CONFIG_HPET_MMAP_DEFAULT. + hugepagesz= [HW,IA-64,PPC,X86-64] Declare one type of HugeTLB pages + with the size specified. Valid pages sizes on x86-64 + are 2M (when the CPU supports "pse") and 1G (when the + CPU supports the "pdpe1gb" cpuinfo flag). + hugepages= [HW,X86-32,IA-64] HugeTLB pages to allocate at boot. - hugepagesz= [HW,IA-64,PPC,X86-64] The size of the HugeTLB pages. - On x86-64 and powerpc, this option can be specified - multiple times interleaved with hugepages= to reserve - huge pages of different sizes. Valid pages sizes on - x86-64 are 2M (when the CPU supports "pse") and 1G - (when the CPU supports the "pdpe1gb" cpuinfo flag). + On x86-64 and powerpc, this option must be used after + one hugepagesz= to allocate huge pages of that specific + size. This option can also be used multiple times + pairing with hugepagesz= to allocate huge pages for + different sizes. hung_task_panic= [KNL] Should the hung task detector generate panics.