From: David Hildenbrand <david@redhat.com>
To: Oscar Salvador <osalvador@suse.de>,
Anshuman Khandual <anshuman.khandual@arm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Michal Hocko <mhocko@kernel.org>,
Vlastimil Babka <vbabka@suse.cz>,
Pavel Tatashin <pasha.tatashin@soleen.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm,memory_hotplug: Drop unneeded locking
Date: Tue, 1 Jun 2021 10:02:54 +0200 [thread overview]
Message-ID: <f655ced2-281e-33ee-e1ea-89a0e13fc7a3@redhat.com> (raw)
In-Reply-To: <20210601074737.GA30768@linux>
On 01.06.21 09:47, Oscar Salvador wrote:
> On Tue, Jun 01, 2021 at 10:47:31AM +0530, Anshuman Khandual wrote:
>> Should also just drop zone_span_write[lock|unlock]() helpers as there
>> are no users left ?
>
> Yes, definitely.
> Andrew, can you squash this on top? Thanks:
>
> diff --git a/include/linux/memory_hotplug.h b/include/linux/memory_hotplug.h
> index a7fd2c3ccb77..27d8ba1d32cb 100644
> --- a/include/linux/memory_hotplug.h
> +++ b/include/linux/memory_hotplug.h
> @@ -67,10 +67,6 @@ struct range mhp_get_pluggable_range(bool need_mapping);
>
> /*
> * Zone resizing functions
> - *
> - * Note: any attempt to resize a zone should has pgdat_resize_lock()
> - * zone_span_writelock() both held. This ensure the size of a zone
> - * can't be changed while pgdat_resize_lock() held.
> */
> static inline unsigned zone_span_seqbegin(struct zone *zone)
> {
> @@ -80,14 +76,6 @@ static inline int zone_span_seqretry(struct zone *zone, unsigned iv)
> {
> return read_seqretry(&zone->span_seqlock, iv);
> }
> -static inline void zone_span_writelock(struct zone *zone)
> -{
> - write_seqlock(&zone->span_seqlock);
> -}
> -static inline void zone_span_writeunlock(struct zone *zone)
> -{
> - write_sequnlock(&zone->span_seqlock);
> -}
If there is no writer anymore, why do we have to protect readers?
--
Thanks,
David / dhildenb
next prev parent reply other threads:[~2021-06-01 8:03 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-31 9:39 Oscar Salvador
2021-05-31 11:37 ` Michal Hocko
2021-06-01 5:17 ` Anshuman Khandual
2021-06-01 7:47 ` Oscar Salvador
2021-06-01 8:02 ` David Hildenbrand [this message]
2021-06-01 8:12 ` Oscar Salvador
2021-06-01 9:47 ` Michal Hocko
2021-06-01 10:33 ` Oscar Salvador
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=f655ced2-281e-33ee-e1ea-89a0e13fc7a3@redhat.com \
--to=david@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=anshuman.khandual@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@kernel.org \
--cc=osalvador@suse.de \
--cc=pasha.tatashin@soleen.com \
--cc=vbabka@suse.cz \
/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