* [PATCH v2] mm/codetag: fix arg in pgalloc_tag_copy alloc_tag_sub
@ 2024-10-22 23:24 Sourav Panda
2024-10-23 4:19 ` Anshuman Khandual
0 siblings, 1 reply; 2+ messages in thread
From: Sourav Panda @ 2024-10-22 23:24 UTC (permalink / raw)
To: akpm, surenb, yuzhao, linux-mm, linux-kernel, pasha.tatashin, weixugc
Cc: Sourav Panda
alloc_tag_sub() takes bytes as opposed to number of pages as argument.
Currently pgalloc_tag_copy() passes the number of pages. This fix passes
the correct unit, which is the number of bytes allocated.
Fixes: e0a955bf7f61 ("mm/codetag: add pgalloc_tag_copy()")
Signed-off-by: Sourav Panda <souravpanda@google.com>
Acked-by: Suren Baghdasaryan <surenb@google.com>
Reviewed-by: Pasha Tatashin <pasha.tatashin@soleen.com>
---
Changelog:
Added Acked-by: Suren Baghdasaryan <surenb@google.com>
Added Reviewed-by: Pasha Tatashin <pasha.tatashin@soleen.com>
Fixed the nit pointed by Wei in the commit message
v1:
https://lore.kernel.org/all/20241022205622.133697-1-souravpanda@google.com/
---
include/linux/mm.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/mm.h b/include/linux/mm.h
index ecf63d2b0582..2890001c8b97 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -4203,7 +4203,7 @@ static inline void pgalloc_tag_copy(struct folio *new, struct folio *old)
/* Clear the old ref to the original allocation tag. */
clear_page_tag_ref(&old->page);
/* Decrement the counters of the tag on get_new_folio. */
- alloc_tag_sub(ref, folio_nr_pages(new));
+ alloc_tag_sub(ref, folio_size(new));
__alloc_tag_ref_set(ref, tag);
--
2.47.0.105.g07ac214952-goog
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH v2] mm/codetag: fix arg in pgalloc_tag_copy alloc_tag_sub
2024-10-22 23:24 [PATCH v2] mm/codetag: fix arg in pgalloc_tag_copy alloc_tag_sub Sourav Panda
@ 2024-10-23 4:19 ` Anshuman Khandual
0 siblings, 0 replies; 2+ messages in thread
From: Anshuman Khandual @ 2024-10-23 4:19 UTC (permalink / raw)
To: Sourav Panda, akpm, surenb, yuzhao, linux-mm, linux-kernel,
pasha.tatashin, weixugc
On 10/23/24 04:54, Sourav Panda wrote:
> alloc_tag_sub() takes bytes as opposed to number of pages as argument.
>
> Currently pgalloc_tag_copy() passes the number of pages. This fix passes
> the correct unit, which is the number of bytes allocated.
>
> Fixes: e0a955bf7f61 ("mm/codetag: add pgalloc_tag_copy()")
> Signed-off-by: Sourav Panda <souravpanda@google.com>
> Acked-by: Suren Baghdasaryan <surenb@google.com>
> Reviewed-by: Pasha Tatashin <pasha.tatashin@soleen.com>
> ---
> Changelog:
> Added Acked-by: Suren Baghdasaryan <surenb@google.com>
> Added Reviewed-by: Pasha Tatashin <pasha.tatashin@soleen.com>
Very minor nit.
Just mentioning that the tags have been picked up should suffice.
> Fixed the nit pointed by Wei in the commit message
>
> v1:
> https://lore.kernel.org/all/20241022205622.133697-1-souravpanda@google.com/
> ---
> include/linux/mm.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/linux/mm.h b/include/linux/mm.h
> index ecf63d2b0582..2890001c8b97 100644
> --- a/include/linux/mm.h
> +++ b/include/linux/mm.h
> @@ -4203,7 +4203,7 @@ static inline void pgalloc_tag_copy(struct folio *new, struct folio *old)
> /* Clear the old ref to the original allocation tag. */
> clear_page_tag_ref(&old->page);
> /* Decrement the counters of the tag on get_new_folio. */
> - alloc_tag_sub(ref, folio_nr_pages(new));
> + alloc_tag_sub(ref, folio_size(new));
>
> __alloc_tag_ref_set(ref, tag);
>
Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-10-23 4:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-22 23:24 [PATCH v2] mm/codetag: fix arg in pgalloc_tag_copy alloc_tag_sub Sourav Panda
2024-10-23 4:19 ` Anshuman Khandual
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox