Page MenuHomeFreeBSD

Change swp_pager_meta_ctl to swp_pager_meta_lookup
ClosedPublic

Authored by dougm on Mon, Nov 18, 4:26 AM.

Details

Summary

Drop the extra argument from swp_pager_meta_ctl and have it do lookup only. Stop checking for obj->type == swap and assert it instead. Move the meta_ctl 'pop' functionality to swap_pager_unswapped, the only place that uses it, and assume obj->type == swap there too.

The assertion added to swap_pager_get_pages_async needs expertimental verification, or a look from someone who knows better when that function gets invoked.

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

dougm created this revision.Mon, Nov 18, 4:26 AM
dougm updated this revision to Diff 64515.Mon, Nov 18, 4:42 AM

Make that a write lock on deletion.

dougm updated this revision to Diff 64516.Mon, Nov 18, 4:53 AM
dougm added a subscriber: ota_j.email.ne.jp.

Fix a leak pointed out by Ota on a different review thread.

dougm updated this revision to Diff 64517.Mon, Nov 18, 4:57 AM

Missing semicolon.

pho added a comment.Mon, Nov 18, 12:01 PM
20191118 12:46:52 all (2/12): sort.sh
panic: Lookup object not swappable
cpuid = 5
time = 1574077630
KDB: stack backtrace:
db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe00e3f802a0
vpanic() at vpanic+0x17e/frame 0xfffffe00e3f80300
panic() at panic+0x43/frame 0xfffffe00e3f80360
swp_pager_meta_lookup() at swp_pager_meta_lookup+0x68/frame 0xfffffe00e3f80390
swp_pager_xfer_source() at swp_pager_xfer_source+0x66/frame 0xfffffe00e3f803d0
swp_pager_meta_transfer() at swp_pager_meta_transfer+0x1b1/frame 0xfffffe00e3f80450
swap_pager_copy() at swap_pager_copy+0x267/frame 0xfffffe00e3f80480
vm_object_collapse() at vm_object_collapse+0x178/frame 0xfffffe00e3f804f0
vm_object_deallocate() at vm_object_deallocate+0x4b1/frame 0xfffffe00e3f80540
vm_map_process_deferred() at vm_map_process_deferred+0xad/frame 0xfffffe00e3f80560
vm_map_remove() at vm_map_remove+0xeb/frame 0xfffffe00e3f80590
exec_new_vmspace() at exec_new_vmspace+0x186/frame 0xfffffe00e3f805f0
exec_elf64_imgact() at exec_elf64_imgact+0x82a/frame 0xfffffe00e3f806e0
kern_execve() at kern_execve+0x5e9/frame 0xfffffe00e3f80a40
sys_execve() at sys_execve+0x4c/frame 0xfffffe00e3f80ac0
amd64_syscall() at amd64_syscall+0x2d0/frame 0xfffffe00e3f80bf0
fast_syscall_common() at fast_syscall_common+0x101/frame 0xfffffe00e3f80bf0
--- syscall (59, FreeBSD ELF64, sys_execve), rip = 0x80086675a, rsp = 0x7fffffffe728, rbp = 0x7fffffffe730 ---

https://people.freebsd.org/~pho/stress/log/dougm064.txt

dougm updated this revision to Diff 64526.Mon, Nov 18, 3:21 PM

Add dstobject->type == OBJT_SWAP test in swp_pager_xfer_source.

kib accepted this revision.Mon, Nov 18, 3:41 PM
This revision is now accepted and ready to land.Mon, Nov 18, 3:41 PM
pho added a comment.Tue, Nov 19, 7:42 AM

I ran tests with Diff 64526 for 16 hours without seeing any problems.