From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.0 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5A296C48BC2 for ; Mon, 28 Jun 2021 01:47:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3B1E061A2B for ; Mon, 28 Jun 2021 01:47:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231950AbhF1BuW (ORCPT ); Sun, 27 Jun 2021 21:50:22 -0400 Received: from szxga03-in.huawei.com ([45.249.212.189]:8359 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231735AbhF1BuV (ORCPT ); Sun, 27 Jun 2021 21:50:21 -0400 Received: from dggemv704-chm.china.huawei.com (unknown [172.30.72.54]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4GCr3z4ZHNz73NZ; Mon, 28 Jun 2021 09:43:43 +0800 (CST) Received: from dggema772-chm.china.huawei.com (10.1.198.214) by dggemv704-chm.china.huawei.com (10.3.19.47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2176.2; Mon, 28 Jun 2021 09:47:54 +0800 Received: from [10.174.176.73] (10.174.176.73) by dggema772-chm.china.huawei.com (10.1.198.214) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Mon, 28 Jun 2021 09:47:53 +0800 Subject: Re: [linux-next] rootfs: rootflags take effect when mount rootfs To: Greg KH CC: , , References: <20210626011655.351057-1-chenweilong@huawei.com> From: chenweilong Message-ID: <929b30c6-9d5e-0e57-c2a0-5c166b32dc10@huawei.com> Date: Mon, 28 Jun 2021 09:47:53 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Content-Language: en-US X-Originating-IP: [10.174.176.73] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To dggema772-chm.china.huawei.com (10.1.198.214) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021/6/27 18:46, Greg KH wrote: > On Sat, Jun 26, 2021 at 09:16:55AM +0800, Weilong Chen wrote: >> The kernel root filesystem may use the rootflags parameters >> when mount, especially for tmpfs, to setup a variety of features. >> >> For example: >> 1. Add 'rootflags=huge=always' to boot args. >> 2. When the OS bootup: >> rootfs on / type rootfs (..., huge=always) >> Then we can get the hugepage performance improvement of tmpfs. >> >> Signed-off-by: Weilong Chen >> --- >> fs/namespace.c | 5 +++-- >> include/linux/init.h | 2 +- >> init/do_mounts.c | 4 +++- >> 3 files changed, 7 insertions(+), 4 deletions(-) > No documentation update for this new user/kernel api you added? There is already relevant documents (Documentation/admin-guide/kernel-parameters.txt) description:     rootflags=      [KNL] Set root filesystem mount option string This patch make it work for tmpfs. > .