linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Vlastimil Babka <vbabka@suse.cz>
To: Oscar Salvador <osalvador@suse.de>,
	Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	Michal Hocko <mhocko@suse.com>, Marco Elver <elver@google.com>,
	Andrey Konovalov <andreyknvl@gmail.com>,
	Alexander Potapenko <glider@google.com>
Subject: Re: [PATCH 2/2] mm,page_owner: Drop unnecesary check
Date: Fri, 8 Mar 2024 08:53:35 +0100	[thread overview]
Message-ID: <cce858b3-cd8c-4b11-9564-d3c38eb8d536@suse.cz> (raw)
In-Reply-To: <20240306123217.29774-3-osalvador@suse.de>

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@suse.de>

Reviewed-by: Vlastimil Babka <vbabka@suse.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++)



      reply	other threads:[~2024-03-08  7:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-06 12:32 [PATCH 0/2] page_owner: Fixup and cleanup Oscar Salvador
2024-03-06 12:32 ` [PATCH 1/2] mm,page_owner: Check for null stack_record before bumping its refcount Oscar Salvador
2024-03-08  7:53   ` Vlastimil Babka
2024-03-06 12:32 ` [PATCH 2/2] mm,page_owner: Drop unnecesary check Oscar Salvador
2024-03-08  7:53   ` Vlastimil Babka [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cce858b3-cd8c-4b11-9564-d3c38eb8d536@suse.cz \
    --to=vbabka@suse.cz \
    --cc=akpm@linux-foundation.org \
    --cc=andreyknvl@gmail.com \
    --cc=elver@google.com \
    --cc=glider@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.com \
    --cc=osalvador@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).