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 C6C9C21C160 for ; Fri, 6 Mar 2026 10:30:46 +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=1772793047; cv=none; b=Emrpd52QHbknGf+/75PDz90ceqdy+qP+f+f42ntzusVMOjXaIvoPpHrpgLitPqb/jB2Ql3Wes36jNRT8uAMadFc0zjy3eiBdCu7WHglIcDjjn4rUyDavpnpaNa6pWhZiOX75tQ1sz1fGiaIJijy4pb0Bn8wjMQaF3HK1XvU7+g4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772793047; c=relaxed/simple; bh=5Mkp5FAgkCZzmRM9m3K4d5tyV2fZZ1I73Dt8jS67PPc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=rZjdEBiKhJQPFf4ko56caj8DfGXelyeI2uthdC54AI79rnUbtMicuPTmMI3e0EgrrEcWsKXsuM8LpcMtQpJfrcSuyTgLsh5NGSAoaEsyjW6vRZ7X0hrLryWi1yepBRwolK32ivy0FpaNA8OQ4BPXMNZc4z3Rr9SD2X5EJuutJU0= 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=Ajbmjid4; 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="Ajbmjid4" 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-Transfer-Encoding: Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Reply-To:Content-ID:Content-Description; bh=ypir9ACeo9fn0O3giSko3MK+rMH4jE3BtswSlrDHXBE=; b=Ajbmjid4ZiOJjJUGjMlYBw310B 1GkbvHzGSBbVjnipO1Eg5hFp4eexPzSkC/zhnX4VqOWT6TkvVNscl7zvBZQP3z9U295jXQuzLonjp WuEDDU+tR+TT0a1ozpA4MeEpZFLgvZo98PdW+oelam21K5+UYq4XiEYH9b2wEBsnLeR7RTdrKOqgB Twoe5PnwQ+Gv3K5IZfadHefBWsDq0cS7t9xFj9XTDLYOB/W1Ts83nBkKd6n4I97dlSgwsmjYNWCgl ktr7lnJgt9DadaOGOPwQfSg7FbCK4uqwR5qOKQH4ohXJnOH/O/AeBcnW85fVXOaWSF8IskVOZ1NFW 9aschnKw==; 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 1vySRw-00HR95-Dq; Fri, 06 Mar 2026 10:30:28 +0000 Date: Fri, 6 Mar 2026 02:30:22 -0800 From: Breno Leitao To: Baolin Wang Cc: Andrew Morton , David Hildenbrand , Lorenzo Stoakes , Zi Yan , "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 2/3] mm: huge_memory: refactor anon_enabled_store() with change_anon_orders() Message-ID: References: <20260305-thp_logs-v2-0-96b3ad795894@debian.org> <20260305-thp_logs-v2-2-96b3ad795894@debian.org> <8b238664-4375-413c-a8cc-105d98430362@linux.alibaba.com> 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-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <8b238664-4375-413c-a8cc-105d98430362@linux.alibaba.com> X-Debian-User: leitao On Fri, Mar 06, 2026 at 02:07:50PM +0800, Baolin Wang wrote: > > + mode = sysfs_match_string(enabled_mode_strings, buf); > > + if (mode < 0) > > + return -EINVAL; > > - if (ret > 0) { > > - int err; > > + if (change_anon_orders(order, mode)) { > > + int err = start_stop_khugepaged(); > > Thanks for the cleanup, and the code looks better. > > > - err = start_stop_khugepaged(); > > if (err) > > - ret = err; > > + return err; > > + } else { > > + /* > > + * Recalculate watermarks even when the mode didn't > > + * change, as the previous code always called > > + * start_stop_khugepaged() which does this internally. > > + */ > > + set_recommended_min_free_kbytes(); > > However, this won't fix your issue. You will still get lots of warning > messages even if no hugepage options are changed. Correct — this was part of the earlier discussion, where the suggestion was to retain the set_recommended_min_free_kbytes() call even when it is a no-op. As for the warnings, I see a few possible approaches: * Remove them entirely — are they providing any real value? * Apply rate limiting to reduce the noise * Something else? Thanks for bringing this up, --breno