Page MenuHomeFreeBSD

vm_reserv_reclaim_contig: Return NULL not false
ClosedPublic

Authored by minsoochoo0122_proton.me on Apr 7 2024, 5:44 AM.
Referenced Files
F102841848: D44667.id136640.diff
Sun, Nov 17, 9:12 PM
F102839901: D44667.id136839.diff
Sun, Nov 17, 8:35 PM
Unknown Object (File)
Oct 2 2024, 4:55 AM
Unknown Object (File)
Sep 30 2024, 12:40 AM
Unknown Object (File)
Sep 20 2024, 12:21 PM
Unknown Object (File)
Sep 17 2024, 5:52 PM
Unknown Object (File)
Sep 16 2024, 6:18 PM
Unknown Object (File)
Sep 16 2024, 4:05 AM

Details

Summary

Since vm_page_t is a typedef of a pointer to struct vm_page, returning
false is undefined.

Test Plan

make buildkernel

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 56953
Build 53841: arc lint + arc unit

Event Timeline

I'm not completely familar with FreeBSD's virtual memory system. But it seems the comment still doesn't match the code. Doesn't it return m_ret when the reclaim is successful and null when failed?

zlei added a subscriber: zlei.

Looks good to me.

sys/vm/vm_reserv.c
1195

English is not my tone but it sounds 'or' is more appropriate.

1197

The return type was changed from bool to vm_page_t by commit 0d5fac287294 (vm: alloc pages from reserv before breaking it) but the comments are left unchanged.

This revision is now accepted and ready to land.Apr 10 2024, 8:56 AM