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)
Fri, Sep 4, 8:02 PM
Unknown Object (File)
Fri, Sep 4, 11:41 AM
Unknown Object (File)
Fri, Sep 4, 11:35 AM
Unknown Object (File)
Thu, Sep 3, 1:25 PM
Unknown Object (File)
Thu, Sep 3, 10:45 AM
Unknown Object (File)
Tue, Sep 1, 1:16 PM
Unknown Object (File)
Tue, Sep 1, 12:17 PM
Unknown Object (File)
Tue, Sep 1, 10:54 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.