Page MenuHomeFreeBSD

[PowerPC64] fix uma_small_free panic
ClosedPublic

Authored by alfredo on Mar 2 2020, 9:37 PM.
Referenced Files
Unknown Object (File)
Tue, Dec 10, 12:30 AM
Unknown Object (File)
Nov 22 2024, 8:06 PM
Unknown Object (File)
Nov 15 2024, 9:02 PM
Unknown Object (File)
Nov 10 2024, 4:52 PM
Unknown Object (File)
Sep 30 2024, 6:40 AM
Unknown Object (File)
Sep 24 2024, 8:55 AM
Unknown Object (File)
Sep 19 2024, 3:44 PM
Unknown Object (File)
Sep 16 2024, 10:23 PM
Subscribers

Details

Summary

This fixes panic like "Freeing UMA block at 0xc00000004b0ce000 with no associated page", reproduced when huge pages is not enabled and system starts using swap.

Solution provided by jhibbits.

Test Plan

Force swap usage running several buildworld threads as well with stress util on powerpc64 QEMU VM.

Diff Detail

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

Event Timeline

Given what I see in uma_small_alloc(), this change really should be unnecessary (uma_small_alloc() returns an identity-mapped page), but relying on that is obviously incorrect. The pmap_kextract() in here is the correct solution.

sys/powerpc/powerpc/uma_machdep.c
102 ↗(On Diff #69089)

I think this should be pmap_kremove() anyway, to match the pmap_kenter() above. Semantically the same, but better symmetry.

alfredo marked an inline comment as done.

replaced pmap_extract by pmap_kextract

System was running under load with latest change for almost 13 hours. Everything seems good.

This revision is now accepted and ready to land.Mar 4 2020, 3:01 PM
This revision was automatically updated to reflect the committed changes.