From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lj1-f174.google.com (mail-lj1-f174.google.com [209.85.208.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6D3CC36308F for ; Thu, 2 Jul 2026 17:48:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.174 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783014513; cv=none; b=L9IrctyQyFfBPWT4ChO9taLvBs9uW8MKFtQ0AJjdPo3c+BkZOJwHYjNe5yFAsUD+y9LNE8GW3badCfoMkKHquOp91+nGWvSktgotXCKXe47jR2lk4++R/MRnzoBIMuSl8Logv3Ovxu8/IAqdoNIo6Y1ZuYHF74Bzdq8H6KuTOJc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783014513; c=relaxed/simple; bh=HbLHLvoNbaSkIvyKB6OMzoPmwodJ6neVSSKCWTfG6wI=; h=From:Date:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=EsX3BM37RlYH+3gQwcIcGTXvMjgrVmVCsqPKmOuV4Iw5YboszvbRJAMD0qTfCiMxccDYBZ3oQEVKvaAtjzibxfIzY6/gE3z0cMv6MLs5yZcOMRHP2nVLAG62cItwt872YnoO6STo8+MOPWM/MtxNOuzAtEQ5sh0rM6St14wiKAE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=s2aLGLVm; arc=none smtp.client-ip=209.85.208.174 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="s2aLGLVm" Received: by mail-lj1-f174.google.com with SMTP id 38308e7fff4ca-39b1eab2f29so8233281fa.0 for ; Thu, 02 Jul 2026 10:48:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1783014511; x=1783619311; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:date:from:from:to:cc:subject:date:message-id:reply-to; bh=r1iw1Kf11G8Y2iJEwm3GfbWSG8bTonFB3NcyHNMfkRY=; b=s2aLGLVmrB1Q8/a4M5f9hE6JdaixBCvDkaGuyTJ2ufU9xFc9S8GATGRtYUXD5dVp7k 8N3a8KQIAE8KI0g33vt3YNSpT/37wsm7Jf1IG/ehqTW9SyszuHmPLnyexlqOnQuo/V05 N88c8AgeyQHADz4Gn1XAD++0lwuRL+BpGYb6TtAboSZGGFGwDlO1ZjtwLLCsffsPGooA dOotOQGTmrZNXqaaNcjYeXzA+MEEvcAbtcWTvNb9k7a7r4sJmFu9l9wyQiilS6thMU+P W3bcAzi4XJF5WYjR8+PrtpJkkCvPfZyLUtRVtq0XNHaJLo+VpDZCx65YENhxsh5kzUIe H2wQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783014511; x=1783619311; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:date:from:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=r1iw1Kf11G8Y2iJEwm3GfbWSG8bTonFB3NcyHNMfkRY=; b=f7SvY9dZ9QM1iwWIrfSLHeA95YUphZPjZwAu7qZ3eSsKoW9C3h0iKHGpYBcAC82wrd U+OkFdWI3tRsyZ6DL0JFTKuYJrCSIwUj8zfD3QwQhnYa1JpuSEBDzafnDivHtMvI8ZZ1 s8RrMQJr7xEpaO720foEuhR8TpiD8xNVvZunp0Qdd/YDKFNlNegUe5kgGEfgf+EqoRi1 wCjHB/ZC1wNNyZ7yEAcc4ZPbBlZE0qDD6mjep68gRXWZbUY/F1c/NoADa6nmcn4cRL3b vmZkwm6DFHOG33f3yd/96+ltcXJyETeXT+SVEGbErw13CE1pZw1lH9KpoW62fV5NDMBO tM5Q== X-Forwarded-Encrypted: i=1; AHgh+Rrk3jaju+V7aTeUrSXT5lMJARMWQo5dSlkngWA5MoOC5CUkwfrYI6TRJOlMiFrrRw32dfQmouh4GWZMkgY=@vger.kernel.org X-Gm-Message-State: AOJu0Yytb6UFYKf9yjQEUGegqayBs6nbZq1R4y92k5MjR85mM3Noi5cW XHIEXYkRQ5v75RI/KdpF7+tAzYl5SkKWQImLEY2thjW634JcZ9CAD9C+ X-Gm-Gg: AfdE7cn+OP8O0h3XpL7eC4INVt5eJKZ5Bac8hrFuvzTUvylGByruFxf/s1QN3j0Qst+ 8N7yzQfbzSPZiwNZJT08cu8u3IEklMg9XH4IbMFqRhWmKO6f4o03wfdixRwYJVbCHw41Uwfo5eu 8MYfBDeTNKXqD4wQ7XLWEJup5D7bVT2cL88rXHfi62oYiMYAYGlOv8j4H+NTp2FPntPlqCYt8IN AvDzmsSpaoFG3rOW4TYmO9w8te5fCNpXIRs8UqJnfDFeAqIJeBGsiLzjNegkGo8LEG8i+juBRGZ yiwYrNtRkfrSDzI8jq6U80QDqrwfXNC4a/1MqOMZ1s4Td4B7wnBds4Q4/WtVJGm0x7ObQ/qMjqj f1KZECekTBlpFtVh59a9GvEi5/wP7X+tfBvBOuPFyKRf28Z8SDl8xdCcj0A2TZbkLWRRBaiI7De uOH/6WlA0Hc0cupSCbo9njeD/9wiYLK1BblanTzn0vTSXVEvwgvMMUug== X-Received: by 2002:a05:6512:648d:b0:5ae:b6cf:c745 with SMTP id 2adb3069b0e04-5aecf4dcd9cmr163318e87.17.1783014510420; Thu, 02 Jul 2026 10:48:30 -0700 (PDT) Received: from pc636 (host-90-233-199-119.mobileonline.telia.com. [90.233.199.119]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-5aec89a16a8sm823845e87.34.2026.07.02.10.48.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Jul 2026 10:48:30 -0700 (PDT) From: Uladzislau Rezki X-Google-Original-From: Uladzislau Rezki Date: Thu, 2 Jul 2026 19:48:27 +0200 To: Feng Tang Cc: Andrew Morton , Uladzislau Rezki , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm/vmalloc: add alignment info in warning print as possible failure reason Message-ID: References: <20260702112610.21589-1-feng.tang@linux.alibaba.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260702112610.21589-1-feng.tang@linux.alibaba.com> On Thu, Jul 02, 2026 at 07:26:10PM +0800, Feng Tang wrote: > When running 'fix_align_alloc_test' case of test_vmalloc module with > command: > insmod ./test_vmalloc.ko run_test_mask=64 > > It will fail, which is the expected result, as the case increment > the alignment parameter gradually to 64bit limit. And the dmesg has > warning msg: > "vmalloc_test/0: vmalloc error: size 4096, vm_struct allocation failed, mode:0xdc0(GFP_KERNEL|__GFP_ZERO), nodemask=(null),cpuset=/,mems_allowed=0" > > It doesn't give the alignment info, which is the real reason for the > failure (not the 'size'). > > Add alignment info to the warning print to give the necessary hint > for possible failure reason, and the message will be: > "vmalloc_test/0: vmalloc error: size 4096, align 0x800000000000, vm_struct allocation failed, mode:0xdc0(GFP_KERNEL|__GFP_ZERO), nodemask=(null),cpuset=/,mems_allowed=0" > > Signed-off-by: Feng Tang > --- > mm/vmalloc.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/mm/vmalloc.c b/mm/vmalloc.c > index 1afca3568b9b..e066324dcc76 100644 > --- a/mm/vmalloc.c > +++ b/mm/vmalloc.c > @@ -4045,8 +4045,8 @@ void *__vmalloc_node_range_noprof(unsigned long size, unsigned long align, > if (!area) { > bool nofail = gfp_mask & __GFP_NOFAIL; > warn_alloc(gfp_mask, NULL, > - "vmalloc error: size %lu, vm_struct allocation failed%s", > - size, (nofail) ? ". Retrying." : ""); > + "vmalloc error: size %lu, align 0x%lx, vm_struct allocation failed%s", > + size, align, (nofail) ? ". Retrying." : ""); > if (nofail) { > schedule_timeout_uninterruptible(1); > goto again; > -- > 2.43.5 > Do not see any issues with adding extra information on failure. Reviewed-by: Uladzislau Rezki (Sony) -- Uladzislau Rezki