From nobody Sat Oct 22 20:53:03 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Mvtp91Tv6z4g5GH for ; Sat, 22 Oct 2022 20:53:05 +0000 (UTC) (envelope-from cperciva@freebsd.org) Received: from mail.tarsnap.com (mail.tarsnap.com [54.86.246.204]) by mx1.freebsd.org (Postfix) with SMTP id 4Mvtp827XZz3F10 for ; Sat, 22 Oct 2022 20:53:04 +0000 (UTC) (envelope-from cperciva@freebsd.org) Received: (qmail 64378 invoked from network); 22 Oct 2022 20:53:03 -0000 Received: from unknown (HELO dell7390.daemonology.net) (127.0.0.1) by mail.tarsnap.com with SMTP; 22 Oct 2022 20:53:03 -0000 Received: (qmail 83692 invoked from network); 22 Oct 2022 20:53:03 -0000 Received: from unknown (HELO ?127.0.0.1?) (127.0.0.1) by localhost with SMTP; 22 Oct 2022 20:53:03 -0000 Message-ID: Date: Sat, 22 Oct 2022 13:53:03 -0700 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.4.0 Subject: Re: git: b7761f1f0830 - main - x86/busdma: Limit reserved pages if low nsegs Content-Language: en-US To: "Bjoern A. Zeeb" Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202210220548.29M5mNP3077218@gitrepo.freebsd.org> <8o30on4n-861q-4p20-26sq-ssrnnn42415p@mnoonqbm.arg> From: Colin Percival In-Reply-To: <8o30on4n-861q-4p20-26sq-ssrnnn42415p@mnoonqbm.arg> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4Mvtp827XZz3F10 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=softfail (mx1.freebsd.org: 54.86.246.204 is neither permitted nor denied by domain of cperciva@freebsd.org) smtp.mailfrom=cperciva@freebsd.org X-Spamd-Result: default: False [0.50 / 15.00]; VIOLATED_DIRECT_SPF(3.50)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-0.998]; MIME_GOOD(-0.10)[text/plain]; RCVD_NO_TLS_LAST(0.10)[]; R_DKIM_NA(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[54.86.246.204:from]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; MLMMJ_DEST(0.00)[dev-commits-src-all@FreeBSD.org]; ARC_NA(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; ASN(0.00)[asn:14618, ipnet:54.86.0.0/16, country:US]; RCPT_COUNT_THREE(0.00)[4]; FREEFALL_USER(0.00)[cperciva]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_SOME(0.00)[]; DMARC_NA(0.00)[freebsd.org]; FROM_HAS_DN(0.00)[]; R_SPF_SOFTFAIL(0.00)[~all]; MID_RHS_MATCH_FROM(0.00)[] X-ThisMailContainsUnwantedMimeParts: N 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