Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp585729lqs; Thu, 13 Jun 2024 22:03:49 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVnL3Oq8Vfqhn/sXYwcH9kWKUqSVJY1mfHvqYETrvFbVVlnbkPD1xFH0E/Ed8Awfdk8WdHxWFf3paXzt34C0Ew7e5N22c8dqPFsRPYMzA== X-Google-Smtp-Source: AGHT+IEAsbt0EcJWU38qWzF3buD2hAroy/osIHayZOVWnLx2TxhIrtNLLhF8L2n2Vm/5TDPI1ber X-Received: by 2002:a0c:e843:0:b0:6ab:6bf8:e0f7 with SMTP id 6a1803df08f44-6b2afc7928amr19458706d6.11.1718341429050; Thu, 13 Jun 2024 22:03:49 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718341429; cv=pass; d=google.com; s=arc-20160816; b=uLnWSiUzVSXXSaUGF6y9epubx//ew/U2ghbP5BKjQvgEfH/hI3Zv1rh4v6Xql3eR7A miumZWnywmiHv0t55QmM5BjTUF+F52T6nxwJzwjV7J12Lj3BcFQtdNu7R3UIOPZfTEKh KPHl4FcvDClurWN/FqXX3cdWQ1BTU+8TPQCHzFGfmLrfUI7kbzzQvYQZS4fqP7AHc6Eb 5gCOyGc+omWErM36GnbGxQFdPzG1rPatRQZMjTr/OiTgyuRDmAj8/jcK6qmO2kfcWjLm VMYcZ7+rW+pwgOcGzaF9selDkwY1axodDUdLLP130nMTmV/F09gqjmpPJpap3U4ChLWB ygiQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to:subject :user-agent:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:date:message-id:dkim-signature; bh=mQK9TcRk5CAg8ht/5H2KpfQR0Jq0zPNlh/9xoAZV1ak=; fh=AvoKmyM5qoFGflqAh9tmpHWY5ni258n1377kxhdsFxw=; b=NJffBnt9QpoFkNFUsilA0pXC2wxAr9uelPeN41P57+hAoYQkfg3diwVmQbTfKFDT8f u/l44yqZOVmmH7sORxNrcJ5VvycepTyP9MNP4pXQsgT7CbXqkhtErVh8K8PBki36uoKJ bDxYkzyC3eM37wYlz1ForY5Y87GLQIdt4C/Umd9FG5Gk/VKEzTFwTuhSXY7n4WdUNCVQ kg0NZ0QCid2U4OJNA0tYLMhppRGRyeKa0Ix/XMKIUy5ztwPI0wJLyagvot/ZAaM6G2eD qxJj8+fIgWypj+QIM6GWKIQ6+1LCbm+v2HtHrQTlPGtXWLM9v/gpGVPVWMoTXqOa3vpn epOQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.alibaba.com header.s=default header.b=JlpOopHK; arc=pass (i=1 spf=pass spfdomain=linux.alibaba.com dkim=pass dkdomain=linux.alibaba.com dmarc=pass fromdomain=linux.alibaba.com); spf=pass (google.com: domain of linux-kernel+bounces-214348-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-214348-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.alibaba.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id 6a1803df08f44-6b2a5b57c8esi30934516d6.424.2024.06.13.22.03.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 22:03:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-214348-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.alibaba.com header.s=default header.b=JlpOopHK; arc=pass (i=1 spf=pass spfdomain=linux.alibaba.com dkim=pass dkdomain=linux.alibaba.com dmarc=pass fromdomain=linux.alibaba.com); spf=pass (google.com: domain of linux-kernel+bounces-214348-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-214348-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.alibaba.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 BBEAE1C21A62 for ; Fri, 14 Jun 2024 05:03:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 23F79145B21; Fri, 14 Jun 2024 05:03:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b="JlpOopHK" Received: from out30-124.freemail.mail.aliyun.com (out30-124.freemail.mail.aliyun.com [115.124.30.124]) (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 CCD5713CF9E for ; Fri, 14 Jun 2024 05:03:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=115.124.30.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718341422; cv=none; b=pAxfpWdlgRJWMFMpAZkF+wVKjE2er6A4qUO9cSXwsAvEINPDSAIzHesKPz5JwV2JvgZpdaYB/Qw5TXtIH+cUiorMVEMgttJWSX3ZsVo0+9vMnTCIVTO2G13qnCVY+jFyH4c0FX2LlfPUUIUCwUBjZMzh2wpGpa04LFIMQ+4KTGo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718341422; c=relaxed/simple; bh=gzvlcPNZRXxsDB5LT29ch3OrbR0P2jmitQfMhGPzIt8=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=V4b6n/sfkzqCkM9mYesHXKhokrL1VHkc+62DoR8j97jWgJDZ9ShwoZvQoKk3z7eZj9B5TuNqVG+x46QrJiZb0MHR6D8OTKu11wm6SfxCzx4d6dRYFhOhZ2oC8JTqPXBbe3bAyuidOqCk/k0wq6UyeXXUnDJNtNkCctyMmxMYlwE= 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=JlpOopHK; arc=none smtp.client-ip=115.124.30.124 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 DKIM-Signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.alibaba.com; s=default; t=1718341410; h=Message-ID:Date:MIME-Version:Subject:To:From:Content-Type; bh=mQK9TcRk5CAg8ht/5H2KpfQR0Jq0zPNlh/9xoAZV1ak=; b=JlpOopHKZ/RXRTp2lAaH/b+SPjlEkxqtNKi/9AxUTmfrK4me/T6umtPqakrd6cXf5kl3dRR06LOZe6coUCvOFnbHHOnpLB9aS2emNKeIEFiSAwTBpDHqS2HmoHDsAZlMcr4LU/Ajx9MqwXc+w2amb9E7Lnr0ghYtasyAmESmAwU= X-Alimail-AntiSpam:AC=PASS;BC=-1|-1;BR=01201311R111e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=maildocker-contentspam033037067109;MF=baolin.wang@linux.alibaba.com;NM=1;PH=DS;RN=12;SR=0;TI=SMTPD_---0W8Q.rcN_1718341408; Received: from 30.97.56.56(mailfrom:baolin.wang@linux.alibaba.com fp:SMTPD_---0W8Q.rcN_1718341408) by smtp.aliyun-inc.com; Fri, 14 Jun 2024 13:03:29 +0800 Message-ID: <58681eb0-cf36-4aa2-906e-a1a8daa2b969@linux.alibaba.com> Date: Fri, 14 Jun 2024 13:03:27 +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] mm: shmem: fix getting incorrect lruvec when replacing a shmem folio To: Matthew Wilcox 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 References: <5ab860d8ee987955e917748f9d6da525d3b52690.1718326003.git.baolin.wang@linux.alibaba.com> From: Baolin Wang In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2024/6/14 11:22, Matthew Wilcox wrote: > 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. Sure. This sentence seems less helpful. Will do in v3.