Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp630278lqs; Fri, 14 Jun 2024 00:11:57 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVp0Q7MIuHTYTnAEqZyucqyn6x0yrgRwFsXwI7G1hxZeQzabmbcIGASBbyDkkeE5qntBThrqJ48mt9r6XW7eCbjenV9EVUVaWwW8yM9HA== X-Google-Smtp-Source: AGHT+IH53yKUy7xNfIXybzRTMMvifQdtlV12QmYG1becIcvTCmhb+TMs7RQsGGSXcgOsVRdWmX0m X-Received: by 2002:a05:6358:60ca:b0:183:d2fa:ff5c with SMTP id e5c5f4694b2df-19fa9e3ed22mr251059655d.12.1718349116724; Fri, 14 Jun 2024 00:11:56 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718349116; cv=pass; d=google.com; s=arc-20160816; b=j2/1eJ3nm89DRekBnZRaohng971pVmVUMmt8dSa5Riat8A8yI7YAsC2WkDC7lIPXtZ RyBXRuOI3daMUT1SFqJ3oXH0mIobnGJUonhufJppuWdvN8s4u2/jxVo1Q3QErOp+T8Z4 n1mT/G1jPY5bqDd9pfwo3pRD58PnCo5C03tYHBeFSIDQzECft4xeYPsNXgdzbu8BDdgL 5TINUOzmR4/2YHkaq1XPiracS9yFSp3D7zWeQLsT7SwUrUCfhBMPSM7te70NJBcFXC41 OXc1X5k6+XEe3QAMo03RUcbDFT+kTnWWihZE7AK+0JDJifrZiX0DNmDLhCecxw2mfVmx nYpA== 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=WC+OS8tP73IzC9fklby77PSdBXo2i/N8oh9tXyRadYk=; fh=qFxWOz6PFbvH3tdFo6yfrykBiTyMd9nVOgDPmcss4b8=; b=GjtdqB/uz7Rs85J1IDSfjl2tGPOb5UvrWIXB4jlY9ffUSIT5CvyAq7fS856BLOwYQT Aq5Nypm68mVuB7xxl4Ei28H2tDW4DAkWWVG5r85b//tgHsa9Qf//FEN4SEb3gYB5gBO4 pMSgrnXgHOwHofeX3G7uA9T/uyjUKjRRRlN7zyXH4c/a4ykpCaceZru7sc1P0WEHGcCM Or3JCT+cuwN32/oyZe8o+0m5OIZjfTLybd2TAlkOAR087dh6oDbZGlGNQO42TljdGXsN At1QabiA5CamImUO1soMLxKjoNpsQzUKediYsn1AAilqRMl4VdDgGX+reQuZrI4gZkOK a2OQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=QJ9FO89Q; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-214299-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-214299-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 41be03b00d2f7-6fee5c3dac4si2873802a12.776.2024.06.14.00.11.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Jun 2024 00:11:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-214299-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=QJ9FO89Q; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-214299-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-214299-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 27E7C2842AD for ; Fri, 14 Jun 2024 03:22:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A5D6C1E4BE; Fri, 14 Jun 2024 03:22:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="QJ9FO89Q" 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 33DEA19D8A5 for ; Fri, 14 Jun 2024 03:22:21 +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=1718335343; cv=none; b=RpkO1fv//lckqWo9zretwAZbhIPURei78kFioqd3jIHD3V/GHvomcjD6kMT5fPZK/5ndSwDdAbIfkADYzOwjMg51BpIO5g6ITLHSZSZ0K02m2E39rsn0mMXdeE/OjjSufWaF2CcKZf0RhOrKxiB80FgzJ6MlWL1f2NqztGylNQw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718335343; c=relaxed/simple; bh=aAG5WkabnWljBhObPT99xr8j+f8JhtWaGALckcX6W98=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=gkX76Zuw4nEy9RYrdag/uCH+m16Ln63wGBPrCguUK+GPs/DZnxtw59VwVDWU+GqYtXcM41i2dNh3q/twisAxRMna2s+3jIAQjfNh3o3dTe8jfqYFMNqanCSBFQa2ENWuGX5fJT0E+1DN8+c83oh3cAfJwR17L3Lsg6lfx0Tn0gU= 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=QJ9FO89Q; 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=WC+OS8tP73IzC9fklby77PSdBXo2i/N8oh9tXyRadYk=; b=QJ9FO89QDAgII0sbVpbQTVCGAO g5Mshs6nS0CQ3O1tfNPcooP17fejBeSapIRJr8ELGdpjJyi3WAdiENCOtulbG6nwLO2YnI+ncOCOF C3bMAS7a5AwLZ1xW9+maUlu91qoac1tc2MtgrImMSfJU1cHc810foyuJSF3uqXHc0irkCY16BW9GE MD2PWCMv9V2V+aU4cPB4RSG/PYEXFnQZUmgzLivgO5Aj07Os1TRt1iz9xfeXGhmQ4wK05rZ9WfOen XF1v22kHhlhnLyQHYF5b6jQdBcgrWU2uiBw3R7LDy1yV8xxdQvnMnIukD+ANjeor7BmeBRMhPiXbU kGg2dj/Q==; Received: from willy by casper.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1sHxVx-0000000GWuH-1daT; Fri, 14 Jun 2024 03:22:09 +0000 Date: Fri, 14 Jun 2024 04:22:09 +0100 From: Matthew Wilcox To: Baolin Wang Cc: akpm@linux-foundation.org, hughd@google.com, mhocko@kernel.org, roman.gushchin@linux.dev, shakeel.butt@linux.dev, muchun.song@linux.dev, hannes@cmpxchg.org, nphamcs@gmail.com, yosryahmed@google.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] mm: shmem: fix getting incorrect lruvec when replacing a shmem folio Message-ID: References: <5ab860d8ee987955e917748f9d6da525d3b52690.1718326003.git.baolin.wang@linux.alibaba.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: <5ab860d8ee987955e917748f9d6da525d3b52690.1718326003.git.baolin.wang@linux.alibaba.com> On Fri, Jun 14, 2024 at 08:49:13AM +0800, Baolin Wang wrote: > * Charge @new as a replacement folio for @old. @old will > - * be uncharged upon free. This is only used by the page cache > - * (in replace_page_cache_folio()). > + * be uncharged upon free. This is used by the page cache > + * and shmem (in replace_page_cache_folio() and > + * shmem_replace_folio()). Please just delete this sentence. Functions do not keep track of who their callers are.