lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5d0ededd93c4cd33a78c43c12d5075be2eea9674.1728684491.git.ackerleytng@google.com>
Date: Fri, 11 Oct 2024 23:22:38 +0000
From: Ackerley Tng <ackerleytng@...gle.com>
To: muchun.song@...ux.dev, peterx@...hat.com, akpm@...ux-foundation.org, 
	rientjes@...gle.com, fvdl@...gle.com, jthoughton@...gle.com, david@...hat.com
Cc: isaku.yamahata@...el.com, zhiquan1.li@...el.com, fan.du@...el.com, 
	jun.miao@...el.com, tabba@...gle.com, quic_eberman@...cinc.com, 
	roypat@...zon.co.uk, jgg@...dia.com, jhubbard@...dia.com, seanjc@...gle.com, 
	pbonzini@...hat.com, erdemaktas@...gle.com, vannapurve@...gle.com, 
	ackerleytng@...gle.com, pgonda@...gle.com, linux-kernel@...r.kernel.org, 
	linux-mm@...ck.org
Subject: [RFC PATCH 3/3] mm: hugetlb: Remove unnecessary check for avoid_reserve

If avoid_reserve is true, gbl_chg is not used anyway, so there is no
point in setting gbl_chg.

Signed-off-by: Ackerley Tng <ackerleytng@...gle.com>
---
 mm/hugetlb.c | 10 ----------
 1 file changed, 10 deletions(-)

diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index 47c421eba112..a2e2b770a018 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -3009,16 +3009,6 @@ struct folio *alloc_hugetlb_folio(struct vm_area_struct *vma,
 		if (gbl_chg < 0)
 			goto out_end_reservation;

-		/*
-		 * Even though there was no reservation in the region/reserve
-		 * map, there could be reservations associated with the
-		 * subpool that can be used.  This would be indicated if the
-		 * return value of hugepage_subpool_get_pages() is zero.
-		 * However, if avoid_reserve is specified we still avoid even
-		 * the subpool reservations.
-		 */
-		if (avoid_reserve)
-			gbl_chg = 1;
 	}

 	/* If this allocation is not consuming a reservation, charge it now.
--
2.47.0.rc1.288.g06298d1525-goog

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ