[Bug 293382] Dead lock and kernel crash around closefp_impl
- In reply to: bugzilla-noreply_a_freebsd.org: "[Bug 293382] Dead lock and kernel crash around closefp_impl"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 17 Apr 2026 20:24:57 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=293382
--- Comment #96 from Kyle Evans <kevans@freebsd.org> ---
(In reply to Alan Cox from comment #95)
AFAICT, they're very careful to avoid using it outside of hugetlb contexts.
For example, they have this `invlpgb_kernel_range_flush` (which is maybe a
close analog for what the patch touches that calls `invlpgb_flush_addr_nosync`,
which uses a fixed `PTE_STRIDE`:
```
/* Flush addr, including globals, for all PCIDs. */
static inline void invlpgb_flush_addr_nosync(unsigned long addr, u16 nr)
{
__invlpgb(0, 0, addr, nr, PTE_STRIDE, INVLPGB_FLAG_INCLUDE_GLOBAL);
}
/* Flush an arbitrarily large range of memory with INVLPGB. */
static void invlpgb_kernel_range_flush(struct flush_tlb_info *info)
{
unsigned long addr, nr;
for (addr = info->start; addr < info->end; addr += nr << PAGE_SHIFT) {
nr = (info->end - addr) >> PAGE_SHIFT;
/*
* INVLPGB has a limit on the size of ranges it can
* flush. Break up large flushes.
*/
nr = clamp_val(nr, 1, invlpgb_count_max);
invlpgb_flush_addr_nosync(addr, nr);
}
__tlbsync();
}
```
--
You are receiving this mail because:
You are the assignee for the bug.