From: Matthew Wilcox <willy@infradead.org>
To: Vlastimil Babka <vbabka@suse.cz>
Cc: Peter Zijlstra <peterz@infradead.org>,
Dave Hansen <dave.hansen@linux.intel.com>,
Michal Hocko <mhocko@kernel.org>,
linux-mm@kvack.org, Andrey Ryabinin <ryabinin.a.a@gmail.com>,
Alexander Potapenko <glider@google.com>,
"H. Peter Anvin" <hpa@zytor.com>,
Hyeonggon Yoo <42.hyeyoo@gmail.com>,
Christoph Lameter <cl@linux.com>, Will Deacon <will@kernel.org>,
Julia Lawall <julia.lawall@inria.fr>,
Sergey Senozhatsky <senozhatsky@chromium.org>,
x86@kernel.org, Luis Chamberlain <mcgrof@kernel.org>,
kasan-dev@googlegroups.com, Ingo Molnar <mingo@redhat.com>,
Vladimir Davydov <vdavydov.dev@gmail.com>,
David Rientjes <rientjes@google.com>,
Nitin Gupta <ngupta@vflare.org>, Marco Elver <elver@google.com>,
Borislav Petkov <bp@alien8.de>, Andy Lutomirski <luto@kernel.org>,
cgroups@vger.kernel.org, Thomas Gleixner <tglx@linutronix.de>,
Joonsoo Kim <iamjoonsoo.kim@lge.com>,
Dmitry Vyukov <dvyukov@google.com>,
Andrey Konovalov <andreyknvl@gmail.com>,
patches@lists.linux.dev, Pekka Enberg <penberg@kernel.org>,
Minchan Kim <minchan@kernel.org>,
iommu@lists.linux-foundation.org,
Johannes Weiner <hannes@cmpxchg.org>,
Andrew Morton <akpm@linux-foundation.org>,
David Woodhouse <dwmw2@infradead.org>,
Roman Gushchin <guro@fb.com>
Subject: Re: [PATCH v2 00/33] Separate struct slab from struct page
Date: Mon, 20 Dec 2021 01:42:13 +0000 [thread overview]
Message-ID: <Yb/fdYbLunsVYRqQ@casper.infradead.org> (raw)
In-Reply-To: <86617be0-8aa8-67d2-08bd-1e06c3d12785@suse.cz>
On Mon, Dec 20, 2021 at 01:47:54AM +0100, Vlastimil Babka wrote:
> > * mm/slub: Convert print_page_info() to print_slab_info()
> > Do we really need to explicitly convert slab_folio()'s result to (struct folio *)?
>
> Unfortunately yes, as long as folio_flags() don't take const struct folio *,
> which will need some yak shaving.
In case anyone's interested ...
folio_flags calls VM_BUG_ON_PGFLAGS() which would need its second
argument to be const.
That means dump_page() needs to take a const struct page, which
means __dump_page() needs its argument to be const.
That calls ...
is_migrate_cma_page()
page_mapping()
page_mapcount()
page_ref_count()
page_to_pgoff()
page_to_pfn()
hpage_pincount_available()
head_compound_mapcount()
head_compound_pincount()
compound_order()
PageKsm()
PageAnon()
PageCompound()
... and at that point, I ran out of motivation to track down some parts
of this tarbaby that could be fixed. I did do:
mm: constify page_count and page_ref_count
mm: constify get_pfnblock_flags_mask and get_pfnblock_migratetype
mm: make compound_head const-preserving
mm/page_owner: constify dump_page_owner
so some of those are already done. But a lot of them just need to be
done at the same time. For example, page_mapping() calls
folio_mapping() which calls folio_test_slab() which calls folio_flags(),
so dump_page() and page_mapping() need to be done at the same time.
One bit that could be broken off easily (I think ...) is PageTransTail()
PageTail(), PageCompound(), PageHuge(), page_to_pgoff() and
page_to_index(). One wrinkle is needed a temporary
TESTPAGEFLAGS_FALSE_CONST. But I haven't tried it yet.
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
next prev parent reply other threads:[~2021-12-20 1:43 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-01 18:14 [PATCH v2 00/33] Separate struct slab from struct page Vlastimil Babka
2021-12-01 18:15 ` [PATCH v2 29/33] iommu: Use put_pages_list Vlastimil Babka
2021-12-01 19:07 ` Matthew Wilcox
2021-12-01 19:45 ` Robin Murphy
2021-12-02 12:25 ` [PATCH v2 00/33] Separate struct slab from struct page Vlastimil Babka
2021-12-14 12:57 ` Vlastimil Babka
2021-12-14 14:38 ` Hyeonggon Yoo
2021-12-14 14:43 ` Vlastimil Babka
2021-12-15 3:47 ` Hyeonggon Yoo
2021-12-15 1:03 ` Roman Gushchin via iommu
2021-12-15 23:38 ` Roman Gushchin via iommu
2021-12-16 9:19 ` Vlastimil Babka
2021-12-20 0:47 ` Vlastimil Babka
2021-12-20 1:42 ` Matthew Wilcox [this message]
2021-12-20 0:24 ` Vlastimil Babka
2021-12-16 15:00 ` Hyeonggon Yoo
2021-12-20 23:58 ` Vlastimil Babka
2021-12-21 17:25 ` Robin Murphy
2021-12-22 7:36 ` Hyeonggon Yoo
2021-12-22 16:56 ` Vlastimil Babka
2021-12-25 9:16 ` Hyeonggon Yoo
2021-12-25 17:53 ` Matthew Wilcox
2021-12-27 2:43 ` Hyeonggon Yoo
2021-12-29 11:22 ` Hyeonggon Yoo
2022-01-03 17:56 ` Vlastimil Babka
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=Yb/fdYbLunsVYRqQ@casper.infradead.org \
--to=willy@infradead.org \
--cc=42.hyeyoo@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=andreyknvl@gmail.com \
--cc=bp@alien8.de \
--cc=cgroups@vger.kernel.org \
--cc=cl@linux.com \
--cc=dave.hansen@linux.intel.com \
--cc=dvyukov@google.com \
--cc=dwmw2@infradead.org \
--cc=elver@google.com \
--cc=glider@google.com \
--cc=guro@fb.com \
--cc=hannes@cmpxchg.org \
--cc=hpa@zytor.com \
--cc=iamjoonsoo.kim@lge.com \
--cc=iommu@lists.linux-foundation.org \
--cc=julia.lawall@inria.fr \
--cc=kasan-dev@googlegroups.com \
--cc=linux-mm@kvack.org \
--cc=luto@kernel.org \
--cc=mcgrof@kernel.org \
--cc=mhocko@kernel.org \
--cc=minchan@kernel.org \
--cc=mingo@redhat.com \
--cc=ngupta@vflare.org \
--cc=patches@lists.linux.dev \
--cc=penberg@kernel.org \
--cc=peterz@infradead.org \
--cc=rientjes@google.com \
--cc=ryabinin.a.a@gmail.com \
--cc=senozhatsky@chromium.org \
--cc=tglx@linutronix.de \
--cc=vbabka@suse.cz \
--cc=vdavydov.dev@gmail.com \
--cc=will@kernel.org \
--cc=x86@kernel.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