[PATCH 0/3] hw/net,virtfs-proxy-helper: Reduce .data footprint

Philippe Mathieu-Daudé posted 3 patches 5 years, 8 months ago
Test docker-quick@centos7 passed
Test FreeBSD passed
Test docker-mingw@fedora passed
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20200305010446.17029-1-philmd@redhat.com
Maintainers: Greg Kurz <groug@kaod.org>, Jason Wang <jasowang@redhat.com>, Dmitry Fleytman <dmitry.fleytman@gmail.com>, Christian Schoenebeck <qemu_oss@crudebyte.com>
There is a newer version of this series
fsdev/virtfs-proxy-helper.c | 2 +-
hw/net/e1000.c              | 6 ++++--
hw/net/e1000e_core.c        | 6 ++++--
3 files changed, 9 insertions(+), 5 deletions(-)
[PATCH 0/3] hw/net,virtfs-proxy-helper: Reduce .data footprint
Posted by Philippe Mathieu-Daudé 5 years, 8 months ago
More memory footprint reduction, similar to:
https://lists.gnu.org/archive/html/qemu-devel/2020-03/msg00984.html

The elf-dissector tool [1] [2] helped to notice the big array.

[1] https://phabricator.kde.org/source/elf-dissector/
[2] https://www.volkerkrause.eu/2019/06/22/elf-dissector-aarch64-support.html

Philippe Mathieu-Daudé (3):
  hw/net/e1000: Add readops/writeops typedefs
  hw/net/e1000: Move macreg[] arrays to .rodata to save 1MiB of .data
  virtfs-proxy-helper: Make the helper_opts[] array const

 fsdev/virtfs-proxy-helper.c | 2 +-
 hw/net/e1000.c              | 6 ++++--
 hw/net/e1000e_core.c        | 6 ++++--
 3 files changed, 9 insertions(+), 5 deletions(-)

-- 
2.21.1


Re: [PATCH 0/3] hw/net,virtfs-proxy-helper: Reduce .data footprint
Posted by Paolo Bonzini 5 years, 8 months ago
On 05/03/20 02:04, Philippe Mathieu-Daudé wrote:
> More memory footprint reduction, similar to:
> https://lists.gnu.org/archive/html/qemu-devel/2020-03/msg00984.html
> 
> The elf-dissector tool [1] [2] helped to notice the big array.
> 
> [1] https://phabricator.kde.org/source/elf-dissector/
> [2] https://www.volkerkrause.eu/2019/06/22/elf-dissector-aarch64-support.html
> 
> Philippe Mathieu-Daudé (3):
>   hw/net/e1000: Add readops/writeops typedefs
>   hw/net/e1000: Move macreg[] arrays to .rodata to save 1MiB of .data
>   virtfs-proxy-helper: Make the helper_opts[] array const
> 
>  fsdev/virtfs-proxy-helper.c | 2 +-
>  hw/net/e1000.c              | 6 ++++--
>  hw/net/e1000e_core.c        | 6 ++++--
>  3 files changed, 9 insertions(+), 5 deletions(-)
> 

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

These can certainly go through qemu-trivial.

Paolo


Re: [PATCH 0/3] hw/net,virtfs-proxy-helper: Reduce .data footprint
Posted by Laurent Vivier 5 years, 8 months ago
Le 06/03/2020 à 10:25, Paolo Bonzini a écrit :
> On 05/03/20 02:04, Philippe Mathieu-Daudé wrote:
>> More memory footprint reduction, similar to:
>> https://lists.gnu.org/archive/html/qemu-devel/2020-03/msg00984.html
>>
>> The elf-dissector tool [1] [2] helped to notice the big array.
>>
>> [1] https://phabricator.kde.org/source/elf-dissector/
>> [2] https://www.volkerkrause.eu/2019/06/22/elf-dissector-aarch64-support.html
>>
>> Philippe Mathieu-Daudé (3):
>>   hw/net/e1000: Add readops/writeops typedefs
>>   hw/net/e1000: Move macreg[] arrays to .rodata to save 1MiB of .data
>>   virtfs-proxy-helper: Make the helper_opts[] array const
>>
>>  fsdev/virtfs-proxy-helper.c | 2 +-
>>  hw/net/e1000.c              | 6 ++++--
>>  hw/net/e1000e_core.c        | 6 ++++--
>>  3 files changed, 9 insertions(+), 5 deletions(-)
>>
> 
> Acked-by: Paolo Bonzini <pbonzini@redhat.com>
> 
> These can certainly go through qemu-trivial.

Applied to my trivial-patches branch.

Thanks,
Laurent

Re: [PATCH 0/3] hw/net,virtfs-proxy-helper: Reduce .data footprint
Posted by Stefano Garzarella 5 years, 8 months ago
On Thu, Mar 05, 2020 at 02:04:43AM +0100, Philippe Mathieu-Daudé wrote:
> More memory footprint reduction, similar to:
> https://lists.gnu.org/archive/html/qemu-devel/2020-03/msg00984.html
> 
> The elf-dissector tool [1] [2] helped to notice the big array.
> 
> [1] https://phabricator.kde.org/source/elf-dissector/
> [2] https://www.volkerkrause.eu/2019/06/22/elf-dissector-aarch64-support.html
> 

Thanks to share these links!

> Philippe Mathieu-Daudé (3):
>   hw/net/e1000: Add readops/writeops typedefs
>   hw/net/e1000: Move macreg[] arrays to .rodata to save 1MiB of .data
>   virtfs-proxy-helper: Make the helper_opts[] array const
> 
>  fsdev/virtfs-proxy-helper.c | 2 +-
>  hw/net/e1000.c              | 6 ++++--
>  hw/net/e1000e_core.c        | 6 ++++--
>  3 files changed, 9 insertions(+), 5 deletions(-)
> 

Cool and clear changes!

Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>

Thanks,
Stefano


Re: [PATCH 0/3] hw/net,virtfs-proxy-helper: Reduce .data footprint
Posted by Philippe Mathieu-Daudé 5 years, 8 months ago
On 3/5/20 10:53 AM, Stefano Garzarella wrote:
> On Thu, Mar 05, 2020 at 02:04:43AM +0100, Philippe Mathieu-Daudé wrote:
>> More memory footprint reduction, similar to:
>> https://lists.gnu.org/archive/html/qemu-devel/2020-03/msg00984.html
>>
>> The elf-dissector tool [1] [2] helped to notice the big array.
>>
>> [1] https://phabricator.kde.org/source/elf-dissector/
>> [2] https://www.volkerkrause.eu/2019/06/22/elf-dissector-aarch64-support.html
>>
> 
> Thanks to share these links!

FYI the heap equivalent (besides that more powerful) is:
https://github.com/KDE/heaptrack

> 
>> Philippe Mathieu-Daudé (3):
>>    hw/net/e1000: Add readops/writeops typedefs
>>    hw/net/e1000: Move macreg[] arrays to .rodata to save 1MiB of .data
>>    virtfs-proxy-helper: Make the helper_opts[] array const
>>
>>   fsdev/virtfs-proxy-helper.c | 2 +-
>>   hw/net/e1000.c              | 6 ++++--
>>   hw/net/e1000e_core.c        | 6 ++++--
>>   3 files changed, 9 insertions(+), 5 deletions(-)
>>
> 
> Cool and clear changes!
> 
> Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
> 
> Thanks,
> Stefano
> 


Re: [PATCH 0/3] hw/net,virtfs-proxy-helper: Reduce .data footprint
Posted by Stefano Garzarella 5 years, 8 months ago
On Thu, Mar 05, 2020 at 11:37:22AM +0100, Philippe Mathieu-Daudé wrote:
> On 3/5/20 10:53 AM, Stefano Garzarella wrote:
> > On Thu, Mar 05, 2020 at 02:04:43AM +0100, Philippe Mathieu-Daudé wrote:
> > > More memory footprint reduction, similar to:
> > > https://lists.gnu.org/archive/html/qemu-devel/2020-03/msg00984.html
> > > 
> > > The elf-dissector tool [1] [2] helped to notice the big array.
> > > 
> > > [1] https://phabricator.kde.org/source/elf-dissector/
> > > [2] https://www.volkerkrause.eu/2019/06/22/elf-dissector-aarch64-support.html
> > > 
> > 
> > Thanks to share these links!
> 
> FYI the heap equivalent (besides that more powerful) is:
> https://github.com/KDE/heaptrack

Cool, thanks!

Previously I used valgrind's massif tool to track the heap, but I'll try
heaptrack.

Cheers,
Stefano