From: wang wei <a929244872@163.com>
To: tabba@google.com
Cc: ackerleytng@google.com, airlied@gmail.com,
akpm@linux-foundation.org, david@redhat.com,
dri-devel@lists.freedesktop.org, jgg@nvidia.com,
jglisse@redhat.com, jhubbard@nvidia.com, keirf@google.com,
kirill.shutemov@linux.intel.com, linux-mm@kvack.org,
mail@maciej.szmigiero.name, maz@kernel.org,
muchun.song@linux.dev, nouveau@lists.freedesktop.org,
pbonzini@redhat.com, qperret@google.com,
quic_eberman@quicinc.com, roypat@amazon.co.uk, rppt@kernel.org,
seanjc@google.com, simona@ffwll.ch, vannapurve@google.com,
will@kernel.org, willy@infradead.org,
wang wei <a929244872@163.com>
Subject: Re:[RFC PATCH v1 06/10] mm/hugetlb: use separate folio->_hugetlb_list for hugetlb-internals
Date: Tue, 12 Nov 2024 23:28:49 +0800 [thread overview]
Message-ID: <20241112152849.10369-1-a929244872@163.com> (raw)
In-Reply-To: <20241108162040.159038-7-tabba@google.com>
Signed-off-by: wang wei <a929244872@163.com>
---
>diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
>index 80fef38d9d64..365c73be0bb4 100644
>--- a/include/linux/mm_types.h
>+++ b/include/linux/mm_types.h
>@@ -310,6 +310,7 @@ typedef struct {
> * @_hugetlb_cgroup: Do not use directly, use accessor in hugetlb_cgroup.h.
> * @_hugetlb_cgroup_rsvd: Do not use directly, use accessor in hugetlb_cgroup.h.
> * @_hugetlb_hwpoison: Do not use directly, call raw_hwp_list_head().
>+ * @_hugetlb_list: To be used in hugetlb core code only.
> * @_deferred_list: Folios to be split under memory pressure.
> * @_unused_slab_obj_exts: Placeholder to match obj_exts in struct slab.
> *
>@@ -397,6 +398,17 @@ struct folio {
> };
> struct page __page_2;
> };
>+ union {
>+ struct {
>+ unsigned long _flags_3;
>+ unsigned long _head_3;
>+ /* public: */
>+ struct list_head _hugetlb_list;
>+ /* private: the union with struct page is transitional */
>+ };
>+ struct page __page_3;
>+ };
>+
> };
>
As far as I know, increasing the size of folio maybe decrease
the revenue of HVO, do you measure it?
> #define FOLIO_MATCH(pg, fl) \
>@@ -433,6 +445,12 @@ FOLIO_MATCH(compound_head, _head_2);
> FOLIO_MATCH(flags, _flags_2a);
> FOLIO_MATCH(compound_head, _head_2a);
> #undef FOLIO_MATCH
>+#define FOLIO_MATCH(pg, fl) \
>+ static_assert(offsetof(struct folio, fl) == \
>+ offsetof(struct page, pg) + 3 * sizeof(struct page))
>+FOLIO_MATCH(flags, _flags_3);
>+FOLIO_MATCH(compound_head, _head_3);
>+#undef FOLIO_MATCH
>
> /**
> * struct ptdesc - Memory descriptor for page tables.
--
2.25.1
next prev parent reply other threads:[~2024-12-05 15:23 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-08 16:20 [RFC PATCH v1 00/10] mm: Introduce and use folio_owner_ops Fuad Tabba
2024-11-08 16:20 ` [RFC PATCH v1 01/10] mm/hugetlb: rename isolate_hugetlb() to folio_isolate_hugetlb() Fuad Tabba
2024-11-08 16:20 ` [RFC PATCH v1 02/10] mm/migrate: don't call folio_putback_active_hugetlb() on dst hugetlb folio Fuad Tabba
2024-11-08 16:20 ` [RFC PATCH v1 03/10] mm/hugetlb: rename "folio_putback_active_hugetlb()" to "folio_putback_hugetlb()" Fuad Tabba
2024-11-08 16:20 ` [RFC PATCH v1 04/10] mm/hugetlb-cgroup: convert hugetlb_cgroup_css_offline() to work on folios Fuad Tabba
2024-11-08 16:20 ` [RFC PATCH v1 05/10] mm/hugetlb: use folio->lru int demote_free_hugetlb_folios() Fuad Tabba
2024-11-08 16:20 ` [RFC PATCH v1 06/10] mm/hugetlb: use separate folio->_hugetlb_list for hugetlb-internals Fuad Tabba
2024-11-12 15:28 ` wang wei [this message]
2024-11-12 15:48 ` David Hildenbrand
2024-11-08 16:20 ` [RFC PATCH v1 07/10] mm: Introduce struct folio_owner_ops Fuad Tabba
2024-11-08 16:20 ` [RFC PATCH v1 08/10] mm: Use getters and setters to access page pgmap Fuad Tabba
2024-11-08 16:20 ` [RFC PATCH v1 09/10] mm: Use owner_ops on folio_put for zone device pages Fuad Tabba
2024-11-08 16:20 ` [RFC PATCH v1 10/10] mm: hugetlb: Use owner_ops on folio_put for hugetlb Fuad Tabba
2024-11-08 17:05 ` [RFC PATCH v1 00/10] mm: Introduce and use folio_owner_ops Jason Gunthorpe
2024-11-08 19:33 ` David Hildenbrand
2024-11-11 8:26 ` Fuad Tabba
2024-11-12 5:26 ` Matthew Wilcox
2024-11-12 9:10 ` David Hildenbrand
2024-11-12 13:53 ` Jason Gunthorpe
2024-11-12 14:22 ` David Hildenbrand
2024-11-13 4:57 ` Matthew Wilcox
2024-11-13 11:27 ` David Hildenbrand
2024-11-14 4:02 ` John Hubbard
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=20241112152849.10369-1-a929244872@163.com \
--to=a929244872@163.com \
--cc=ackerleytng@google.com \
--cc=airlied@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=david@redhat.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=jgg@nvidia.com \
--cc=jglisse@redhat.com \
--cc=jhubbard@nvidia.com \
--cc=keirf@google.com \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-mm@kvack.org \
--cc=mail@maciej.szmigiero.name \
--cc=maz@kernel.org \
--cc=muchun.song@linux.dev \
--cc=nouveau@lists.freedesktop.org \
--cc=pbonzini@redhat.com \
--cc=qperret@google.com \
--cc=quic_eberman@quicinc.com \
--cc=roypat@amazon.co.uk \
--cc=rppt@kernel.org \
--cc=seanjc@google.com \
--cc=simona@ffwll.ch \
--cc=tabba@google.com \
--cc=vannapurve@google.com \
--cc=will@kernel.org \
--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