Received: by 2002:ab2:60d1:0:b0:1f7:5705:b850 with SMTP id i17csp1131190lqm; Thu, 2 May 2024 06:18:38 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXyyC7G5/cBHFYTuvhQoIeDn7MkSfQIBBk7l5OgdRUlas3e+QGzwsZRjKlKkuFwkSD59kpKYi+jD4hBO63rLfxcIbH3nkuA2kkS8Pb/ug== X-Google-Smtp-Source: AGHT+IEH+swToovlslnrVMkIaI0Fela4PX1SYVTSoxKjWR7tNEFdFGwGI4yJJJ112w9BpB8ybiZp X-Received: by 2002:ac8:5a4b:0:b0:43a:beea:5803 with SMTP id o11-20020ac85a4b000000b0043abeea5803mr5353212qta.50.1714655918573; Thu, 02 May 2024 06:18:38 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714655918; cv=pass; d=google.com; s=arc-20160816; b=Q7u4r3MWs38l8uWDml/oJ0FHCYw0rQmmxNuUTD1G/u+Cw24A3I8sVCHMHfvlAqR1yu VfFB77ShIR9yvajPaAQSL6TqKdA82X5qpPS1a31UzdKGvrx8PBVX17I5VRUPgPZhuJUv 596eXx4SePySL9Yo5CpgM2X3Fz/39cEjyT/gU1COOLRYOfQm7FjE1DdA+GTkW2YcLqT8 ch0DrLPMPqNwRMZguLc89ADN8h84zQK6V8eRj/Iw6yMx+e3hiJpgl/OwtSwa7edWI6iR GxF41L+gp1505py0nV3r4co5kukgcZ2Jaj+Q7GtPETDyHngjuuOQdH+hQXwltw3nd6cy hwdw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=XN99BF71thSSfY5SqQDfuMkL/hrnNQt2dqkH+sfTj0o=; fh=Qn+wDzYvdSP15AtjWwJm7eptSNJHFFWsxnzjKNUevlM=; b=pmnjBFnsqJLIf0jSysY/WgLSQVmoadIDVKWJAeRHPKRj86ibzsL7PcbmHZ8L1lLAZ5 i4JS3IwCm2Od6Yj65LKQ3P1iyJfNohnEZSBYPAFiIWH5KBy+Wcmg/R22lMSO5L6OXpFe 7kjTluyCUyU7ia6k2k3eALbK08mVY6iGg/h2yuNSeyNGu/XAGGP/hD1lR/kcIo1ir+nn Ik58eQCJYmDBMmMWJrRrRrxs+7xU/PUg81DLQ05kPSoyRqLEUNXTKEM2UY/6mpX+2lNy CoLBHyCpBwgLYOTLwQpbszK+M2WMdgzHXg4eEq7vSNorVB5rFBrCQZSWsKB5CtInB4ex Gu4g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=DHXEplGZ; arc=pass (i=1 spf=pass spfdomain=linux.ibm.com dkim=pass dkdomain=ibm.com dmarc=pass fromdomain=linux.ibm.com); spf=pass (google.com: domain of linux-kernel+bounces-166497-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-166497-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id m3-20020a05622a118300b0043af8fa1328si949239qtk.472.2024.05.02.06.18.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 May 2024 06:18:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-166497-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=DHXEplGZ; arc=pass (i=1 spf=pass spfdomain=linux.ibm.com dkim=pass dkdomain=ibm.com dmarc=pass fromdomain=linux.ibm.com); spf=pass (google.com: domain of linux-kernel+bounces-166497-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-166497-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 4DDBD1C21049 for ; Thu, 2 May 2024 13:18:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DC03084A4A; Thu, 2 May 2024 13:18:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b="DHXEplGZ" Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (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 773FEC8F3; Thu, 2 May 2024 13:18:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.163.156.1 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714655912; cv=none; b=tjAi5Dv0zUdh/0zkDen+HwWWBOfTbNacXk3V9EV5+8sCNpbKsGjEFwgrTWZhKek0OcHpNKXlI2jnveJHbbkmJqMQOytbdFe2uxdDinK2OOQI0ZhTTmeoLkGXIje8KJN7fyBT9qSsSUIYf6ZtRtgn9ytsxJXLtHhydK4HfHjI2zQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714655912; c=relaxed/simple; bh=Bpw6E9degoi8gZxzY0FT2XijVicqw22P7pA9Yn93K4Q=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=YKrGOU3Cxk7WeIl3P+2ToGA2O3Qf4eD2Flzl+mG+lQvLcSj9gUSYR7ky83Thnp5tqr2LZhY9hBPiQhuYwUQZu2pdDONnm/4Beb1WEOhhzVGpVHMwtRLJMigHMS3nxkgj/qfNwhIWZJHfqXIv6Y91SKYmYk2wOBQycDTaSfU+qaI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com; spf=pass smtp.mailfrom=linux.ibm.com; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b=DHXEplGZ; arc=none smtp.client-ip=148.163.156.1 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.ibm.com Received: from pps.filterd (m0353729.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 442Cv9LJ029749; Thu, 2 May 2024 13:18:15 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=pp1; bh=XN99BF71thSSfY5SqQDfuMkL/hrnNQt2dqkH+sfTj0o=; b=DHXEplGZp8ioVYGbxto3cHIrNbtkQtbgZ69TPO1EY+gOzkpUe0PM1anwWjrkg4j0R11a +C65LwsOt8WD+1Sc4KXksTzPM8jWm44QxSgnmekpykUJ/bfXaGbJow810I6ROEdHRYZS FZVWzmsOlSk25ZriqurIieEFkI9YTgGmrAo6JGfVxzLsG1F/Li2q4Dr0pBHfo0iE0eA9 AQAPWat0P5PZniLPh9rFW5DfbUaqNNJzbWC2XdP+xk0SvPK2/bqAE3E2pWMVLoyeY255 GBTVR4RbxgUU6gTGeCpolYkg1QX8lVQAUnJxBtENnO0og3j56uEz4zfBxfAyN9VM6aRf Mw== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3xvb9mr30n-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 02 May 2024 13:18:15 +0000 Received: from m0353729.ppops.net (m0353729.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 442DDQ0U028210; Thu, 2 May 2024 13:18:14 GMT Received: from ppma12.dal12v.mail.ibm.com (dc.9e.1632.ip4.static.sl-reverse.com [50.22.158.220]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3xvb9mr30k-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 02 May 2024 13:18:14 +0000 Received: from pps.filterd (ppma12.dal12v.mail.ibm.com [127.0.0.1]) by ppma12.dal12v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 442AnYYc001450; Thu, 2 May 2024 13:18:13 GMT Received: from smtprelay02.fra02v.mail.ibm.com ([9.218.2.226]) by ppma12.dal12v.mail.ibm.com (PPS) with ESMTPS id 3xsbpu8bj0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 02 May 2024 13:18:13 +0000 Received: from smtpav02.fra02v.mail.ibm.com (smtpav02.fra02v.mail.ibm.com [10.20.54.101]) by smtprelay02.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 442DIA9w51446098 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 2 May 2024 13:18:12 GMT Received: from smtpav02.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id DF0F220040; Thu, 2 May 2024 13:18:09 +0000 (GMT) Received: from smtpav02.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A1E062004E; Thu, 2 May 2024 13:18:09 +0000 (GMT) Received: from li-008a6a4c-3549-11b2-a85c-c5cc2836eea2.ibm.com (unknown [9.155.204.135]) by smtpav02.fra02v.mail.ibm.com (Postfix) with ESMTPS; Thu, 2 May 2024 13:18:09 +0000 (GMT) Date: Thu, 2 May 2024 15:18:08 +0200 From: Alexander Gordeev To: Zi Yan Cc: Andrew Morton , linux-mm@kvack.org, "Matthew Wilcox (Oracle)" , Yang Shi , Ryan Roberts , Barry Song <21cnbao@gmail.com>, David Hildenbrand , Lance Yang , linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org Subject: Re: [PATCH v5] mm/rmap: do not add fully unmapped large folio to deferred split list Message-ID: References: <20240426190253.541419-1-zi.yan@sent.com> <5FAD7FB6-4AC0-4427-B56E-4942A95DB68C@nvidia.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=us-ascii Content-Disposition: inline In-Reply-To: <5FAD7FB6-4AC0-4427-B56E-4942A95DB68C@nvidia.com> X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: BhJXFo5jULS1X6MGd4EQvaIkCzsPI8zC X-Proofpoint-GUID: 1BuLqmGV0xhRbwjDw_Q2SRtfZ5-i6DOQ X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1011,Hydra:6.0.650,FMLib:17.11.176.26 definitions=2024-05-02_02,2024-05-02_02,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 priorityscore=1501 bulkscore=0 adultscore=0 mlxscore=0 phishscore=0 spamscore=0 clxscore=1015 malwarescore=0 mlxlogscore=999 impostorscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2404010000 definitions=main-2405020085 On Wed, May 01, 2024 at 09:38:24AM -0400, Zi Yan wrote: Hi Zi, > @@ -1557,9 +1557,8 @@ static __always_inline void __folio_remove_rmap(struct folio *folio, > * page of the folio is unmapped and at least one page > * is still mapped. > */ > - if (folio_test_anon(folio) && > - list_empty(&folio->_deferred_list) && > - partially_mapped) > + if (folio_test_anon(folio) && partially_mapped && > + list_empty(&folio->_deferred_list)) > deferred_split_folio(folio); > } That helps. > Best Regards, > Yan, Zi Thanks!