Thread (57 messages) 57 messages, 7 authors, 2023-05-28

Re: [PATCH v2 01/34] mm: Add PAGE_TYPE_OP folio functions

From: Vishal Moola <hidden>
Date: 2023-05-25 20:39:10
Also in: kvm, linux-arch, linux-arm-kernel, linux-m68k, linux-mips, linux-mm, linux-riscv, linux-s390, linux-sh, linux-um, loongarch, sparclinux, xen-devel

On Thu, May 25, 2023 at 1:20 PM Mike Rapoport [off-list ref] wrote:
On Thu, May 25, 2023 at 10:00:23AM -0700, Vishal Moola wrote:
quoted
On Thu, May 25, 2023 at 1:56 AM Mike Rapoport [off-list ref] wrote:
quoted
Hi,

On Mon, May 01, 2023 at 12:27:56PM -0700, Vishal Moola (Oracle) wrote:
quoted
No folio equivalents for page type operations have been defined, so
define them for later folio conversions.
Can you please elaborate why would we need folios for page table descriptors?
Thanks for the review!

These macros are for callers that care about the page type, i.e. Table and
Buddy. Aside from accounting for those cases, the page tables don't use folios.
These are more for the cleanliness of those callers.
But why using folio APIs for PageType will be cleaner than using page APIs?
Do you have an example?
Ah, for example in mm/memory-failure.c there are a couple uses of PageTable.
Like the line :
if (folio_test_slab(folio) || PageTable(&folio->page) ||
folio_test_reserved(folio))
where that PageTable(&folio->page) can now be written as folio_test_table(folio)
instead.

Also there are numerous uses of PageBuddy in mm/compaction.c that will
likely need to be converted to folios as well.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help