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 40FA128B415 for ; Mon, 22 Sep 2025 23:08:38 +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=1758582518; cv=none; b=R5ueVK2HrjJhPgE5bdvnzTv/tjBS6vsO7j9fHY0k9uJzgzcnNRN/XpYFhRx31B0WnLVCcicj1yj7mea6KCnq4IxTOgRwiT7gy0ssf2ynM6V/od+BSR5AX3Zs7RFokbmR0pWoeIRu/creYgeyXoJgTv1h0uD0XF5N0fZ3kYbM29Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758582518; c=relaxed/simple; bh=QmCUwDfXfg4W2Dr+QVycDtLbh1Xl7d+GJAEjUK5WNlY=; h=Date:From:To:Cc:Subject:Message-Id:In-Reply-To:References: Mime-Version:Content-Type; b=RmF3inoC47PxOSuEAIAx9CihowmBMrV9CVUvsMnJltjS7nF/JlB7MeGtv1b8n12raA7XlHCGbXl1JmzTF+htJeoRwdyUiPobBU/c+hhIjiW8Dg3ljMb0uiv/1L5fXSHYpA2+zM/EtFu7qkwMh8E4Go0/ZPNbzEnfKBMn4Hxewig= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=D/360iHN; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="D/360iHN" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 89E45C4CEF0; Mon, 22 Sep 2025 23:08:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1758582518; bh=QmCUwDfXfg4W2Dr+QVycDtLbh1Xl7d+GJAEjUK5WNlY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=D/360iHNLVYROtKeN/fgEBdD6WzJbXBsP73BrcZHpBpzMiIiaUC0Hk6OtLYrHKxkR g0KelA+qBAZXcUXf20lJgWNGk3lxjQzWxbfHU4DooTmBJABrOB53zHebZwUdQgP6mJ Z7XS8B7HCEcpCgWbA971c0C/FER1G6pMwW4fHT9I= Date: Mon, 22 Sep 2025 16:08:36 -0700 From: Andrew Morton To: "yanjun.zhu" Cc: Mike Rapoport , Alexander Graf , Baoquan He , Changyuan Lyu , Chris Li , Jason Gunthorpe , Pasha Tatashin , Pratyush Yadav , kexec@lists.infradead.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v5 3/4] kho: add support for preserving vmalloc allocations Message-Id: <20250922160836.8d0dc984ff0986b3809c9ab0@linux-foundation.org> In-Reply-To: <8f893019-bd87-4f54-8238-acd8fdeed051@linux.dev> References: <20250921054458.4043761-1-rppt@kernel.org> <20250921054458.4043761-4-rppt@kernel.org> <8f893019-bd87-4f54-8238-acd8fdeed051@linux.dev> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu) 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=UTF-8 Content-Transfer-Encoding: 8bit On Mon, 22 Sep 2025 15:31:42 -0700 "yanjun.zhu" wrote: > > +int kho_preserve_vmalloc(void *ptr, struct kho_vmalloc *preservation) > > +{ > > + struct kho_vmalloc_chunk *chunk; > > + struct vm_struct *vm = find_vm_area(ptr); > > + unsigned int order, flags, nr_contig_pages; > > + unsigned int idx = 0; > > + int err; > > This is a trivial issue. I’m not sure whether RCT (Reverse Christmas > Trees) is used in the Linux MM mailing list. Not as far as I know. Some like it. If I was to have a preference I'd suggest that things be laid out in a logical order rather than by column count. Group like things together, avoid use of unintialized storage in initializers(!).