Re: [Qemu-devel] [PATCH 3/3] Avoid repeated memory allocation in xen_disk

2018-11-02 Thread Anthony PERARD
On Fri, Nov 02, 2018 at 10:01:09AM +, Tim Smith wrote: > xen_disk currently allocates memory to hold the data for each ioreq > as that ioreq is used, and frees it afterwards. Because it requires > page-aligned blocks, this interacts poorly with non-page-aligned > allocations and balloons the he

Re: [Qemu-devel] [PATCH 3/3] Avoid repeated memory allocation in xen_disk

2018-11-02 Thread Paul Durrant
> -Original Message- > From: Tim Smith [mailto:tim.sm...@citrix.com] > Sent: 02 November 2018 10:01 > To: xen-de...@lists.xenproject.org; qemu-devel@nongnu.org; qemu- > bl...@nongnu.org > Cc: Anthony Perard ; Kevin Wolf > ; Paul Durrant ; Stefano > Stabellini ; Max Reitz > Subject: [PATCH

[Qemu-devel] [PATCH 3/3] Avoid repeated memory allocation in xen_disk

2018-11-02 Thread Tim Smith
xen_disk currently allocates memory to hold the data for each ioreq as that ioreq is used, and frees it afterwards. Because it requires page-aligned blocks, this interacts poorly with non-page-aligned allocations and balloons the heap. Instead, allocate the maximum possible requirement, which is B

[Qemu-devel] [PATCH 3/3] Avoid repeated memory allocation in xen_disk

2018-11-02 Thread Tim Smith
xen_disk currently allocates memory to hold the data for each ioreq as that ioreq is used, and frees it afterwards. Because it requires page-aligned blocks, this interacts poorly with non-page-aligned allocations and balloons the heap. Instead, allocate the maximum possible requirement, which is B

Re: [Qemu-devel] [PATCH 3/3] Avoid repeated memory allocation in xen_disk

2018-09-07 Thread Paul Durrant
> -Original Message- > From: Qemu-devel [mailto:qemu-devel- > bounces+paul.durrant=citrix@nongnu.org] On Behalf Of Tim Smith > Sent: 07 September 2018 11:22 > To: qemu-devel@nongnu.org > Subject: [Qemu-devel] [PATCH 3/3] Avoid repeated memory allocation in > x

[Qemu-devel] [PATCH 3/3] Avoid repeated memory allocation in xen_disk

2018-09-07 Thread Tim Smith
xen_disk currently allocates memory to hold the data for each ioreq as that ioreq is used, and frees it afterwards. Because it requires page-aligned blocks, this interacts poorly with non-page-aligned allocations and balloons the heap. Instead, allocate the maximum possible requirement, which is B