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 EAC4F7478 for ; Sat, 9 May 2026 00:08:55 +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=1778285336; cv=none; b=R0fwcGzQkyfhiU+jcX1e37oy8MLCSyIvlatYC/3/gYSOi4DLloGJ4Vrn0GteoKDV7xU6iSW0DyGNJ8j7ILI4paWteCazozGb7M5zTvWbCsoTC11mKpTxs61EwTcMBu8SQl578QwVDIp0DG7mxUYZZzFQuvSdOu2t/u1+3+4X3rc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778285336; c=relaxed/simple; bh=WW8aGjdZxQ2AkRvGAOjj3tjy79NbyCNFBA/cjvxOX8k=; h=Date:From:To:Cc:Subject:Message-Id:In-Reply-To:References: Mime-Version:Content-Type; b=MTZLvMGI6h5wxmM6DpdgyntiXJddgAuq+zxZ6Zzp0JI6mN3l1rGZ78mrm6fr0vql6415a0lR7QzkxMD1i/ipIMcquLYq33tUBJ/DM9XkA3RY5R7Up3dpZbP36chGnDzAMlrWDElD/7iv6N//5fghAeAoWjElkerVLSXu9s0tQAA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=wlGlqUAM; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="wlGlqUAM" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 643D5C2BCB0; Sat, 9 May 2026 00:08:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1778285335; bh=WW8aGjdZxQ2AkRvGAOjj3tjy79NbyCNFBA/cjvxOX8k=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=wlGlqUAM3BObcA2vsK5XlY/RqKam2AqHd9ge7408RqhKjxibWBdmA8HFtNgzVp9xt nLgSla8IvBWb9UxR2GyITRirdKl4DANnwlj4PBEeAOeFEisHCYTh+JwkIRsbfVMDnN vX5sfeJDPBlHvKvJjFuDgBpC7Iglxmo91qNkoISQ= Date: Fri, 8 May 2026 17:08:54 -0700 From: Andrew Morton To: Miaohe Lin Cc: Ye Liu , Ye Liu , Naoya Horiguchi , , Subject: Re: [PATCH 2/2] mm/memory-failure: use bool for forcekill state Message-Id: <20260508170854.a845bd71e7ebd5d2f6927fcb@linux-foundation.org> In-Reply-To: <9d022499-2a77-f8c6-b86d-d9de838fac32@huawei.com> References: <20260407020715.2269255-1-ye.liu@linux.dev> <20260407020715.2269255-3-ye.liu@linux.dev> <9d022499-2a77-f8c6-b86d-d9de838fac32@huawei.com> X-Mailer: Sylpheed 3.8.0beta1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) 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-Transfer-Encoding: 7bit On Fri, 10 Apr 2026 14:45:47 +0800 Miaohe Lin wrote: > On 2026/4/7 10:07, Ye Liu wrote: > > From: Ye Liu > > > > 'forcekill' is used as a boolean flag to control whether > > processes should be forcibly killed. It is only assigned > > from boolean expressions and never used in arithmetic or > > bitmask operations. > > > > Convert it from int to bool. > > > > No functional change intended. > > > > Signed-off-by: Ye Liu > > --- > > mm/memory-failure.c | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/mm/memory-failure.c b/mm/memory-failure.c > > index d25adb390c3e..f355642bc2b6 100644 > > --- a/mm/memory-failure.c > > +++ b/mm/memory-failure.c > > @@ -459,7 +459,7 @@ void add_to_kill_ksm(struct task_struct *tsk, const struct page *p, > > * Only do anything when FORCEKILL is set, otherwise just free the > > * list (this is used for clean pages which do not need killing) > > */ > > -static void kill_procs(struct list_head *to_kill, int forcekill, > > +static void kill_procs(struct list_head *to_kill, bool forcekill, > > unsigned long pfn, int flags) > > { > > struct to_kill *tk, *next; > > @@ -1582,7 +1582,7 @@ static bool hwpoison_user_mappings(struct folio *folio, struct page *p, > > { > > LIST_HEAD(tokill); > > bool unmap_success; > > - int forcekill; > > + bool forcekill; > > bool mlocked = folio_test_mlocked(folio); > > There is one caller in unmap_and_kill(): > kill_procs(to_kill, flags & MF_MUST_KILL, pfn, flags); > > It seems flags & MF_MUST_KILL does not return bool. So maybe we should change it > to clear semantic conversion? AI review was wondering the same thing ;) And possibly a changelog glitch. https://sashiko.dev/#/patchset/20260407020715.2269255-2-ye.liu@linux.dev