From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A5280E55B; Wed, 9 Jul 2025 23:26:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752103618; cv=none; b=ATnfS/vCSPQtBs6wTdS2WGFNVi8P016N0NTPS8qMHJfedD9lAHARpvUEN1RXV0TRxfdO66gesD2HGSYCvHBxGh6n8Rfdi+pCt16ktC7qe+4cjDfIGUKLpW/cibDNZf59tWNi+1w+I8ujQdesoIDvB2PSvfDPqR9vhcRKrRfO78w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752103618; c=relaxed/simple; bh=IPEkOrMLiuYPZNTOAJdwlYClp6f/Px6JZvPwRaELaS0=; h=Mime-Version:Content-Type:Date:Message-Id:Subject:Cc:To:From: References:In-Reply-To; b=ZFtgBOjGWKfV/HlciPzMb9BdRoTH8eoRKtyq6MYxq/wRnwsDFtGCL3yAbS2/wR6VI/3lSvacWvgsAU+Pj2/lws4LZkuADwE6HAbZ71DUo3pcWKNhXCxLOw/FIaC17Zzk0DHl4rGZCymJT4i3pZKYeGjlP3OdvPuDwXaAmPz3aiw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=b2g1Q+zI; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="b2g1Q+zI" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5FF2DC4CEEF; Wed, 9 Jul 2025 23:26:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1752103618; bh=IPEkOrMLiuYPZNTOAJdwlYClp6f/Px6JZvPwRaELaS0=; h=Date:Subject:Cc:To:From:References:In-Reply-To:From; b=b2g1Q+zIZl/+BRBTP5p6IPueQ9i/noMS14SUk6j/a4rs6rm+xarisc4yVYbX3CvTa b/PTn9nuKDQSjB90es6LVAdiO7XZoLirdDYVav//SYbp6B6rVYx6YiVpRly0bx/1Ee uM6l57S4G/17nCoGXyASois71bPjvogxbE4JSKheGnN8PAd52n2VT5ytybnE7l54fb tiwvzwoa1E9R8juCK7Tqd0Bkx1Sm+i1IHwhvSE+Qhp5GDK0s0/50osQAnF3ZCuWVmW a+4oWt23yWtzwNE6dIGKbL9tdXh9+qNZh3r+Gsxp5ZOBjvZDEeV+iHFPidD2t5BZbv 77sm08E8miyGg== Precedence: bulk X-Mailing-List: rust-for-linux@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Thu, 10 Jul 2025 01:26:53 +0200 Message-Id: Subject: Re: [PATCH v12 1/4] mm/vmalloc: allow to set node and align in vrealloc Cc: "Vitaly Wool" , "linux-mm" , "Andrew Morton" , "LKML" , "Uladzislau Rezki" , "Alice Ryhl" , "Vlastimil Babka" , "rust-for-linux" , "Lorenzo Stoakes" , "Liam R . Howlett" , "Kent Overstreet" , , "bpf" , "Herbert Xu" , "Jann Horn" , "Pedro Falcato" To: "Alexei Starovoitov" From: "Danilo Krummrich" References: <20250709172345.1031907-1-vitaly.wool@konsulko.se> <20250709172416.1031970-1-vitaly.wool@konsulko.se> <14b08e7c-c2e8-435c-a1dd-bd51cfb42060@kernel.org> In-Reply-To: On Thu Jul 10, 2025 at 1:14 AM CEST, Alexei Starovoitov wrote: > On Wed, Jul 9, 2025 at 3:57=E2=80=AFPM Danilo Krummrich = wrote: >> >> On 7/10/25 12:53 AM, Alexei Starovoitov wrote: >> > On Wed, Jul 9, 2025 at 10:25=E2=80=AFAM Vitaly Wool wrote: >> >> >> >> >> >> -void *vrealloc_noprof(const void *p, size_t size, gfp_t flags) >> >> +void *vrealloc_node_align_noprof(const void *p, size_t size, unsigne= d long align, >> >> + gfp_t flags, int node) >> >> { >> > >> > imo this is a silly pattern to rename functions because they >> > got new arguments. >> > The names of the args are clear enough "align" and "node". >> > I see no point in adding the same suffixes to a function name. >> > In the future this function will receive another argument and >> > the function would be renamed again?! >> > "_noprof" suffix makes sense, since it's there for alloc_hooks, >> > but "_node_align_" is unnecessary. >> >> Do you have an alternative proposal given that we also have vrealloc() a= nd >> vrealloc_node()? > > vrealloc_node()?! There is no such thing in the tree. > There are various k[zm]alloc_node() which are artifacts of the past > when NUMA just appeared and people cared about CONFIG_NUMA vs not. > Nowadays NUMA is everywhere and any new code must support NUMA > from the start. Hence no point in carrying old baggage and obsolete names= . This patch adds it; do you suggest to redefine vrealloc_noprof() to take al= ign and nid? If we don't mind being inconsistent with krealloc_noprof() and kvrealloc_noprof() that's fine I guess. FWIW, I prefer consistency.