* [PATCH] mm/page_counter: remove an incorrect call to propagate_protected_usage()
@ 2021-11-18 18:11 Donghai Qiao
2021-11-18 19:16 ` Roman Gushchin
0 siblings, 1 reply; 2+ messages in thread
From: Donghai Qiao @ 2021-11-18 18:11 UTC (permalink / raw)
To: akpm, linux-mm, linux-kernel; +Cc: mhocko, hannes, guro, dqiao
The function propagate_protected_usage() is called to propagate the usage
change in the page_counter structure. But there is call to this function
from page_counter_try_charge() when there is actually no usage change.
Hence this call should be removed.
Signed-off-by: Donghai Qiao <dqiao@redhat.com>
---
mm/page_counter.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/mm/page_counter.c b/mm/page_counter.c
index 7d83641eb86b..eb156ff5d603 100644
--- a/mm/page_counter.c
+++ b/mm/page_counter.c
@@ -120,7 +120,6 @@ bool page_counter_try_charge(struct page_counter *counter,
new = atomic_long_add_return(nr_pages, &c->usage);
if (new > c->max) {
atomic_long_sub(nr_pages, &c->usage);
- propagate_protected_usage(c, new);
/*
* This is racy, but we can live with some
* inaccuracy in the failcnt which is only used
--
2.27.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mm/page_counter: remove an incorrect call to propagate_protected_usage()
2021-11-18 18:11 [PATCH] mm/page_counter: remove an incorrect call to propagate_protected_usage() Donghai Qiao
@ 2021-11-18 19:16 ` Roman Gushchin
0 siblings, 0 replies; 2+ messages in thread
From: Roman Gushchin @ 2021-11-18 19:16 UTC (permalink / raw)
To: Donghai Qiao; +Cc: akpm, linux-mm, linux-kernel, mhocko, hannes
On Thu, Nov 18, 2021 at 01:11:25PM -0500, Donghai Qiao wrote:
> The function propagate_protected_usage() is called to propagate the usage
> change in the page_counter structure. But there is call to this function
> from page_counter_try_charge() when there is actually no usage change.
> Hence this call should be removed.
>
> Signed-off-by: Donghai Qiao <dqiao@redhat.com>
Reviewed-by: Roman Gushchin <guro@fb.com>
Thanks, Donghai!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-11-18 19:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-18 18:11 [PATCH] mm/page_counter: remove an incorrect call to propagate_protected_usage() Donghai Qiao
2021-11-18 19:16 ` Roman Gushchin
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.