From: Oscar Salvador <osalvador@suse.de>
To: David Hildenbrand <david@redhat.com>
Cc: Gavin Shan <gshan@redhat.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
adityag@linux.ibm.com, donettom@linux.ibm.com,
gregkh@linuxfoundation.org, rafael@kernel.org, dakr@kernel.org,
akpm@linux-foundation.org, shan.gavin@gmail.com
Subject: Re: [PATCH] drivers/base/memory: Avoid overhead from for_each_present_section_nr()
Date: Thu, 10 Apr 2025 15:55:19 +0200 [thread overview]
Message-ID: <Z_fNx7hTOR8St0SM@localhost.localdomain> (raw)
In-Reply-To: <9deb3725-8991-43d1-8c3d-56523fabff28@redhat.com>
On Thu, Apr 10, 2025 at 03:18:00PM +0200, David Hildenbrand wrote:
> Staring at the end result and the particularly long comment, are we now
> really any better than before 61659efdb35c?
I think we are.
I mean, we made it slightly worse with 61659efdb35c because of what I
explained in the error report, but I think this version is faster than
the code before 61659efdb35c, as before that the outter loop was
incremented by 1 any given time, meaning that the section we were passing
to add_boot_memory_block() could have been already checked in there for
memory-blocks spanning multiple sections.
All in all, I think we are better, and the code is slightly simpler?
--
Oscar Salvador
SUSE Labs
next prev parent reply other threads:[~2025-04-10 13:55 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-10 12:51 Gavin Shan
2025-04-10 13:08 ` Oscar Salvador
2025-04-10 13:18 ` David Hildenbrand
2025-04-10 13:55 ` Oscar Salvador [this message]
2025-04-10 14:12 ` Oscar Salvador
2025-04-10 14:25 ` David Hildenbrand
2025-04-11 5:04 ` Gavin Shan
2025-04-11 8:15 ` David Hildenbrand
2025-04-11 8:29 ` Oscar Salvador
2025-04-10 14:24 ` David Hildenbrand
2025-04-10 15:45 ` Aditya Gupta
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=Z_fNx7hTOR8St0SM@localhost.localdomain \
--to=osalvador@suse.de \
--cc=adityag@linux.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=dakr@kernel.org \
--cc=david@redhat.com \
--cc=donettom@linux.ibm.com \
--cc=gregkh@linuxfoundation.org \
--cc=gshan@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=rafael@kernel.org \
--cc=shan.gavin@gmail.com \
/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