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] [day] [month] [year] [list]
Message-Id: <8112FABF-726A-4C6F-ABE3-D2D917334366@linux.dev>
Date: Wed, 28 May 2025 10:45:07 +0800
From: Muchun Song <muchun.song@...ux.dev>
To: yangge1116@....com
Cc: akpm@...ux-foundation.org,
 linux-mm@...ck.org,
 linux-kernel@...r.kernel.org,
 21cnbao@...il.com,
 david@...hat.com,
 baolin.wang@...ux.alibaba.com,
 osalvador@...e.de,
 liuzixing@...on.cn
Subject: Re: [PATCH V2] mm/hugetlb: remove unnecessary holding of hugetlb_lock



> On May 27, 2025, at 11:36, yangge1116@....com wrote:
> 
> From: Ge Yang <yangge1116@....com>
> 
> In the isolate_or_dissolve_huge_folio() function, after acquiring the
> hugetlb_lock, it is only for the purpose of obtaining the correct hstate,
> which is then passed to the alloc_and_dissolve_hugetlb_folio() function.
> 
> The alloc_and_dissolve_hugetlb_folio() function itself also acquires the
> hugetlb_lock. We can have the alloc_and_dissolve_hugetlb_folio() function
> obtain the hstate by itself, so that the isolate_or_dissolve_huge_folio()
> function no longer needs to acquire the hugetlb_lock. In addition, we keep
> the folio_test_hugetlb() check within the isolate_or_dissolve_huge_folio()
> function. By doing so, we can avoid disrupting the normal path by vainly
> holding the hugetlb_lock.
> 
> The replace_free_hugepage_folios() function has the same issue, and we
> should address it as well.
> 
> Suggested-by: Oscar Salvador <osalvador@...e.de>
> Signed-off-by: Ge Yang <yangge1116@....com>

Reviewed-by: Muchun Song <muchun.song@...ux.dev>

Thanks.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ