Page MenuHomeFreeBSD

[uma-multipage 2/3] uma: convert mbuf_jumbo_alloc & pmap_pdpt_alloc to UMA_ZONE_CONTIG
ClosedPublic

Authored by rlibby on Jan 17 2020, 5:47 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Dec 10, 7:40 PM
Unknown Object (File)
Nov 29 2024, 12:12 AM
Unknown Object (File)
Oct 29 2024, 8:03 AM
Unknown Object (File)
Oct 3 2024, 7:59 PM
Unknown Object (File)
Oct 1 2024, 3:01 PM
Unknown Object (File)
Sep 28 2024, 9:14 AM
Unknown Object (File)
Sep 9 2024, 12:11 AM
Unknown Object (File)
Sep 5 2024, 3:46 AM

Details

Test Plan

kyua test -k /usr/tests/sys/Kyuafile

Diff Detail

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

Event Timeline

This revision is now accepted and ready to land.Jan 17 2020, 5:53 PM

Why did you convert all mbuf zones to contig? Only jumbo 9k and jumbo 16k really require that.

else if ((keg->uk_flags & UMA_ZONE_CONTIG) != 0 && keg->uk_ppera > 1)

		keg->uk_allocf = contig_alloc;

Note that CONTIG just specifies a constraint. It does not force the allocator change unless we're allocating more than one page. This was specified for mbufs because drivers do expect them to be contig and if UMA makes a layout decision that forces them into multiple pages we need to be sure to honor the constraint.

I see. That's because in next review we may produce multipage slabs with an allocation crossing a boundary.

Yes, that's right. In fact, the smaller mbufs are actually still okay with multipage slabs due to their power-of-2 size, but I thought it was better to make the constraint explicit.

sys/i386/i386/pmap.c
907 ↗(On Diff #66923)

Aren't you relaxing a constraint here? vm_paddr_t is always 64 bits wide but the PDPT physical address has to fit in CR3, which is a 32-bit register.

sys/i386/i386/pmap.c
907 ↗(On Diff #66923)

You're right, I'll revert the pmap changes and just add UMA_ZONE_CONTIG to the flags here.

review feedback: leave pmap_pdpt_allocf alone, just tag the zone.

Also tag the zones using slb_uma_real_alloc (it does contig allocs).

This revision now requires review to proceed.Jan 18 2020, 8:25 PM
This revision is now accepted and ready to land.Jan 18 2020, 9:11 PM

Fix CTR/KASSERT after dropping some local variables

This revision now requires review to proceed.Feb 4 2020, 7:49 PM

Fix CTR/KASSERT after dropping some local variables

Oops, ignore, that was intended for the next patch.

This revision was not accepted when it landed; it landed in state Needs Review.Feb 4 2020, 10:40 PM
This revision was automatically updated to reflect the committed changes.