From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 3E2FB2FE576 for ; Fri, 10 Oct 2025 18:30:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760121033; cv=none; b=kotAXMZi9gJTDkUdFGMbE1qiEu3r4ge5cQxbdedXKe/sAv2XdqgydKJcjZXjEfUb3j+kV1nuxgYamOzpuf72HZ+WEIL/MRQ5cryvT9lHwP51zyK7UYpKEDNnyqttb/EXpaamYi6mXcI1zLse71hbGUqr1rlqUgdJFJe2Ri60ZIQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760121033; c=relaxed/simple; bh=ZOZnVWbV81iSXnE0N2FIQPShPP0gpWUpU8VYEUonzrs=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=XsSiGRns4mNTEx2ihdsW6wHd2IYQor/I3012NSVebOnb001q/8k61Q+nkINuMSZ0UbV2DSMq0nV5kRXHq/gincOBjEIu/ynToxUo6gcFDU9cSumuya+y18/Gtp0GxMg//4mqgZuZTpTZVRvsb5meUgJykTiP4JOQJt1VRrpxSws= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=K7WA4es9; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="K7WA4es9" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0724AC4CEF1; Fri, 10 Oct 2025 18:30:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1760121032; bh=ZOZnVWbV81iSXnE0N2FIQPShPP0gpWUpU8VYEUonzrs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=K7WA4es9SynWyANpqnqALfOUgPoQ6uML85h6viExq4n23365KY2PRssrh5M6AqSJR YGCdBtQdoYaCfnMX+nTFvkpqQVuPVm9QqenbOR5jA9ljOHVrB9tLLLnjkDisBOM9GU EIwWD5+GVOhgF6PmE4Q6e0MQMvUrV6jQYdQkN972tFI25gaRSXn6ffuG62UiEtd6X9 iVzrW139Tr+Pobrtuipb1JgVpkFO+YAefhggCiKD+JLz+/TYeEwn8uruwxzcb9Wmez ZOT+02GDcuQS2n8G+8mZNXW2LjIJ5hGvXp22SwnWDyBn5t2PJSuS51e+9Bhj+VGsjA M7tzh6PN6uglQ== From: SeongJae Park To: Joshua Hahn Cc: SeongJae Park , Andrew Morton , Chris Mason , Kiryl Shutsemau , "Liam R. Howlett" , Brendan Jackman , David Hildenbrand , Johannes Weiner , Lorenzo Stoakes , Michal Hocko , Mike Rapoport , Suren Baghdasaryan , Vlastimil Babka , Zi Yan , linux-kernel@vger.kernel.org, linux-mm@kvack.org, kernel-team@meta.com Subject: Re: [PATCH v3 1/3] mm/page_alloc/vmstat: Simplify refresh_cpu_vm_stats change detection Date: Fri, 10 Oct 2025 11:30:29 -0700 Message-Id: <20251010183029.68434-1-sj@kernel.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20251002204636.4016712-2-joshua.hahnjy@gmail.com> References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit On Thu, 2 Oct 2025 13:46:31 -0700 Joshua Hahn wrote: > Currently, refresh_cpu_vm_stats returns an int, indicating how many > changes were made during its updates. Using this information, callers > like vmstat_update can heuristically determine if more work will be done > in the future. > > However, all of refresh_cpu_vm_stats's callers either (a) ignore the > result, only caring about performing the updates, or (b) only care about > whether changes were made, but not *how many* changes were made. > > Simplify the code by returning a bool instead to indicate if updates > were made. > > In addition, simplify fold_diff and decay_pcp_high to return a bool > for the same reason. > > Signed-off-by: Joshua Hahn Reviewed-by: SeongJae Park Thanks, SJ [...]