From: "David Hildenbrand (Arm)" <david@kernel.org>
To: "Lorenzo Stoakes (ARM)" <ljs@kernel.org>,
"Xu Xin (vivo)" <xu.xin@linux.dev>
Cc: chengming.zhou@linux.dev, linux-kernel@vger.kernel.org,
linux-mm@kvack.org
Subject: Re: [PATCH v3 2/2] mm/ksm: add initialization helpers for scan_get_next_rmap_item()
Date: Mon, 16 Nov 2026 16:27:07 +0100 [thread overview]
Message-ID: <6c573cf8-4c33-46e0-9309-1d645ee827df@kernel.org> (raw)
In-Reply-To: <avsOr-03NtFVG-6a@gremlin>
>> +static struct ksm_mm_slot *scan_get_first_mm(void)
>> +{
>> + struct ksm_mm_slot *mm_slot = &ksm_mm_head;
>> + struct mm_slot *slot;
>> +
>> + scoped_guard(spinlock, &ksm_mmlist_lock) {
>> + slot = list_entry(mm_slot->slot.mm_node.next,
>> + struct mm_slot, mm_node);
>> + mm_slot = mm_slot_entry(slot, struct ksm_mm_slot, slot);
>> + ksm_scan.mm_slot = mm_slot;
>> + }
>> +
>> + /*
>> + * Although we tested list_empty() above, a racing __ksm_exit
>
> I think you need to update this comment to reflect the fact that you moved the
> list_empty() check :)
Yeah, with both things
Reviewed-by: David Hildenbrand (Arm) <david@kernel.org>
Xu, can you send a v4 that I can pick up?
--
Cheers,
David
prev parent reply other threads:[~2026-11-16 15:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-16 1:44 [PATCH v3 0/2] mm/ksm: clean up scan_get_next_rmap_item() initialization Xu Xin (vivo)
2026-11-16 1:45 ` [PATCH v3 1/2] mm/ksm: extract helper functions for scan cycle cleanup Xu Xin (vivo)
2026-11-16 1:46 ` [PATCH v3 2/2] mm/ksm: add initialization helpers for scan_get_next_rmap_item() Xu Xin (vivo)
2026-11-16 14:14 ` Lorenzo Stoakes (ARM)
2026-11-16 15:27 ` David Hildenbrand (Arm) [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=6c573cf8-4c33-46e0-9309-1d645ee827df@kernel.org \
--to=david@kernel.org \
--cc=chengming.zhou@linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ljs@kernel.org \
--cc=xu.xin@linux.dev \
/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
all inboxes | Powered by JetHome®