Page MenuHomeFreeBSD

vm_object: use reclaim callback to free pages
ClosedPublic

Authored by dougm on Jun 14 2024, 7:31 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Nov 17, 5:04 AM
Unknown Object (File)
Sun, Nov 17, 4:43 AM
Unknown Object (File)
Fri, Nov 1, 5:46 AM
Unknown Object (File)
Fri, Nov 1, 3:32 AM
Unknown Object (File)
Thu, Oct 31, 11:28 AM
Unknown Object (File)
Thu, Oct 31, 10:55 AM
Unknown Object (File)
Oct 19 2024, 1:34 AM
Unknown Object (File)
Oct 18 2024, 9:37 AM
Subscribers

Details

Summary

Instead of iterating over object->memq to free pages, use a callback in VM_RADIX_PCTRIE_RECLAIM_CALLBACK to do it.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

dougm requested review of this revision.Jun 14 2024, 7:31 AM
dougm created this revision.

So the point here is to move us away from needing memq at all, correct? Taking this patch by itself, I am not seeing a performance benefit (different from your other recent uses of PCTRIE_RECLAIM_CALLBACK).

I'm not against this, I just want to make sure I understand.

sys/vm/vm_object.c
880

Nitpick:

I'd suggest choosing a name that more closely associates this with vm_object_terminate_pages, or at least doesn't read as very generic, because this routine can only be used from vm_object_terminate_pages, as it obviously doesn't do the normal cleanup. E.g. it reads as generic as vm_object_page_remove, but actually is specialized.

This revision is now accepted and ready to land.Jun 16 2024, 2:10 AM

So the point here is to move us away from needing memq at all, correct? Taking this patch by itself, I am not seeing a performance benefit (different from your other recent uses of PCTRIE_RECLAIM_CALLBACK).

I'm not against this, I just want to make sure I understand.

@alc suggested this, so I did it. Now, asked if he'd like to see memq replaced by pctrie iterators, he seems unenthusiastic.

dougm retitled this revision from vm_object: use reclaim callbak to free pages to vm_object: use reclaim callback to free pages.

Update callback function name and surrounding comments. No functional change.

This revision now requires review to proceed.Jun 26 2024, 5:04 AM
This revision is now accepted and ready to land.Jun 27 2024, 3:35 AM
This revision was automatically updated to reflect the committed changes.