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 B17503E4C8F for ; Thu, 2 Apr 2026 14:37:52 +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=1775140674; cv=none; b=BL0mdtvzY9jwXLtLDs1qBGp8TJKmf2/iuWaIkfRoN3S1DNccsn6AWcnCDwSqBTNZCh3j3zmfOF4cD6AfO3OUTtPM72U+WoZPBVEHQfy+7opCkT+8TgXvocnxES8Q0RWjaBJlW3pQv8A+Ipja+DD2DdI1+tf9j+49ryk7NnLVKtQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775140674; c=relaxed/simple; bh=vyytvxgtDGjNvjVtF2ko5YniS4wx8Hh5t8/YLvaYyM4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=tzl/tDvYf9JXSaytdDAUdakPuinYdsdxXlD9/GRo5tDzBa6FW+/DHWB07aTipGwBD9R7eEqtHtXEeU96qYlxcZrlEMqfhGDpPbJv2qWWlGPvKyCHgf0oA2W8uR+FffqRf597y3yrjEHd3oMTUfm3xJ6yNGF2bvfPD+MkIgKE3UA= 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=PAJGAi81; 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="PAJGAi81" 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=Z5ZRPGNvAMpOcTixcrJlcNRUdg6JCMkwOopqEJi5GRQ=; b=PAJGAi81mveUFhKTreIg0VaZ4M Ze7imDFYG9dGUwVISQTHgnRqm9I05OmpasTd+LQEt7hBsnL6qbFWOi/Qf1WcrjcxPrSmiCYypoL3e nKhzZbvV9Pm0wdmbx6l3WHUBYsKPLHQm44UEsBKGQwQcyG5q7ttXkgDEBiVu7pmuRKpGqHfNjShA+ HyQLs90DxOPvyMb12KMTGzexbiP2U5a7JlJ9kTMYo1c4lV9zfxDknJd2NBQ3aTG33AiDT/CblTtE4 XIpWz77MoERtCtD4coeFLX5f6LuRRfIqIWbb74QNZsaoup2S5Y5YxpVUZmcVZKboQdaYA+PrBcn6t 0562CfCA==; 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 1w8JAr-003pcd-0o; Thu, 02 Apr 2026 14:37:32 +0000 Date: Thu, 2 Apr 2026 07:37:26 -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> <1bd5618b-f21e-4f87-85fb-e581d1efb803@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: <1bd5618b-f21e-4f87-85fb-e581d1efb803@kernel.org> X-Debian-User: leitao On Thu, Apr 02, 2026 at 03:45:25PM +0200, David Hildenbrand (Arm) wrote: > On 4/2/26 15:42, Breno Leitao wrote: > > 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, > > It's ok to leave it. It's just ... unnecessary :) > > What I saw in the past is that we highlight it by only setting the "= 0" > on the first entry. Understood. You're right that I was overly verbose here. Thanks for the review, --breno