From: Vlastimil Babka <vbabka@suse.cz>
To: David Hildenbrand <david@redhat.com>,
qiang.zhang@windriver.com, akpm@linux-foundation.org,
sfr@canb.auug.org.au
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm, slub: add cpus_read_lock/unlock() for slab_mem_going_offline_callback()
Date: Tue, 17 Aug 2021 09:57:10 +0200 [thread overview]
Message-ID: <dd5785b6-3f96-3af9-586b-1d962228bed8@suse.cz> (raw)
In-Reply-To: <ef944ea5-c3cb-24e5-1ff8-b8e1008fa6ed@redhat.com>
On 8/16/21 10:04 AM, David Hildenbrand wrote:
> On 16.08.21 09:46, qiang.zhang@windriver.com wrote:
>> From: "Qiang.Zhang" <qiang.zhang@windriver.com>
>>
>> The flush_all_cpus_locked() should be called with cpus_read_lock/unlock(),
>> ensure flush_cpu_slab() can be executed on schedule_on CPU.
>>
>> Fixes: 1c84f3c91640 ("mm, slub: fix memory and cpu hotplug related lock ordering issues")
> Memory notifiers are getting called from online_pages()/offline_pages(),
> where we call memory_notify(MEM_GOING_OFFLINE, &arg) under
> mem_hotplug_begin().
>
> mem_hotplug_begin() does a cpus_read_lock().
Exactly. Also flush_all_cpus_locked() has a lockdep assert for
cpus_read_lock() which doesn't trigger in testing.
> How does this even work or against which branch is this?
>
prev parent reply other threads:[~2021-08-17 7:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-16 7:46 qiang.zhang
2021-08-16 8:04 ` David Hildenbrand
2021-08-16 8:10 ` Zhang, Qiang
2021-08-16 8:17 ` Stephen Rothwell
2021-08-16 8:23 ` David Hildenbrand
2021-08-17 7:57 ` 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=dd5785b6-3f96-3af9-586b-1d962228bed8@suse.cz \
--to=vbabka@suse.cz \
--cc=akpm@linux-foundation.org \
--cc=david@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=qiang.zhang@windriver.com \
--cc=sfr@canb.auug.org.au \
/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