From: "David Hildenbrand (Red Hat)" <david@kernel.org>
To: Chih-En Lin <shiyn.lin@gmail.com>,
"Matthew Wilcox (Oracle)" <willy@infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Vishal Moola <vishal.moola@gmail.com>,
linux-mm@kvack.org
Subject: Re: [PATCH 1/4] mm: Use frozen pages for page tables
Date: Thu, 20 Nov 2025 14:55:23 +0100 [thread overview]
Message-ID: <2b7ab53c-b1cc-44f0-acdc-e28967f53ea5@kernel.org> (raw)
In-Reply-To: <20251119154654.GA606021@gmail.com>
>> +{
>> + struct page *page = ptdesc_page(pt);
>> +
>> + if (ptdesc_test_kernel(pt))
>> + pagetable_free_kernel(pt);
>
> Should we use test_and_clear_bit() here to prevent the double free?
> Or it is unnecessary because the caller will guarantee there is no other
> thread that will free the same pagetables.
If that would be the case, it would be horribly broken already?
--
Cheers
David
next prev parent reply other threads:[~2025-11-20 13:55 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-13 14:04 [PATCH 0/4] Convert pgtable to use frozen pages Matthew Wilcox (Oracle)
2025-11-13 14:04 ` [PATCH 1/4] mm: Use frozen pages for page tables Matthew Wilcox (Oracle)
2025-11-13 18:24 ` Vishal Moola (Oracle)
2025-11-13 19:14 ` Vishal Moola (Oracle)
2025-11-14 13:45 ` Matthew Wilcox
2025-11-14 14:31 ` Will Deacon
2025-11-17 14:38 ` kernel test robot
2025-11-18 0:44 ` Vishal Moola (Oracle)
2025-11-19 15:46 ` Chih-En Lin
2025-11-20 13:55 ` David Hildenbrand (Red Hat) [this message]
2025-11-13 14:04 ` [PATCH 2/4] mm: Account pagetable memory when allocated Matthew Wilcox (Oracle)
2025-11-13 19:39 ` Vishal Moola (Oracle)
2025-11-13 14:04 ` [PATCH 3/4] mm: Mark " Matthew Wilcox (Oracle)
2025-11-18 17:00 ` David Hildenbrand (Red Hat)
2025-11-13 14:04 ` [PATCH 4/4] pgtable: Remove uses of page->lru Matthew Wilcox (Oracle)
2025-11-20 13:56 ` David Hildenbrand (Red Hat)
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=2b7ab53c-b1cc-44f0-acdc-e28967f53ea5@kernel.org \
--to=david@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=linux-mm@kvack.org \
--cc=shiyn.lin@gmail.com \
--cc=vishal.moola@gmail.com \
--cc=willy@infradead.org \
/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