Received: by 2002:a05:7208:3003:b0:81:def:69cd with SMTP id f3csp564900rba; Wed, 27 Mar 2024 05:25:41 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVA6jwXHFTfk0vVTze59HnkdyLoO/wnm2tuXMRcA9CqcBn8Cf/Gus6sxx9+AeCmY8/znB4oaqsTOoVe45GwkeqNpNunwT+elu+0X842WQ== X-Google-Smtp-Source: AGHT+IGhe5h+MR4INE85Yc6CgQukM0WnEPsbVTcd0dzQ5fdJqVSZOMvFACr3FTjUa26aoQwDLzUb X-Received: by 2002:a17:906:28d7:b0:a47:1d01:bb8f with SMTP id p23-20020a17090628d700b00a471d01bb8fmr654667ejd.31.1711542341623; Wed, 27 Mar 2024 05:25:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711542341; cv=pass; d=google.com; s=arc-20160816; b=TXS6P2Qry2qkvW/n+VR5JkmnT1HL7A410P5QrcVDzLO8PqNJFpk6xbdDdtXdEj093r Rq8jaBbRr1k9MYz3iookz7OVfjb7TEm4rlR8CmoEtQp27iRlDhSryKmv+unYGT7R4Y0/ Toeq/VHLrNTj2vTURg0fgUjB3zPHTxVR/IFtXGChQdhzFH9hXEC2mOMZiqbTyM2BVsil VLIPwO/DEDQK0nqbAfGAoehek59C8u0dr0pM7SYt/FLZzJl605f+VuMbeQU9J8E9+If9 2qA9Jp19YlIZJaKbYmzdgO2xWL9iA1qlkUCMta4ZBTkS+5ZJULfEIZFrRO3KkKOfvXIA FNUg== 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=WStYxaWmdcAd0EHdZG7F8WzduUaXJH+PLdTWTFJ9Was=; fh=pgREpYW7DWYl8QtMnMuZMP9fu25KdtnLnLQya1DAiqc=; b=pL45+CqUfoRDH+rosptJqe9dCJ7VxpKVBhHibnzpgrM9D/j2OURiEnAB0BKLGJaIjK khQj/1PKDahksff5HQfJNWDNtGBf/CRm9bj+uE5Pgl9IpJrK5ILSLbR5IHpO4lHb07ID I6uIInPpfbxOT6hOoKceWLdDasGGstqnx1vi3bKa2nhmlgNDGqb3pqeC2yx1SY8W+n3d tffVw+SnMaPm2enmNx+ZTc4OTafOjag+Kvjs1AtI8Vgz1gR8gPdC3lAYpft9Agny62Gq BrrIJJjNB//t1jvhoUD54AuUzjry4ybCHtR01oCVeul+tOLtCNe/HzY433ffLIRc1MsE y+jA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=rF1gxh5g; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-120863-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-120863-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id qk13-20020a1709077f8d00b00a4652a15dedsi4520907ejc.603.2024.03.27.05.25.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 05:25:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-120863-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=rF1gxh5g; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-120863-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-120863-linux.lists.archive=gmail.com@vger.kernel.org" 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 61F721F31DD4 for ; Wed, 27 Mar 2024 12:25:41 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A454B13FD63; Wed, 27 Mar 2024 12:10:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="rF1gxh5g" Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) (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 3D7F813F445 for ; Wed, 27 Mar 2024 12:10:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.50.34 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711541421; cv=none; b=tBlUuo73LhYi6mpv/mrZPwbDwAb2oMtUexdwQ1vZKcPOLSDitGUVloSx3OVal5XU3pnCdcYLFsTXkQGVpAS5AgKLZzFW1gkVZ1BTc4jpEtjt8HwA2mTCkB5owb45pGogc3ERTi2HlIU0IM+PKS0Nda3U+MM1vH+VZzAAzutRUJU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711541421; c=relaxed/simple; bh=T2jvMXTe1SOLfEanpTmPTf4uFqXpkG3tnrz2T0d3HLg=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=h5q8tvxGnC2Br9vAYjOuSttEkUkmGpUuizpp10ZvpDCvGyduC+jtyubuLx66Tx+FDLZDX/fsjPZ1FAQ5sEPEUKnsWYhM4csNahlW1RyspI8uy87KogvAd8AyDhhc/ixtgcvwkooUUzkbewEB4xiEESRED+Rl6BrkQHPB603b3zc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=rF1gxh5g; arc=none smtp.client-ip=90.155.50.34 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=WStYxaWmdcAd0EHdZG7F8WzduUaXJH+PLdTWTFJ9Was=; b=rF1gxh5geKNCFhMxyw1MJ6ZYRi XSYU32Cju0TUtaZK/8AUtAXqCfpPT5DCMbGbZY6EuHenzsaWIwA7vRY6OWkWpEjRpp4g5eFBY+l5p k+U678aYExmKK+QIJ+fUZGMHZuvMkGTFuDsA19ladr17nHufjRzQVSy1MwJ+Iv3o4XB5wvBmrcUDd e/6wCnJuLUiKH4lDwbnBioVxD3tFXOd7UQUiVA6Yu1ChvQ5rmT7ZY24LJH0dv7sVptOogsRs2mYhv z6IdmbsABmiFpvXjZ0JaOtzwViy9Hud8tjb6+V4Y5QScWR9tLBPcTIJsRYas2NrWDdUp+VxcWQ+ng UXuwnJKg==; Received: from willy by casper.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1rpS6Z-00000003nvt-482Q; Wed, 27 Mar 2024 12:10:08 +0000 Date: Wed, 27 Mar 2024 12:10:07 +0000 From: Matthew Wilcox To: "zhaoyang.huang" Cc: Andrew Morton , Christoph Hellwig , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Zhaoyang Huang , steve.kang@unisoc.com Subject: Re: [PATCH] mm: get the folio's refcnt before clear PG_lru in folio_isolate_lru Message-ID: References: <20240327075516.1367097-1-zhaoyang.huang@unisoc.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: <20240327075516.1367097-1-zhaoyang.huang@unisoc.com> On Wed, Mar 27, 2024 at 03:55:16PM +0800, zhaoyang.huang wrote: > From: Zhaoyang Huang > > Bellowing race happens when the caller of folio_isolate_lru rely on the > refcnt of page cache. Moving folio_get ahead of folio_test_clear_lru to > make it more robust. No, as explained to you multiple times before.