[Midnightbsd-cvs] [MidnightBSD/src] 7b6a4c: x86/busdma: Limit reserved pages if low nsegs

Lucas Holt noreply at github.com
Wed Oct 26 13:51:28 EDT 2022


  Branch: refs/heads/master
  Home:   https://github.com/MidnightBSD/src
  Commit: 7b6a4cfd128682eb06868918a928a05ef191bd8b
      https://github.com/MidnightBSD/src/commit/7b6a4cfd128682eb06868918a928a05ef191bd8b
  Author: Lucas Holt <luke at foolishgames.com>
  Date:   2022-10-26 (Wed, 26 Oct 2022)

  Changed paths:
    M sys/x86/x86/busdma_bounce.c

  Log Message:
  -----------
  x86/busdma: Limit reserved pages if low nsegs
When bus_dmamap_create is called, if bouncing might be required we
reserve enough pages for a maximum-length request, subject to the
MAX_BPAGES constraint (32 MB on amd64; 32 MB or 2 MB on i386
depending on the amount of RAM).

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.

Obtained from FreeBSD, b7761f1f0830fc4b4bd7a1f9f364cfb39b7f4288




More information about the Midnightbsd-cvs mailing list