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=-5.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,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 B40A4C433DF for ; Thu, 9 Jul 2020 01:03:27 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 686C320772 for ; Thu, 9 Jul 2020 01:03:27 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 686C320772 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=huawei.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id D1EF56B0002; Wed, 8 Jul 2020 21:03:26 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id CCF0D6B0003; Wed, 8 Jul 2020 21:03:26 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BBF9E6B0005; Wed, 8 Jul 2020 21:03:26 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0196.hostedemail.com [216.40.44.196]) by kanga.kvack.org (Postfix) with ESMTP id A42116B0002 for ; Wed, 8 Jul 2020 21:03:26 -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 3D9E0180AD804 for ; Thu, 9 Jul 2020 01:03:26 +0000 (UTC) X-FDA: 77016739212.22.shop61_1f1141426ec1 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin22.hostedemail.com (Postfix) with ESMTP id 14F2218038E60 for ; Thu, 9 Jul 2020 01:03:26 +0000 (UTC) X-HE-Tag: shop61_1f1141426ec1 X-Filterd-Recvd-Size: 4686 Received: from huawei.com (szxga04-in.huawei.com [45.249.212.190]) by imf27.hostedemail.com (Postfix) with ESMTP for ; Thu, 9 Jul 2020 01:03:25 +0000 (UTC) Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id E7F3E4836568A6F36098; Thu, 9 Jul 2020 09:03:21 +0800 (CST) Received: from [127.0.0.1] (10.57.60.129) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.487.0; Thu, 9 Jul 2020 09:03:14 +0800 Subject: Re: [PATCH] vmalloc: Removing incorrect logs when vmalloc failed To: Uladzislau Rezki , Andrew Morton CC: Anshuman Khandual , Tian Tao , , , References: <1594113232-32193-1-git-send-email-tiantao6@hisilicon.com> <5e7885ef-081e-0682-7be7-40eb7712d2c7@arm.com> <20200707132442.GA26493@pc636> <3cf13a05-a6b8-aa2f-752d-f9a25a1005f9@huawei.com> <20200708134804.GA32309@pc636> From: "tiantao (H)" Message-ID: Date: Thu, 9 Jul 2020 09:03:13 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20200708134804.GA32309@pc636> Content-Type: text/plain; charset="gbk"; format=flowed X-Originating-IP: [10.57.60.129] X-CFilter-Loop: Reflected X-Rspamd-Queue-Id: 14F2218038E60 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam02 Content-Transfer-Encoding: quoted-printable 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: =D4=DA 2020/7/8 21:48, Uladzislau Rezki =D0=B4=B5=C0: >>>> On 07/07/2020 02:43 PM, Tian Tao wrote: >>>>> It is not possible to increase size with vmalloc=3D in arm64 >>>>> architecture and it will mislead.however vmalloc return failure >>>>> is a rare occurrence in 'many architectures including arm64'. >>>> >>>> But there is a chance that vmalloc() might work on architectures >>>> that support 'vmalloc=3D' command line i.e after a change and this >>>> information here might be helpful in those cases. >>>> >>> Agree. At least i see a few users of it: >>> >>> >>> urezki@pc638:~/data/coding/linux-next.git$ grep -rn early_param ./arc= h/ | grep vmalloc >>> ./arch/arm/mm/mmu.c:1152:early_param("vmalloc", early_vmalloc); >>> ./arch/unicore32/mm/mmu.c:276:early_param("vmalloc", early_vmalloc); >>> ./arch/x86/mm/pgtable_32.c:86:early_param("vmalloc", parse_vmalloc); >>> urezki@pc638:~/data/coding/linux-next.git$ >>> >>> >> I'm actually having this problem with the arm64 architecture at centos= 7.6 >> and pagesize is 64K. >> I followed the prompts and added vmalloc=3D to the command to in= crease >> the size of the vmalloc.and found out it's not worked. >> It took me some time to find out that this doesn't work for the arm64 >> architecture, so this log is misleading on arm64. >> > Agree, it can take time to understand some code or logic behind of it. > So in that case having good documentation or comments always help. >=20 >> I think it's better not to be prompted than to be prompted incorrectly= . >> I'm sure there will be others with similar problems. >> So I'd like to solve this problem this time, Please help me with your >> suggestions. >> If I change the PATCH to the following, will you accept it? >> > Actually it is not up to me to decide what to take or not. Andrew Morto= n > is the key person here :) I can just review or make some comments same > as others. >=20 >> if (!(gfp_mask & __GFP_NOWARN) && printk_ratelimit()) >> +#ifdef CONFIG_ARM64 && CONFIG_XXX >> + pr_warn("vmap allocation for size %lu failed\n", size); >> +#else >> pr_warn("vmap allocation for size %lu failed: use vmalloc=3D= >> to increase size\n", >> size); >> +#endif >> > I do not have a strong opinion here, but counting arches seems odd. > Maybe modify the string with following message: >=20 > > diff --git a/mm/vmalloc.c b/mm/vmalloc.c > index 1f46c3b86f9f..0aa26bc128d7 100644 > --- a/mm/vmalloc.c > +++ b/mm/vmalloc.c > @@ -1202,7 +1202,7 @@ static struct vmap_area *alloc_vmap_area(unsigned= long size, > } > =20 > if (!(gfp_mask & __GFP_NOWARN) && printk_ratelimit()) > - pr_warn("vmap allocation for size %lu failed: use vmall= oc=3D to increase size\n", > + pr_warn("vmap allocation for size %lu failed: use vmall= oc=3D to increase size, if your ARCH supports it\n", > size); > =20 > kmem_cache_free(vmap_area_cachep, va); > >=20 Thanks, that's a good suggestion, I'll send v2 as you suggested! > -- > Vlad Rezki >=20 > . >=20