diff options
| author | Andrew Gallatin <gallatin@FreeBSD.org> | 2025-11-05 23:58:33 +0000 |
|---|---|---|
| committer | Andrew Gallatin <gallatin@FreeBSD.org> | 2025-11-05 23:58:33 +0000 |
| commit | 9349214a28152a3cb2424459976f571a9c8fc5df (patch) | |
| tree | e99d03ad0628e786065280171bf33a29a6b97074 /contrib/netbsd-tests/kernel/(public-mirror) | |
| parent | a7c558b4ade848da31a6d36d1d47e7031bc7d82e (diff) | |
Change tag preallocation to happen asynchronously when an interface is
brought up, so as to reduce boot times when preallocating tags.
- A new mlx5-tls-prealloc_wq is allocated when preallocation is
desired, and started when an interface is opened
- The bulk of the prealloc code remains the same, except the
allocations are now M_NOWAIT. M_NOWAIT is needed because, since the
preallocation is done asynchronously, and since tag allocation is
not instant, we could race with a real TLS session trying to
allocate a tag. Note that in this case, we take allocation failure
as a sign that we were unable to obtain the entire zone due to there
being other consumers. This was suggested by @markj as a way to
keep things simple, after discussing why uma_zone_get_cur() didn't
immediately report a fully allocated zone. If this turns out to be
problematic, we could use uma_zone_set_maxaction() to stop
pre-allocations (also suggested by Mark)
Reviewed by: glebius, kib, markj
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D53570
Diffstat (limited to 'contrib/netbsd-tests/kernel/(public-mirror)')
0 files changed, 0 insertions, 0 deletions
