[SeaBIOS] [PATCH 0/4] Avoid using f-segment memory for virtio

Kevin O'Connor posted 4 patches 6 years, 9 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/seabios tags/patchew/20170711165032.2443-1-kevin@koconnor.net
src/block.c          |  36 ++++-----
src/block.h          |   2 +-
src/boot.c           |  16 ++--
src/cdrom.c          |   6 +-
src/disk.c           | 218 +++++++++++++++++++++++++--------------------------
src/hw/ahci.c        |   4 +-
src/hw/ata.c         |  26 +++---
src/hw/blockcmd.c    |  10 +--
src/hw/esp-scsi.c    |   2 +-
src/hw/floppy.c      |  20 ++---
src/hw/lsi-scsi.c    |   2 +-
src/hw/megasas.c     |   2 +-
src/hw/mpt-scsi.c    |   2 +-
src/hw/nvme.c        |   2 +-
src/hw/pvscsi.c      |   2 +-
src/hw/ramdisk.c     |   2 +-
src/hw/sdcard.c      |   2 +-
src/hw/usb-msc.c     |   4 +-
src/hw/usb-uas.c     |   2 +-
src/hw/virtio-blk.c  |  14 ++--
src/hw/virtio-ring.c |   1 -
src/hw/virtio-scsi.c |   5 +-
22 files changed, 189 insertions(+), 191 deletions(-)
[SeaBIOS] [PATCH 0/4] Avoid using f-segment memory for virtio
Posted by Kevin O'Connor 6 years, 9 months ago
This series updates the generic code so that either "low" memory or
the f-segment can be used for storing drive mapping information.  It
also updates the virtio code to use "low" memory for its allocations.
I think there is a good chance this series will, in practice, avoid
running out of memory when a large number of virtio drives are
available.

There are other ways to tackle this problem (eg, more of the virtio
storage could be moved into "high" memory), but I think this approach
has the benefit of avoiding a "big bang" patch series.

Comments welcome.

-Kevin


Kevin O'Connor (4):
  boot: Rename drive_g to drive
  disk: Don't require the 'struct drive_s' to be in the f-segment
  block: Rename disk_op_s->drive_gf to drive_fl
  virtio: Allocate drive_s storage in low memory

 src/block.c          |  36 ++++-----
 src/block.h          |   2 +-
 src/boot.c           |  16 ++--
 src/cdrom.c          |   6 +-
 src/disk.c           | 218 +++++++++++++++++++++++++--------------------------
 src/hw/ahci.c        |   4 +-
 src/hw/ata.c         |  26 +++---
 src/hw/blockcmd.c    |  10 +--
 src/hw/esp-scsi.c    |   2 +-
 src/hw/floppy.c      |  20 ++---
 src/hw/lsi-scsi.c    |   2 +-
 src/hw/megasas.c     |   2 +-
 src/hw/mpt-scsi.c    |   2 +-
 src/hw/nvme.c        |   2 +-
 src/hw/pvscsi.c      |   2 +-
 src/hw/ramdisk.c     |   2 +-
 src/hw/sdcard.c      |   2 +-
 src/hw/usb-msc.c     |   4 +-
 src/hw/usb-uas.c     |   2 +-
 src/hw/virtio-blk.c  |  14 ++--
 src/hw/virtio-ring.c |   1 -
 src/hw/virtio-scsi.c |   5 +-
 22 files changed, 189 insertions(+), 191 deletions(-)

-- 
2.9.4


_______________________________________________
SeaBIOS mailing list
SeaBIOS@seabios.org
https://mail.coreboot.org/mailman/listinfo/seabios
Re: [SeaBIOS] [PATCH 0/4] Avoid using f-segment memory for virtio
Posted by Paolo Bonzini 6 years, 6 months ago
On 11/07/2017 18:50, Kevin O'Connor wrote:
> This series updates the generic code so that either "low" memory or
> the f-segment can be used for storing drive mapping information.  It
> also updates the virtio code to use "low" memory for its allocations.
> I think there is a good chance this series will, in practice, avoid
> running out of memory when a large number of virtio drives are
> available.
> 
> There are other ways to tackle this problem (eg, more of the virtio
> storage could be moved into "high" memory), but I think this approach
> has the benefit of avoiding a "big bang" patch series.
> 
> Comments welcome.

Tested-by: Paolo Bonzini <pbonzini@redhat.com>

Thank you very much for the fix!  It would be nice to have it in 1.11.

Paolo

> -Kevin
> 
> 
> Kevin O'Connor (4):
>   boot: Rename drive_g to drive
>   disk: Don't require the 'struct drive_s' to be in the f-segment
>   block: Rename disk_op_s->drive_gf to drive_fl
>   virtio: Allocate drive_s storage in low memory
> 
>  src/block.c          |  36 ++++-----
>  src/block.h          |   2 +-
>  src/boot.c           |  16 ++--
>  src/cdrom.c          |   6 +-
>  src/disk.c           | 218 +++++++++++++++++++++++++--------------------------
>  src/hw/ahci.c        |   4 +-
>  src/hw/ata.c         |  26 +++---
>  src/hw/blockcmd.c    |  10 +--
>  src/hw/esp-scsi.c    |   2 +-
>  src/hw/floppy.c      |  20 ++---
>  src/hw/lsi-scsi.c    |   2 +-
>  src/hw/megasas.c     |   2 +-
>  src/hw/mpt-scsi.c    |   2 +-
>  src/hw/nvme.c        |   2 +-
>  src/hw/pvscsi.c      |   2 +-
>  src/hw/ramdisk.c     |   2 +-
>  src/hw/sdcard.c      |   2 +-
>  src/hw/usb-msc.c     |   4 +-
>  src/hw/usb-uas.c     |   2 +-
>  src/hw/virtio-blk.c  |  14 ++--
>  src/hw/virtio-ring.c |   1 -
>  src/hw/virtio-scsi.c |   5 +-
>  22 files changed, 189 insertions(+), 191 deletions(-)
> 


_______________________________________________
SeaBIOS mailing list
SeaBIOS@seabios.org
https://mail.coreboot.org/mailman/listinfo/seabios
Re: [SeaBIOS] [PATCH 0/4] Avoid using f-segment memory for virtio
Posted by Kevin O'Connor 6 years, 6 months ago
On Wed, Sep 27, 2017 at 04:49:50PM +0200, Paolo Bonzini wrote:
> On 11/07/2017 18:50, Kevin O'Connor wrote:
> > This series updates the generic code so that either "low" memory or
> > the f-segment can be used for storing drive mapping information.  It
> > also updates the virtio code to use "low" memory for its allocations.
> > I think there is a good chance this series will, in practice, avoid
> > running out of memory when a large number of virtio drives are
> > available.
> > 
> > There are other ways to tackle this problem (eg, more of the virtio
> > storage could be moved into "high" memory), but I think this approach
> > has the benefit of avoiding a "big bang" patch series.
> > 
> > Comments welcome.
> 
> Tested-by: Paolo Bonzini <pbonzini@redhat.com>
> 
> Thank you very much for the fix!  It would be nice to have it in 1.11.

Thanks.  I committed this series.

-Kevin

_______________________________________________
SeaBIOS mailing list
SeaBIOS@seabios.org
https://mail.coreboot.org/mailman/listinfo/seabios