Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 22 Oct 2022 13:53:03 -0700
From:      Colin Percival <cperciva@freebsd.org>
To:        "Bjoern A. Zeeb" <bz@FreeBSD.org>
Cc:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   Re: git: b7761f1f0830 - main - x86/busdma: Limit reserved pages if low nsegs
Message-ID:  <c2833b44-efa3-0299-6915-3ac02724932b@freebsd.org>
In-Reply-To: <8o30on4n-861q-4p20-26sq-ssrnnn42415p@mnoonqbm.arg>
References:  <202210220548.29M5mNP3077218@gitrepo.freebsd.org> <8o30on4n-861q-4p20-26sq-ssrnnn42415p@mnoonqbm.arg>

next in thread | previous in thread | raw e-mail | index | archive | help
On 10/22/22 13:07, Bjoern A. Zeeb wrote:
> On Sat, 22 Oct 2022, Colin Percival wrote:
>>    Since pages used for bouncing are typically non-consecutive, each
>>    bounced page will typically constitute a busdma segment; as such, we
>>    are unlikely to ever successfully use more pages than the nsegments
>>    limit.  Limit the number of pages reserved to nsegments.
> 
> This is an interesting observation.  LinuxKPI desperately needs more
> consecutive pages but can only ever use one segment.
> 
> We do have observed cases of bouncing failing due to the LinuxKPI
> constraints and what busdma provided.

Similar issue with Firecracker -- its virtio block backend only supports a
single data segment, so for now our virtio_blk driver is limited to 4 kB
I/Os.  I was considering adding code to virtio_blk to reserve a contiguous
buffer and use it when busdma failed, but theoretically this could be done
in busdma instead.

-- 
Colin Percival
Security Officer Emeritus, FreeBSD | The power to serve
Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?c2833b44-efa3-0299-6915-3ac02724932b>