From: Yu Zhao <yuzhao@google.com>
To: Andrew Morton <akpm@linux-foundation.org>,
Muchun Song <muchun.song@linux.dev>
Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org>,
Zi Yan <ziy@nvidia.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Yu Zhao <yuzhao@google.com>
Subject: [PATCH mm-unstable v1 0/3] mm/hugetlb: alloc/free gigantic folios
Date: Sun, 11 Aug 2024 15:21:26 -0600 [thread overview]
Message-ID: <20240811212129.3074314-1-yuzhao@google.com> (raw)
Use __GFP_COMP for gigantic folios can greatly reduce not only the
complexity in the code but also the allocation and free time.
Approximate LOC to mm/hugetlb.c: -200, +50
Allocate and free 500 1GB hugeTLB memory without HVO by:
time echo 500 >/sys/kernel/mm/hugepages/hugepages-1048576kB/nr_hugepages
time echo 0 >/sys/kernel/mm/hugepages/hugepages-1048576kB/nr_hugepages
Before After
Alloc ~13s ~10s
Free ~15s <1s
The above magnitude generally holds for multiple x86 and arm64 CPU
models.
Yu Zhao (3):
mm/contig_alloc: support __GFP_COMP
mm/cma: add cma_alloc_folio()
mm/hugetlb: use __GFP_COMP for gigantic folios
include/linux/cma.h | 1 +
include/linux/hugetlb.h | 9 +-
mm/cma.c | 47 +++++---
mm/compaction.c | 48 +-------
mm/hugetlb.c | 244 ++++++++--------------------------------
mm/internal.h | 9 ++
mm/page_alloc.c | 111 +++++++++++++-----
7 files changed, 177 insertions(+), 292 deletions(-)
base-commit: b447504e1fed49fabbc03d6c2530126824f87c92
prerequisite-patch-id: 9fe502f7c87a9f951d0aee61f426bd85bc43ef74
--
2.46.0.76.ge559c4bf1a-goog
next reply other threads:[~2024-08-11 21:21 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-11 21:21 Yu Zhao [this message]
2024-08-11 21:21 ` [PATCH mm-unstable v1 1/3] mm/contig_alloc: support __GFP_COMP Yu Zhao
2024-08-11 21:21 ` [PATCH mm-unstable v1 2/3] mm/cma: add cma_alloc_folio() Yu Zhao
2024-08-15 14:40 ` Kefeng Wang
2024-08-15 18:04 ` Yu Zhao
2024-08-15 18:25 ` Yu Zhao
2024-08-15 18:48 ` Usama Arif
2024-08-11 21:21 ` [PATCH mm-unstable v1 3/3] mm/hugetlb: use __GFP_COMP for gigantic folios Yu Zhao
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=20240811212129.3074314-1-yuzhao@google.com \
--to=yuzhao@google.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=muchun.song@linux.dev \
--cc=willy@infradead.org \
--cc=ziy@nvidia.com \
/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®