linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm: /proc/pid/smaps_rollup: fix maple tree search
@ 2022-10-19  3:18 Hugh Dickins
  2022-10-20 15:31 ` Liam Howlett
  0 siblings, 1 reply; 2+ messages in thread
From: Hugh Dickins @ 2022-10-19  3:18 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Matthew Wilcox, Liam R. Howlett, Alexey Dobriyan, Seth Jenkins,
	Vlastimil Babka, linux-kernel, linux-mm

/proc/pid/smaps_rollup showed 0 kB for everything: now find first vma.

Fixes: c4c84f06285e ("fs/proc/task_mmu: stop using linked list and highest_vm_end")
Signed-off-by: Hugh Dickins <hughd@google.com>
---

 fs/proc/task_mmu.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- 6.1-rc1/fs/proc/task_mmu.c
+++ linux/fs/proc/task_mmu.c
@@ -902,7 +902,7 @@ static int show_smaps_rollup(struct seq_
 		goto out_put_mm;
 
 	hold_task_mempolicy(priv);
-	vma = mas_find(&mas, 0);
+	vma = mas_find(&mas, ULONG_MAX);
 
 	if (unlikely(!vma))
 		goto empty_set;


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

* Re: [PATCH] mm: /proc/pid/smaps_rollup: fix maple tree search
  2022-10-19  3:18 [PATCH] mm: /proc/pid/smaps_rollup: fix maple tree search Hugh Dickins
@ 2022-10-20 15:31 ` Liam Howlett
  0 siblings, 0 replies; 2+ messages in thread
From: Liam Howlett @ 2022-10-20 15:31 UTC (permalink / raw)
  To: Hugh Dickins
  Cc: Andrew Morton, Matthew Wilcox, Alexey Dobriyan, Seth Jenkins,
	Vlastimil Babka, linux-kernel, linux-mm


Thanks Hugh.  I guess this 'optimisation' was a little more aggressive
and a little more buggy than needed.

Reviewed-by: Liam R. Howlett <Liam.Howlett@oracle.com>

* Hugh Dickins <hughd@google.com> [221018 23:18]:
> /proc/pid/smaps_rollup showed 0 kB for everything: now find first vma.
> 
> Fixes: c4c84f06285e ("fs/proc/task_mmu: stop using linked list and highest_vm_end")
> Signed-off-by: Hugh Dickins <hughd@google.com>
> ---
> 
>  fs/proc/task_mmu.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> --- 6.1-rc1/fs/proc/task_mmu.c
> +++ linux/fs/proc/task_mmu.c
> @@ -902,7 +902,7 @@ static int show_smaps_rollup(struct seq_
>  		goto out_put_mm;
>  
>  	hold_task_mempolicy(priv);
> -	vma = mas_find(&mas, 0);
> +	vma = mas_find(&mas, ULONG_MAX);
>  
>  	if (unlikely(!vma))
>  		goto empty_set;

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

end of thread, other threads:[~2022-10-20 15:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-19  3:18 [PATCH] mm: /proc/pid/smaps_rollup: fix maple tree search Hugh Dickins
2022-10-20 15:31 ` Liam Howlett

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