Page MenuHomeFreeBSD

call vm_lowmem hook in uma_reclaim_worker
ClosedPublic

Authored by avg on Feb 23 2017, 12:05 PM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 19 2024, 10:32 AM
Unknown Object (File)
Feb 16 2024, 7:50 AM
Unknown Object (File)
Feb 16 2024, 6:40 AM
Unknown Object (File)
Jan 26 2024, 7:41 AM
Unknown Object (File)
Dec 23 2023, 11:39 AM
Unknown Object (File)
Dec 14 2023, 5:57 PM
Unknown Object (File)
Dec 12 2023, 12:34 AM
Unknown Object (File)
Nov 12 2023, 3:14 AM
Subscribers

Details

Summary

A comment near kmem_reclaim() implies that we already did that.
Calling the hook is useful, because some handlers, e.g. ARC,
might be able to release significant amounts of KVA.

Now that we have more than one place where vm_lowmem hook is called,
use this change as an opportunity to introduce flags that describe
a reason for calling the hook. No handler makes use of the flags yet.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

avg retitled this revision from to call vm_lowmem hook in uma_reclaim_worker.
avg updated this object.
avg edited the test plan for this revision. (Show Details)
avg added reviewers: kib, markj.
sys/vm/uma_core.c
3205 ↗(On Diff #25616)

I suggest that some more care is needed there. In particular, I would only clear uma_reclaim_needed after re-acquiring uma_drain_lock.

sys/vm/vm_kern.c
557 ↗(On Diff #25616)

if (i != 0)

sys/vm/vm_pageout.h
92 ↗(On Diff #25616)

If these can be ORed together as suggested by the check in debug_vm_lowmem(), it'd be clearer to use hex constants.

sys/vm/uma_core.c
3205 ↗(On Diff #25616)

I am not sure if that would actually make any difference, because that flag is already sloppy in a sense that it's set without holding the lock.

sys/vm/vm_kern.c
557 ↗(On Diff #25616)

Okay.

sys/vm/vm_pageout.h
92 ↗(On Diff #25616)

Sure. Will do.

markj edited edge metadata.
This revision is now accepted and ready to land.Feb 24 2017, 5:12 PM
kib edited edge metadata.
kib added inline comments.
sys/vm/vm_pageout.h
92 ↗(On Diff #25650)

I would call it VM_LOW_KMEM or VM_FRAG_KMEM.

This revision was automatically updated to reflect the committed changes.