From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from stravinsky.debian.org (stravinsky.debian.org [82.195.75.108]) (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 DF1223D0917 for ; Wed, 11 Mar 2026 09:27:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=82.195.75.108 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773221253; cv=none; b=KGs38dcfqTk8AZm7B5OI4ICtRZ30nZSrlwwGP31swEzvW0ETPr7B1zlvO43kfaRqkgxmA8NfX0SA+77B3406ddyZjhK84MSnKvdAG01d9L+23/MdY5Ah67E8ldfQeu8A6YmnTjnxODYoeyWLGogiQDA1s6OX40Scpe+kd445q8U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773221253; c=relaxed/simple; bh=qATN+mBITgWDdT8HPNCKo3VSC44u/DPl9mbFjd8hNDA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ZHMAcJlUeADCYZYwNPdlZKgWZUbJvVgn0sR0txx5OTqPElByYdUB0AHPr6pwqLm0vf1ThL0rV3j2VlS8KQSMmmQ5VsTflaiJi8pXLG/0bTFAxMxCBexu72dIX+rt/Q60hBSjyhmg6NM4F1T1tDoBV+7lqA3QpcPxM4cHictCRSI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=debian.org; spf=none smtp.mailfrom=debian.org; dkim=pass (2048-bit key) header.d=debian.org header.i=@debian.org header.b=vCkVumd0; arc=none smtp.client-ip=82.195.75.108 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=debian.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=debian.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=debian.org header.i=@debian.org header.b="vCkVumd0" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debian.org; s=smtpauto.stravinsky; h=X-Debian-User:In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=BFLqimmXwB6BbWmOdEJ5V1xgLZKeGuWLhtRUXAuApYs=; b=vCkVumd0LOtXR6qOwYwctmbOy0 F+BttF7V8MzgqOXNd7HJ/CEKGRsCfTHDcZ86YynJoOUGsi31SdZAfK8CnuY04qvuXhsiY3nH30fIu dCs2gEGXnNyke/sv1yNl75SaRB2sDqBaAQlLuvkUUTb9PKRpggeEnw+6Z2/tjLSEsD4iuR9tDUdlZ nu9eqaUUI9c+1KvkJUUA1ijz+92wPmbWEOSvjgJrfunVTRY+3bDm44VMAQfWZY7aWvqdW0jtBRO57 Wg85KEaDq3DO3DjdTTRKjPajvu+S049j2qH0v3kmy7LGMcupZXS++/kKsGohr5sL1Rsp/iJTkVFw2 tJPtHPng==; Received: from authenticated user by stravinsky.debian.org with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.94.2) (envelope-from ) id 1w0FqM-003fVp-Iy; Wed, 11 Mar 2026 09:27:06 +0000 Date: Wed, 11 Mar 2026 02:26:58 -0700 From: Breno Leitao To: Lance Yang Cc: Wei Yang , Andrew Morton , David Hildenbrand , Lorenzo Stoakes , Zi Yan , Baolin Wang , "Liam R. Howlett" , Nico Pache , Ryan Roberts , Dev Jain , Barry Song , Vlastimil Babka , Suren Baghdasaryan , Michal Hocko , Brendan Jackman , Johannes Weiner , Mike Rapoport , linux-mm@kvack.org, linux-kernel@vger.kernel.org, usamaarif642@gmail.com, kas@kernel.org, kernel-team@meta.com, "Lorenzo Stoakes (Oracle)" Subject: Re: [PATCH v5 2/4] mm: huge_memory: refactor anon_enabled_store() with change_anon_orders() Message-ID: References: <20260310-thp_logs-v5-0-686099175bf6@debian.org> <20260310-thp_logs-v5-2-686099175bf6@debian.org> <20260311031229.mloqvlmmqipr7k2h@master> 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: X-Debian-User: leitao On Wed, Mar 11, 2026 at 12:52:02PM +0800, Lance Yang wrote: > On 2026/3/11 11:12, Wei Yang wrote: > > On Tue, Mar 10, 2026 at 10:57:08AM -0700, Breno Leitao wrote: > > > +enum anon_enabled_mode { > > > + ANON_ENABLED_ALWAYS = 0, > > > + ANON_ENABLED_MADVISE = 1, > > > + ANON_ENABLED_INHERIT = 2, > > > + ANON_ENABLED_NEVER = 3, > > > +}; > > > + > > > +static const char * const anon_enabled_mode_strings[] = { > > > + [ANON_ENABLED_ALWAYS] = "always", > > > + [ANON_ENABLED_MADVISE] = "madvise", > > > + [ANON_ENABLED_INHERIT] = "inherit", > > > + [ANON_ENABLED_NEVER] = "never", > > > +}; > > > + > > > > Just one trivial thing, maybe keep the sequence as the sysfs output? > > > > Currently the output of /sys/kernel/transparent_hugepage/hugepages-xxxkB is > > > > always inherit madvise [never] > > > > But no strong opinion on this. > > Yeah, keeping the enum order consistent with the sysfs output looks sensible > :) Good point, I'll adjust the order to match the sysfs output and send out a new version. Thanks for the feedback! --breno