linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* 0001-mm-rmap-Correct-stats-calulation-in-__folio_remove_r
@ 2024-06-14  7:52 史思远
  2024-06-14  7:56 ` 0001-mm-rmap-Correct-stats-calulation-in-__folio_remove_r David Hildenbrand
  0 siblings, 1 reply; 3+ messages in thread
From: 史思远 @ 2024-06-14  7:52 UTC (permalink / raw)
  To: Andrew Morton, linux-mm, linux-kernel


[-- Attachment #1.1: Type: text/plain, Size: 1645 bytes --]

Dear mm maintainers,

This patch fixes wrong stats calulation in __folio_remove_rmap().

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

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.


[-- Attachment #1.2: Type: text/html, Size: 6269 bytes --]

[-- Attachment #2: 0001-mm-rmap-Correct-stats-calulation-in-__folio_remove_r.patch --]
[-- Type: application/octet-stream, Size: 799 bytes --]

From 41c38c1ebb4788e40f103260ee0ad6826370e043 Mon Sep 17 00:00:00 2001
From: shisiyuan <shisiyuan@lixiang.com>
Date: Fri, 14 Jun 2024 15:32:23 +0800
Subject: [PATCH] mm: rmap: Correct stats calulation in __folio_remove_rmap

Signed-off-by: shisiyuan <shisiyuan@lixiang.com>
---
 mm/rmap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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
-- 
2.34.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: 0001-mm-rmap-Correct-stats-calulation-in-__folio_remove_r
  2024-06-14  7:52 0001-mm-rmap-Correct-stats-calulation-in-__folio_remove_r 史思远
@ 2024-06-14  7:56 ` David Hildenbrand
  2024-06-14  8:02   ` 0001-mm-rmap-Correct-stats-calulation-in-__folio_remove_r 史思远
  0 siblings, 1 reply; 3+ messages in thread
From: David Hildenbrand @ 2024-06-14  7:56 UTC (permalink / raw)
  To: 史思远, Andrew Morton, linux-mm, linux-kernel

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



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: 0001-mm-rmap-Correct-stats-calulation-in-__folio_remove_r
  2024-06-14  7:56 ` 0001-mm-rmap-Correct-stats-calulation-in-__folio_remove_r David Hildenbrand
@ 2024-06-14  8:02   ` 史思远
  0 siblings, 0 replies; 3+ messages in thread
From: 史思远 @ 2024-06-14  8:02 UTC (permalink / raw)
  To: David Hildenbrand; +Cc: Andrew Morton, linux-mm, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1554 bytes --]

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.


[-- Attachment #2: Type: text/html, Size: 7211 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-06-14  8:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-14  7:52 0001-mm-rmap-Correct-stats-calulation-in-__folio_remove_r 史思远
2024-06-14  7:56 ` 0001-mm-rmap-Correct-stats-calulation-in-__folio_remove_r David Hildenbrand
2024-06-14  8:02   ` 0001-mm-rmap-Correct-stats-calulation-in-__folio_remove_r 史思远

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox