Page MenuHomeFreeBSD

uma: Use a taskqueue to execute uma_timeout()
ClosedPublic

Authored by markj on Jul 6 2022, 6:41 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Nov 10, 1:20 AM
Unknown Object (File)
Sep 30 2024, 11:17 PM
Unknown Object (File)
Sep 30 2024, 6:29 PM
Unknown Object (File)
Sep 30 2024, 3:11 PM
Unknown Object (File)
Sep 30 2024, 2:54 PM
Unknown Object (File)
Sep 30 2024, 2:55 AM
Unknown Object (File)
Sep 29 2024, 6:55 PM
Unknown Object (File)
Sep 25 2024, 3:57 PM
Subscribers

Details

Summary

uma_timeout() has several responsibilities; it visits every UMA zone and
as of recently will drain underutilized caches, so is rather expensive
(>1ms in some cases). Currently it is executed by softclock threads
and so will preempt most other CPU activity. None of this work requires
a high scheduling priority, though, so defer it to a taskqueue so as to
avoid stalling higher-priority work.

Sponsored by: The FreeBSD Foundation

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

markj requested review of this revision.Jul 6 2022, 6:41 PM
This revision is now accepted and ready to land.Jul 6 2022, 8:30 PM

It might be reasonable to create a dedicated taskqueue thread for UMA, sometime later.

In D35738#810793, @kib wrote:

It might be reasonable to create a dedicated taskqueue thread for UMA, sometime later.

Yes, I think so. We already have a dedicated UMA thread which executes uma_reclaim_worker().

rlibby added inline comments.
sys/vm/uma_core.c
1110

Since both arguments are unused, maybe void *context __unused reads better for the first argument?

Use better parameter names.

This revision now requires review to proceed.Jul 10 2022, 4:22 PM
This revision was not accepted when it landed; it landed in state Needs Review.Jul 11 2022, 7:59 PM
This revision was automatically updated to reflect the committed changes.