From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out30-111.freemail.mail.aliyun.com (out30-111.freemail.mail.aliyun.com [115.124.30.111]) (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 3B6752595 for ; Tue, 14 Jan 2025 02:55:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=115.124.30.111 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736823364; cv=none; b=dD6nsRak+BcNqx6v7PpmAuH4zbdIS1KJVUHr+F6rsXXFWvhh5tpxQz23cXuUaehqpiaiCcBo6cOY8kfOuJkoyE49xQf+RJXKmFlGE773trvvSRb0mHkW7l0q8Shm2iw2eAKTpt0OFwCA2RC/4INMysMwv7dcf1Cc9/08YP8Gf7A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736823364; c=relaxed/simple; bh=7ac8kLZ0ocoHxi1E+5PchhhcWEfdde3RExrwREBfYLY=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=K9e5tEo+XXoaU0QcnCMJJKrqFs7c30/Ge5zXS87+/seKC2GF6T6O16b18YV9mBhpzTNMCragY28SkZV4ZRXWOH5ummVX5n2xHZG7jtneemGmZwFzTL51ClLDVhrzzKFv1CRR0WJspEB7PNc5/BRyfq04na4pKJ0lDEXXU3lS98s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com; spf=pass smtp.mailfrom=linux.alibaba.com; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b=xKc43jpS; arc=none smtp.client-ip=115.124.30.111 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b="xKc43jpS" DKIM-Signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.alibaba.com; s=default; t=1736823357; h=Message-ID:Date:MIME-Version:Subject:To:From:Content-Type; bh=IjVJp/Tn6fX3LEf8wmhADih2F2lTUv2YGcfXrVdHbPI=; b=xKc43jpSjQOY23+BGlHhUxgLxTSgC1hpJYQ7V22o6AkwzILClGNJVlTUP7YQcLSNmFO2vSgU/Dpgu1/l0y/52ZGAedhdFlsOC0QbWipJj2sX00KoNrEV3rrnGOlz+j2EPoM68Q3bIQldl4FlaCLqt+ak8ZnzxT3lt/2TVm1FmQk= Received: from 30.74.144.113(mailfrom:baolin.wang@linux.alibaba.com fp:SMTPD_---0WNd8Wfg_1736823354 cluster:ay36) by smtp.aliyun-inc.com; Tue, 14 Jan 2025 10:55:55 +0800 Message-ID: <21fa516b-8828-40c5-b5cb-d97cdf01f0f2@linux.alibaba.com> Date: Tue, 14 Jan 2025 10:55:53 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 1/4] mm: Set folio swapbacked iff folios are dirty in try_to_unmap_one To: Barry Song <21cnbao@gmail.com>, akpm@linux-foundation.org, linux-mm@kvack.org Cc: chrisl@kernel.org, david@redhat.com, ioworker0@gmail.com, kasong@tencent.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, ryan.roberts@arm.com, v-songbaohua@oppo.com, x86@kernel.org, linux-riscv@lists.infradead.org, ying.huang@intel.com, zhengtangquan@oppo.com, lorenzo.stoakes@oracle.com References: <20250113033901.68951-1-21cnbao@gmail.com> <20250113033901.68951-2-21cnbao@gmail.com> From: Baolin Wang In-Reply-To: <20250113033901.68951-2-21cnbao@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2025/1/13 11:38, Barry Song wrote: > From: Barry Song > > The refcount may be temporarily or long-term increased, but this does > not change the fundamental nature of the folio already being lazy- > freed. Therefore, we only reset 'swapbacked' when we are certain the > folio is dirty and not droppable. > > Suggested-by: David Hildenbrand > Signed-off-by: Barry Song LGTM. Feel free to add: Reviewed-by: Baolin Wang