Page MenuHomeFreeBSD

kern/dev/xen: Use the per-blkback-device uma(9) zone for the bio.
Needs ReviewPublic

Authored by seigo.tanimura_gmail.com on May 27 2024, 10:09 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Jun 24, 12:42 AM
Unknown Object (File)
Mon, Jun 3, 1:01 PM
Unknown Object (File)
Wed, May 29, 4:28 PM

Details

Reviewers
olce
royger
Summary

The usage is essentially the same as the VM swap pager.

  • New Loader Tunable & Sysctl Entry
  • hw.xbd.xbb_reserved_new_bios The number of the bios reserved and preallocated per device. This is writable for hotplug.

Signed-off-by: Seigo Tanimura <seigo.tanimura@gmail.com>

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 57934
Build 54822: arc lint + arc unit

Event Timeline

The one to consider D45381 is @royger who handles the Xen interface for FreeBSD.

At first glance this looks plausible, though running on Xen might mean some decisions should be different.

Some questions. I mostly miss where g_io_new_uz() and the new set of helpers are introduced, as I'm not finding them in main git branch yet?

Since this seems to be a performance improvement, do you have some figures on how much of a performance difference does this change make?

sys/dev/xen/blkback/blkback.c
75

Ideally includes should be sorted alphabetically if possible, so vm/uma.h should be at the top of the vm/ group.

765

static unsigned int, and the max amount of in-flight BIOs blkback can currently handle is set by XBB_MAX_REQUESTS.

2002

Does this change depend on some unmerged stuff? I'm not able to find g_new_bio_uz() on the current main branch, neither g_io_new_uz(). How does it behave when it gets passed NULL as argument.

2003

If the uma pool is allocated to account for the maximum amuont of possible in-flights BIOs, the bio == NULL is no longer possible, and hence a KASSERT should be added inside of the if expression block.

@royger under "Revision Contents" select the red tab "Stack (2 Open)". This is how Phabricator handles series and interrelated commits. The bits you were wondering about are there.