Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp494550ybt; Fri, 10 Jul 2020 05:21:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy+5Zy7lBzr/zKYx5yh6aqAYTUbjmFv2H1ronoxjyd5Nr5p2qC5oY+tckQpBG/An4GgtbKW X-Received: by 2002:aa7:d353:: with SMTP id m19mr74754752edr.75.1594383693713; Fri, 10 Jul 2020 05:21:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594383693; cv=none; d=google.com; s=arc-20160816; b=MSWA+I/VRVgBXP0M53WXIpi2ug0D8M89Wg1lipgm551PX0I+4doAgklCbjiwgZqBV3 ZdUzKfDnHsXNhPKchwd3sKKKQMylog3K13980Bv5BM0sgFmAMiN+zbT/myFTWMFdAXWN 8Fb5YVoWnejMTigeWPrQb+f3ezIXjxfriU/RLsIET+hrV5PykfqzUwG8/3ZFOu9yrKFY I3+k0BgsTGsuQWtRrLQqWXVxLfa2h1mx+cNFzb64cg4xDrdGwsuCwQ0rlpmvhEOB0FEX ZsRL67QUhLe60DsZAxeFaCaX8Ok0aksu2aZ2sSzu7kPYkQkDAszY7e/+/IxGqK2oXjo7 02ug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=qsDecKDmDc+PlwR4neQ8d5AXQZrIkxerBKLIvKfGqpc=; b=X9SSZYISU/X+1YGMu8ymYzJe6lzrp2VcpwbkraAvqYgG1RTUliA9pGV3Lp+h1PbI1U Y7jJPbQ2hPqqf0WfDIf4y7Vd8gppv/M9vgQ5FTgi7OVZYWpPMmSF82CSiS94HtTODf7v tThWXc1WUdAHmRxT2ERWgAtOYygiVWtLzYZAm8I63daeoMBLYScQoKs2j9ae+TfOak2J mMYGQnw6zMh4NiWzsdwRjujiY0TjM0wzvWhtD7e/j/x061xmU4ljcKbrh/90JtklBU6d V2CF28HXh/wbAlo0f9S1P6FF3nBDs3EjPyECT/eupk8oIh6E6mY+jHjKExTPxHM2EOya mB3A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z3si3710571ejc.547.2020.07.10.05.21.08; Fri, 10 Jul 2020 05:21:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727873AbgGJMTx (ORCPT + 99 others); Fri, 10 Jul 2020 08:19:53 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:42402 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726774AbgGJMTw (ORCPT ); Fri, 10 Jul 2020 08:19:52 -0400 Received: from DGGEMS408-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id F3E97AD97076D32284B8; Fri, 10 Jul 2020 20:19:39 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by DGGEMS408-HUB.china.huawei.com (10.3.19.208) with Microsoft SMTP Server id 14.3.487.0; Fri, 10 Jul 2020 20:19:33 +0800 From: Tian Tao To: , , CC: Subject: [PATCH v3] vmalloc: Add the right hint when vmalloc failed Date: Fri, 10 Jul 2020 20:17:52 +0800 Message-ID: <1594383472-52983-1-git-send-email-tiantao6@hisilicon.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.69.192.56] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In fact "vmalloc=" cmdline option is not available on many platforms.When the user encounters this error, add the correct hint to prevent misleading. Signed-off-by: Tian Tao v2: Add appropriate hints and let users decide if they can increase the size of the vmalloc by vmalloc= depending on their platform v3: change the patch name and commit messages. --- mm/vmalloc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/vmalloc.c b/mm/vmalloc.c index 89e83d3..c6ae7e6 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -1238,8 +1238,8 @@ static struct vmap_area *alloc_vmap_area(unsigned long size, } if (!(gfp_mask & __GFP_NOWARN) && printk_ratelimit()) - pr_warn("vmap allocation for size %lu failed: use vmalloc= to increase size\n", - size); + pr_warn("vmap allocation for size %lu failed: use vmalloc= to increase size, + if your ARCH supports it\n", size); kmem_cache_free(vmap_area_cachep, va); return ERR_PTR(-EBUSY); -- 2.7.4