[Ubuntu-24.04] Hugepage memory is not getting released even after destroying the guest!
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
The Ubuntu-power-systems project |
Fix Committed
|
High
|
Ubuntu on IBM Power Systems Bug Triage | ||
linux (Ubuntu) |
Fix Committed
|
High
|
Unassigned | ||
Noble |
Fix Committed
|
High
|
Unassigned |
Bug Description
---Problem Description---
Hugepages memory is not getting released even after destroying the guest
Machine Type = P10 Denali LPAR
---uname output---
Linux ubuntu2404lp3 6.8.0-22-generic #22-Ubuntu SMP Thu Apr 4 22:47:57 UTC 2024 ppc64le ppc64le ppc64le GNU/Linux
---Steps to Reproduce---
1. Create a guest which is backed by hugepages.
2. Destroy the guest
3. execute "free -h" or "cat /proc/meminfo" to see that Hugepage memory is still getting held.
HugePages_Total: 20480
HugePages_Free: 20419
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 2048 kB
Hugetlb: 41943040 kB
DirectMap4k: 0 kB
DirectMap64k: 52428800 kB
DirectMap2M: 0 kB
DirectMap1G: 0 kB
root@ubuntu2404
Id Name State
-------
- ramlp2g1 shut off
- ramlp2g2 shut off
- ramlp2g3 shut off
- ramlp3g3 shut off
root@ubuntu2404
Mem: 48Gi 43Gi 4.6Gi 2.6Mi 277Mi 4.6Gi
Swap: 8.0Gi 243Mi 7.8Gi
root@ubuntu2404
====
This is an issue created by commit 1b151e2435fc ("block: Remove special-casing of compound pages") that moved the direct-io hugetlb handling from compound pages to folios.
Following commit has been proposed and merged into 6.9-rc1 which fixes this issue.
38b43539d64b2fa
So the same needs to be backported to the Ubuntu24.04 kernel as well.
tags: | added: architecture-ppc64le bugnameltc-206058 severity-high targetmilestone-inin2404 |
Changed in ubuntu: | |
assignee: | nobody → Ubuntu on IBM Power Systems Bug Triage (ubuntu-power-triage) |
affects: | ubuntu → linux (Ubuntu) |
Changed in linux (Ubuntu): | |
status: | New → Confirmed |
I just had a look at noble's master-next tree: launchpad. net/~ubuntu- kernel/ ubuntu/ +source/ linux/+ git/noble
$ git remote get-url origin
git://git.
$ git branch
* master-next
and found that commit 19c1ceeca8ed is already applied: pages" pages()
$ git log --oneline | grep -n "block: Fix page refcounts for unaligned buffers in __bio_release_
300:19c1ceeca8ed block: Fix page refcounts for unaligned buffers in __bio_release_
but not yet tagged with (incl. in) any version:
$ git tag --contains 19c1ceeca8ed
$
This is probably because it just came in via upstream stable updates: 207859e659482ee 83ea1959f5
$ git show 19c1ceeca8ed | sed '/^diff --git/q'
commit 19c1ceeca8ed31d
Author: Tony Battersby <email address hidden>
Date: Thu Feb 29 13:08:09 2024 -0500
block: Fix page refcounts for unaligned buffers in __bio_release_ pages()
BugLink: https:/ /bugs.launchpad .net/bugs/ 2060531
[ Upstream commit 38b43539d64b2fa 020b3b9a752a986 769f87f7a6 ]
Fix an incorrect number of pages being released for buffers that do not
start at the beginning of a page.
Fixes: 1b151e2435fc ("block: Remove special-casing of compound pages")
Cc: <email address hidden>
Signed-off-by: Tony Battersby <email address hidden>
Tested-by: Greg Edwards <email address hidden>
Link: https://<email address hidden>
Signed-off-by: Jens Axboe <email address hidden>
Signed-off-by: Sasha Levin <email address hidden>
Signed-off-by: Paolo Pisati <email address hidden>
diff --git a/block/bio.c b/block/bio.c
And since the lastest tagged Ubuntu kernel version in master-next is: Ubuntu-6.8.0-31.31
$ git log --oneline | grep -n $(git describe --tags --abbrev=0)
1170:7fdb45c9bbbc (tag: Ubuntu-6.8.0-31.31) UBUNTU: Ubuntu-6.8.0-31.31
commit 19c1ceeca8ed will be automatically part of the next/upcoming Ubuntu kernel (> Ubuntu- 6.8.0-31. 31).
With that I'm updating the status of this bug to Fix Committed.