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)
Feb 15 2024, 1:54 AM
Unknown Object (File)
Jan 30 2024, 10:45 PM
Unknown Object (File)
Jan 15 2024, 1:08 AM
Unknown Object (File)
Dec 20 2023, 7:18 AM
Unknown Object (File)
Oct 16 2023, 7:50 PM
Unknown Object (File)
Oct 7 2023, 2:04 AM
Unknown Object (File)
Aug 6 2023, 7:46 AM
Unknown Object (File)
May 9 2023, 11:19 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.