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 02B2F31D375 for ; Thu, 2 Apr 2026 13:42:36 +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=1775137359; cv=none; b=UvXf2lcfliqsA4+HJju76ymwP99ZV+hC6bPxA7lo3wzrGn4A1BCXsB3nB15eCb6StooS2NRjPEPq3vnQpnvN2Hg3n0RCzu/u+WSEL/pxL2B0/FlVLl8Dt2Ri9HgLuOxO2CwyHBSP1NHiqV9taXsf30GPgXf9ZwXYCxBAb7tHfcQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775137359; c=relaxed/simple; bh=5Vc4DzSuBE3iwUImRZTFAqJjMAemiisqavQ/4+VjLSI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=W3/KXvD/RZlrhR5ALOGLUbDHoQj7pZ1EGC/avMhmb4PWgnfULwr/yPl0LVvGEzeeLZqz06v7aCTEgNAsJGJ93n0et6vZ/HfIpnsDqTBkMJ93TjrAAoottns6amgZIRexmQnPm7NHNZK6lEKOYdqSqaKvXQ8OtSSrGCHYjkOiCA8= 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=jcv47Cld; 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="jcv47Cld" 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=HzUyBSX9B0826rh3H7aiflY6cSvBVcWG5MnMLxb5ifo=; b=jcv47Cldca7szzNvJ926bHHXv2 xWmfzFYuZ7r+nsOCy7qdk6lIegkj0amoWxUE/KP3Qq1fYbW8XqmPVdrEnyIlGWt2oBeBI7VCRmOs9 4QtGqG1HJ11ibQySDvtPIk9rd9JY3/rjbBc+RsOPWqxMwg0RqLHQ3JkXC1ru5QodJs+NAJmg9brSJ Rl02Iy01EehBzGK+tNwAPXymlElqHJIc55AFxJedzgpo+zlbLbsLNCQgW1uDlUiFpFxOBWHONW6nP 4wKsWYZo/RrqmDnJWtdwAajpbBVK5nsDfPC5uBpseb8hma2w9em7y9jBk3EMFDl+VOOK//oeCM/Nz p1LRSDzg==; Received: from authenticated user by stravinsky.debian.org with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96) (envelope-from ) id 1w8IJP-003ns7-25; Thu, 02 Apr 2026 13:42:18 +0000 Date: Thu, 2 Apr 2026 06:42:13 -0700 From: Breno Leitao To: "David Hildenbrand (Arm)" Cc: Andrew Morton , Lorenzo Stoakes , Zi Yan , Baolin Wang , "Liam R. Howlett" , Nico Pache , Ryan Roberts , Dev Jain , Barry Song , Lance Yang , linux-mm@kvack.org, linux-kernel@vger.kernel.org, kernel-team@meta.com Subject: Re: [PATCH 1/2] mm: huge_memory: use sysfs_match_string() in defrag_store() Message-ID: References: <20260320-thp_defrag-v1-0-6ab15d0d26eb@debian.org> <20260320-thp_defrag-v1-1-6ab15d0d26eb@debian.org> <3c2f0e52-0271-4bd7-b3d7-84249c40e2fc@kernel.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: <3c2f0e52-0271-4bd7-b3d7-84249c40e2fc@kernel.org> X-Debian-User: leitao On Thu, Apr 02, 2026 at 10:21:30AM +0200, David Hildenbrand (Arm) wrote: > On 3/20/26 17:05, Breno Leitao wrote: > > +enum defrag_mode { > > + DEFRAG_ALWAYS = 0, > > + DEFRAG_DEFER = 1, > > + DEFRAG_DEFER_MADVISE = 2, > > + DEFRAG_MADVISE = 3, > > + DEFRAG_NEVER = 4, > > +}; > > These numbers should get assigned as default (C standard) I think, and > can be dropped. You're correct that they would be assigned by default. However, I've explicitly set them to clarify that we iterate over these enum values using an integer and require these specific values. This was discussed in the previous patch series: https://lore.kernel.org/all/20260308140530.9ab6d1445d0936467eab4aef@linux-foundation.org/ Please let me know if it should be removed here, and I will update the patch, Thanks for the review, --breno