Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp575583ybt; Wed, 8 Jul 2020 06:51:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwLCatAMhq8tCOkA8XObocayDekYBALU+xWNlAKdYrfGGcd+oZwI74LAVHIFlKD12kTxT0M X-Received: by 2002:a05:6402:306a:: with SMTP id bs10mr58436245edb.51.1594216300107; Wed, 08 Jul 2020 06:51:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594216300; cv=none; d=google.com; s=arc-20160816; b=e8NU7mzFZEYpac+fM5n4jd8zkuus5X2ETHVrPjeIkgfw2HrIaGFVkMnoQj3JZPKQiF GfYSjdN5NqTFqk3QbkAAhd+2QY50yvlFfjcUNwqQ+f63jc1rvQvx2iNsqYEqYxWYuDec +xA3SXD3SXcyovW7Ew9VePBoj3OrkLQU6fIOb8P+hhtWG+E2tVxTve+XCpp4n6YAY+ny 6twSDFqrloLrxgkaxeQuCnj9f6J5RXFFNVepuITgjF6R8pd6xgTnFj9QOD57/GBBJ6sk mBu5je+iW/m/xNIuOgW/UDO/gIxhH3TAs8GQXEKsXVTRnsR7OUcmbYEDUgTWA/fM+4jQ VhNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:date:from:dkim-signature; bh=Tte8fl2zX3N2A0a3qeEnOT38zkmn+tzTckPAuzOgzME=; b=wtMGQuc/2FXBk+g4S9thdB0oRiWTa93sGuAcHfpLYoPxPaddwqoKhOkSE29ZCZbT4f SQjXxX/wEwhQ6t/h+yWmM7U6kzgXbpHFAhVr/lDMxau4R3413DeB3fgMBhZhXoktAb/h d41MiJeIN7Ux80/gXKNvcgEbLVGPmZHs0MFxY0FnLLTnY167aQ/AEARWF1NGL2Nput+e l5YtkMhhnctCHZojk9Mku6F2RYYEpTgniiN7zcVQvajUZz7JapmyEJ1rL/4ugxWm0V8V iRjrVDuIV/gxmMFqH+2nRbTkFI1kWJiPW4K4C8d/Lc8/n1tqZ2Wp4hff/OymMEBKgQG9 9D8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=S6ByzxiA; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m20si23966eds.126.2020.07.08.06.51.17; Wed, 08 Jul 2020 06:51:40 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=S6ByzxiA; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729612AbgGHNsJ (ORCPT + 99 others); Wed, 8 Jul 2020 09:48:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43864 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729288AbgGHNsJ (ORCPT ); Wed, 8 Jul 2020 09:48:09 -0400 Received: from mail-lj1-x241.google.com (mail-lj1-x241.google.com [IPv6:2a00:1450:4864:20::241]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E887CC061A0B for ; Wed, 8 Jul 2020 06:48:08 -0700 (PDT) Received: by mail-lj1-x241.google.com with SMTP id j11so5586331ljo.7 for ; Wed, 08 Jul 2020 06:48:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=Tte8fl2zX3N2A0a3qeEnOT38zkmn+tzTckPAuzOgzME=; b=S6ByzxiAg4LODlPItwZaDXaMBGaPRyVORGLaO3tWgy4Ca1ZBGEMMd1jn4feb9AlOYh 91BgReIkZ3nCgZ/mDHda/uVaZEgYZ1Xs1JWd4I/7/8e+Pp3b25qtC3lZWXwVvNRoUJ1e EqOC66OSW7gOOKj056PFbK2CQ76tsCbJOuzovIixvtOSIZJAmsfWCTNlrrunT6KMv3yr SwLWEowB9+4wf67ExE2iX/R/8AlA/1D5CIe3j+9cTed/WLN8p1voghsYFLY8PQ4RwIRS II18e5+eNrk44AbBZ/JLpC+faXMe+Dmipha69debboFjon+zDH5Zt5CEmISFfeAfXyAd VoYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=Tte8fl2zX3N2A0a3qeEnOT38zkmn+tzTckPAuzOgzME=; b=MYx1PXUbHpUTY3GvDAihWgDuHLtOStVVkhC4VcK1ZiDXGjqnmliXlhAMVBS96GuSGu WJLTj21Z363x0wasRJZxIC/IUvN2kQwsKz6MebIYmAWQnsR9ljwSLP6LgIc1K6WJAePs pc2E6URcYQEIrsGeLuzdnH9+y5nkfOH7IuxJTH+nnrxkZK3cZYajC5Vd2zIKeNxy1EWl 1aq9+BuF4yGqwUKr/nc+2zpLQg6VL+PerZ2S9+hMnQJubsHHGPgp9W4VNWGfWLAGctfz fHA08oJowOrotBVUgycndg38x3eUTojFmaOuKqdptstGa/vHNatyuzWg5sHT4qum8UEk LI4w== X-Gm-Message-State: AOAM533cYkFt9qzOMxN01tyluPHzN6j7ispA45exo/jziKFZv6zUl1Kg mmsAtKCvzWH6A/sfJHpWRA8LQFrlT8d0zg== X-Received: by 2002:a2e:81c4:: with SMTP id s4mr31554697ljg.284.1594216087280; Wed, 08 Jul 2020 06:48:07 -0700 (PDT) Received: from pc636 (h5ef52e31.seluork.dyn.perspektivbredband.net. [94.245.46.49]) by smtp.gmail.com with ESMTPSA id m10sm1070089lji.72.2020.07.08.06.48.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jul 2020 06:48:06 -0700 (PDT) From: Uladzislau Rezki X-Google-Original-From: Uladzislau Rezki Date: Wed, 8 Jul 2020 15:48:04 +0200 To: "tiantao (H)" , Andrew Morton Cc: Uladzislau Rezki , Anshuman Khandual , Tian Tao , akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, linuxarm@huawei.com Subject: Re: [PATCH] vmalloc: Removing incorrect logs when vmalloc failed Message-ID: <20200708134804.GA32309@pc636> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3cf13a05-a6b8-aa2f-752d-f9a25a1005f9@huawei.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > > On 07/07/2020 02:43 PM, Tian Tao wrote: > > > > It is not possible to increase size with vmalloc= 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=' 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 ./arch/ | 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= to the command to increase > 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. > 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 Morton is the key person here :) I can just review or make some comments same as others. > 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= > 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: 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, } if (!(gfp_mask & __GFP_NOWARN) && printk_ratelimit()) - pr_warn("vmap allocation for size %lu failed: use vmalloc= to increase size\n", + 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); -- Vlad Rezki