[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <cce858b3-cd8c-4b11-9564-d3c38eb8d536@suse.cz>
Date: Fri, 8 Mar 2024 08:53:35 +0100
From: Vlastimil Babka <vbabka@...e.cz>
To: Oscar Salvador <osalvador@...e.de>,
Andrew Morton <akpm@...ux-foundation.org>
Cc: linux-kernel@...r.kernel.org, linux-mm@...ck.org,
Michal Hocko <mhocko@...e.com>, Marco Elver <elver@...gle.com>,
Andrey Konovalov <andreyknvl@...il.com>,
Alexander Potapenko <glider@...gle.com>
Subject: Re: [PATCH 2/2] mm,page_owner: Drop unnecesary check
On 3/6/24 13:32, Oscar Salvador wrote:
> stackdepot only saves stack_records which size is greather than 0,
> so we cannot possibly have empty stack_records.
> Drop the check.
>
> Signed-off-by: Oscar Salvador <osalvador@...e.de>
Reviewed-by: Vlastimil Babka <vbabka@...e.cz>---
> mm/page_owner.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/mm/page_owner.c b/mm/page_owner.c
> index 7163a1c44ccf..e7139952ffd9 100644
> --- a/mm/page_owner.c
> +++ b/mm/page_owner.c
> @@ -865,8 +865,7 @@ static int stack_print(struct seq_file *m, void *v)
> entries = stack_record->entries;
> stack_count = refcount_read(&stack_record->count) - 1;
>
> - if (!nr_entries || nr_entries < 0 || stack_count < 1 ||
> - stack_count < page_owner_stack_threshold)
> + if (stack_count < 1 || stack_count < page_owner_stack_threshold)
> return 0;
>
> for (i = 0; i < nr_entries; i++)
Powered by blists - more mailing lists