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
F156512918: D35738.id107984.diff
Thu, May 14, 7:27 AM
F156506277: D35738.id107855.diff
Thu, May 14, 5:46 AM
Unknown Object (File)
Wed, May 13, 4:51 PM
Unknown Object (File)
Wed, May 13, 11:54 AM
Unknown Object (File)
Wed, May 6, 1:20 AM
Unknown Object (File)
Sun, May 3, 6:10 PM
Unknown Object (File)
Sun, May 3, 4:28 AM
Unknown Object (File)
Sun, May 3, 4:15 AM
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.