diff mbox series

0001-mm-rmap-Correct-stats-calulation-in-__folio_remove_r

Message ID 7369acecbf91db58e8c539678867170b5eef13e3.f5a34363.12c5.4c20.b839.0ef7c6407444@feishu.cn (mailing list archive)
State New
Headers show
Series 0001-mm-rmap-Correct-stats-calulation-in-__folio_remove_r | expand

Commit Message

史思远 June 14, 2024, 7:52 a.m. UTC
Dear mm maintainers,

This patch fixes wrong stats calulation in __folio_remove_rmap().


BRs,
Stephen

声明:这封邮件只允许文件接收者阅读,有很高的机密性要求。禁止其他人使用、打开、复制或转发里面的任何内容。如果本邮件错误地发给了你,请联系邮件发出者并删除这个文件。机密及法律的特权并不因为误发邮件而放弃或丧失。任何提出的观点或意见只属于作者的个人见解,并不一定代表本公司。
Disclaimer: This email is intended to be read only by the designated recipient of the document and has high confidentiality requirements. Anyone else is prohibited from using, opening, copying or forwarding any of the contents inside. If this email was sent to you by mistake, please contact the sender of the email and delete this file immediately. Confidentiality and legal privileges are not waived or lost by misdirected emails. Any views or opinions expressed in the email are those of the author and do not necessarily represent those of the Company.

Comments

David Hildenbrand June 14, 2024, 7:56 a.m. UTC | #1
On 14.06.24 09:52, 史思远 wrote:
> Dear mm maintainers,
> 

Thanks, but Hugh already sent a patch for this a couple of days ago.
史思远 June 14, 2024, 8:02 a.m. UTC | #2
Oh, I see.. Thanks.
> From: "David Hildenbrand"<david@redhat.com>
> Date:  Fri, Jun 14, 2024, 15:57
> Subject:  Re: 0001-mm-rmap-Correct-stats-calulation-in-__folio_remove_r
> To: "史思远"<shisiyuan@lixiang.com>, "Andrew Morton"<akpm@linux-foundation.org>, "linux-mm@kvack.org"<linux-mm@kvack.org>, "linux-kernel@vger.kernel.org"<linux-kernel@vger.kernel.org>
> On 14.06.24 09:52, 史思远 wrote:
> > Dear mm maintainers,
> > 
> 
> 
> Thanks, but Hugh already sent a patch for this a couple of days ago.
> 
> 
> -- 
> Cheers,
> 
> 
> David / dhildenb
> 
> 

声明:这封邮件只允许文件接收者阅读,有很高的机密性要求。禁止其他人使用、打开、复制或转发里面的任何内容。如果本邮件错误地发给了你,请联系邮件发出者并删除这个文件。机密及法律的特权并不因为误发邮件而放弃或丧失。任何提出的观点或意见只属于作者的个人见解,并不一定代表本公司。
Disclaimer: This email is intended to be read only by the designated recipient of the document and has high confidentiality requirements. Anyone else is prohibited from using, opening, copying or forwarding any of the contents inside. If this email was sent to you by mistake, please contact the sender of the email and delete this file immediately. Confidentiality and legal privileges are not waived or lost by misdirected emails. Any views or opinions expressed in the email are those of the author and do not necessarily represent those of the Company.
diff mbox series

Patch

diff --git a/mm/rmap.c b/mm/rmap.c
index 52357d79917c..f9aeabd691fa 100644
--- a/mm/rmap.c
+++ b/mm/rmap.c
@@ -1567,7 +1567,7 @@  static __always_inline void __folio_remove_rmap(struct folio *folio,
                    list_empty(&folio->_deferred_list))
                        deferred_split_folio(folio);
        }
-       __folio_mod_stat(folio, nr, nr_pmdmapped);
+       __folio_mod_stat(folio, -nr, -nr_pmdmapped);
 
        /*
         * It would be tidy to reset folio_test_anon mapping when fully