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 1E4343EDAC2 for ; Fri, 6 Mar 2026 15:57:26 +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=1772812648; cv=none; b=Mwfx7AdBT40cUTBPgVJdgp7zBja0WYBHyHPP+eVrIG8e8P8Nx6q8PsMsX/+EgXMW8zVY43XunZthUTilvIyaVKoi0REUj+Sw6yLnucV46gkKVjuGrDpMNvVQfXU4ad5GuePL03qXBE8zWGyLv4Abn2BjrQLct7ZTJbg5fde/K+M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772812648; c=relaxed/simple; bh=d30KzVL2Nk10OvEArDeZ8fGvpR/60NY3RsVsJYdoH0o=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=rZnf46vFeFg7Q0XOUbqGAeBBsiYgEnajjgOSY8+7Y9xQAF8xPkbChFvHOkxpKYZJKyZdNYqLJyU/8f5r4Dzw/qPJoE3AWvg8L/32AbzvNoFsbEZl8T1k4FO5E+YxHUGkX0geVO+YaOhIZah851adZbOaLvqtQwKmB4nhZv7b4As= 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=F6NIVfoi; 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="F6NIVfoi" 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=jP9/Cf4cmrfk2eSwJ1fx5VOc1+nY42Td/c4JGIEmTUw=; b=F6NIVfoiA+3tFLgPUk4X1Fz+2E AQZxpp9fR/zZWXR8Sh0kPmBtnIhiex24G6pSq0bqZYKkptt2hA40sWONNhXVRj3ZqS6Q8Dm5EL9Gn TZZ2nP7psnS03b5vGK9uhAwBELM2qiQpEroA53FAmPhJJqlSnQCsFjsdAj2JiimmsOT6i4Lzk/Hbt YQr2g2AG8fkWW7JcEtEtEMQ1XZdgceD3gh3UbMrnniiTXSE6+gtiHIdsDdlgthhkMmJjnfkiqwip9 6vTYwHPN8+N4mkwZAXrxgIB+yBZSffdI9LnREny9ICJazfZJWp3QytU1Xnv/IpEoFqhtSKbP4Hz0E uZmU0TXw==; 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 1vyXXr-00010l-C2; Fri, 06 Mar 2026 15:56:55 +0000 Date: Fri, 6 Mar 2026 07:56:48 -0800 From: Breno Leitao To: "Lorenzo Stoakes (Oracle)" Cc: Andrew Morton , David Hildenbrand , Lorenzo Stoakes , Zi Yan , Baolin Wang , "Liam R. Howlett" , Nico Pache , Ryan Roberts , Dev Jain , Barry Song , Lance Yang , Vlastimil Babka , Suren Baghdasaryan , Michal Hocko , Brendan Jackman , Johannes Weiner , linux-mm@kvack.org, linux-kernel@vger.kernel.org, usamaarif642@gmail.com, kas@kernel.org, kernel-team@meta.com Subject: Re: [PATCH v2 3/3] mm: huge_memory: refactor enabled_store() with change_enabled() Message-ID: References: <20260305-thp_logs-v2-0-96b3ad795894@debian.org> <20260305-thp_logs-v2-3-96b3ad795894@debian.org> 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 Fri, Mar 06, 2026 at 11:39:28AM +0000, Lorenzo Stoakes (Oracle) wrote: > On Thu, Mar 05, 2026 at 06:04:55AM -0800, Breno Leitao wrote: > > + mode = sysfs_match_string(enabled_mode_strings, buf); > > + if (mode < 0 || mode == ENABLED_INHERIT) > > + return -EINVAL; > > The mode == ENABLED_INHERIT check is weird, it reads like 'oh a user CAN specify > this, but if they do we error out', but in reality > /sys/kernel/mm/transparent_hugepage/enabled explicitly outputs only always, > inherit, maddvise. > > So, even though it's duplicative, I think it's probably saner to have: Agree. That would be a better approach. > With that fixed, feel free to add: > > Reviewed-by: Lorenzo Stoakes (Oracle) Ack, thanks for the review, --breno