[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v4] tools: create libxensaverestore


  • To: Olaf Hering <olaf@xxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Thu, 22 Apr 2021 12:49:14 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=AuGSutb6tXApNa7uWxeh5/Kpi01VmEh80TySZWVu5tQ=; b=kcMZWAR8z8uyiCwp6XC+H28ZtxwttevuZWAkFIYqSo1GZveg+BCmro100onAw6bFIDyAHX/w1gAp9ONDmrJ1keZCfBIQ4nO490tnfbAsQ7akPdrRvcApyR0lrKBdSVQkkJQRaOesZqKXCp/HKyPcKrSDbCM820ogUgKCi69LQkcVzf53l70W+N/0YzzdMVLkz+xuCyorgg5ol7RT59gN4H5UZocHyc49hgXhacLhE3EnO+EIbYem9e+fVp1/NqDb+NfA/EnUN+NCHQkjjudpdILjOREkiN7D5BH6xK7huOrN0ST3Nl4I1A2N0m2Qqe49WpVKbqJ/GfsSSgIlYG/1hg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fcyZ9l/nt0s6qgS37CDVMgIWgjs726HW5FB3GKoRqkRv+xbySFd0n78PtT4zyYlcvvoz1BxpLcQD8KV5Z3u8WcQEZpJ2FMk38oI13T76tA56Gi5QXYNCMMuARDMvhI7/ieqv/O2UW97FKzwuZSYSLtU365xt6+hfFTzp4ugwqun5QE3Pn0HMDReCToXAQNG/JyEJydaw99XnW+dIOWzDEP0SOlQJSQ9lApJAdtSK/iRMxpDiwaD1f9m23OTAkkNR63WEfY7utb7Oubq3wYBVCzTJD3lCUoyQWYNcdDA/QCVfDsAVFLTvsWq5Nyj2yhfWgWl3pYA0jl3gMhN6Cg0h6Q==
  • Authentication-results: esa4.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: George Dunlap <george.dunlap@xxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • Delivery-date: Thu, 22 Apr 2021 11:49:28 +0000
  • Ironport-hdrordr: A9a23:oM0uj6gKYx+DE46mci/wZDUlsXBQX5Vy3DAbvn1ZSRFFG/Gwv/ uF2NwGyB75jysQUnk8mdaGfJKNW2/Y6IQd2+YsFJ+Ydk3DtHGzJI9vqbHjzTrpBjHk+odmuZ tIW5NVTOf9BV0St6vHySGzGdo43Z2j+Kenme/Rwx5WPHxXQotLhj0JbzqzOEtwWQVAGN4dHJ 2T+sJIq1ObCAgqR+68AWQIWPWGms3TmPvdEEc7LjMEyC3LtzOn77bmDwOVty1xbxpjyaovmF K16jDRyb6kt5iAu3zh/k/Vq69bgd7wjuZEbfb88PQ9DhXJpkKWaJ96W7uE1QpF5t2HzFoxit HDr1MBEq1ImgvsV1q4qxfsxAXsuQxGgxWCqWOwunftrdf0Qzg3EaN69PlkWyDU9lY6u5VE2L 9Ltljzi7NsERjCkC7hjuK4My1Cq0uurXIu1c4VgnBPOLFuDoN5kI0F8EtZVKoHBSLxgbpXd9 VGMce03oc1TXqqK1Ti+kV/yt2lWXo+Wj2cRFIZh8CT2z9K2Fhk0kox3qUk7zg93aN4b6MBy/ XPM6xumr0LZNQRd7hBCOAIRtbyInDRQCjLLHmZLT3cZe86EkOIj6SyzKQ+5emsdpBN5oA1go 79XFRRsnN3XE7yF8uU3tlu/grWSG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HtMD0GE7llgJe4u640xihTahYnCGAxzDj7wuN9xL +8nPHfQffrB3vkMU8IkAQ1TLJcj2gusyVNYsK+5ZWybkEMGukED+A264pWnDhqw2KDmWE0fl ForEglx4vNJlvoMzBgDqDoh5LxmwVdq66Y6VFizU8g12+PmRWZoRzykMm0sXZv8DGYoQ9jtK mHRDw+xCxerRVqxKR9MnyLFW7gKEn1Qm/f3e8tIzliD2tq1uAgyBzEJKMPnoqlz2VloS8gax JAtI2DByLaU3GKCdb0LDq2D9y7D955fuZJNgM4Xg2LHQWBno51UwnBd9hg3Ai9g3sCBaCBPa W9fQKWZaN9iZA4KujrWI6RhcDHywhf+TUTtuvA+Ay4oM4=
  • Ironport-sdr: ZM2s9fQMD7ziOEZ+vQ021SzsSJ/H+p4uiVh6/FBFjcYIXndlJQcsb8barLmgJnRwN3TlQ+JaVi xodThdyJjibrWhRaKXNcXV4JFk0a48MNVn1m73vd/dHF3eZV5Owr7eYRNURnqrlPrmhUuWLUEc 88UWsagoqxvKRAGA3fgSBrm0+PHJ9vG6hewTf5xZnJL0rjr58WlxGoBsn3781K1htDZgZETlOC kKh33J7LP1ae8ieKs7Xlu3e24oukdL+N7CWAjG35o3xeaQK6QH/i2cOB0LQDYmUspcXqTFa/nZ aPw=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 15/04/2021 14:11, Olaf Hering wrote:
> Move all save/restore related code from libxenguest.so into a separate
> library libxensaverestore.so. The only consumer is libxl-save-helper.

"in tree consumer".

It's not the only consumer, but XenServer's equivalent of
libxl-save-helper is in a position to consume this library.

That said, if you've dropped the plans for the static version, I don't
see what the point is.  You're literally saving 15 pages of memory (so
nothing in the grand scheme of a userspace process), at the cost of
added effort for the dynamic loader.

In this form, there's a reasonable chance that it adds to the perf
problems you're trying to address.

> There is no need to have the moved code mapped all the time in binaries
> where libxenguest.so is used.
>
> According to size(1) the change is:
>    text          data     bss     dec     hex filename
>  187183          4304      48  191535   2ec2f guest/libxenguest.so.4.15.0
>
>  124106          3376      48  127530   1f22a guest/libxenguest.so.4.15.0
>   67841          1872       8   69721   11059 
> saverestore/libxensaverestore.so.4.15.0
>
> While touching the files anyway, take the opportunity to drop the
> reduntant xg_sr_ filename prefix.
>
> Signed-off-by: Olaf Hering <olaf@xxxxxxxxx>
> ---
> diff --git a/tools/libs/saverestore/Makefile b/tools/libs/saverestore/Makefile
> new file mode 100644
> index 0000000000..48728b3be2
> --- /dev/null
> +++ b/tools/libs/saverestore/Makefile
> @@ -0,0 +1,38 @@
> +XEN_ROOT = $(CURDIR)/../../..
> +include $(XEN_ROOT)/tools/Rules.mk
> +
> +ifeq ($(CONFIG_MIGRATE),y)
> +SRCS-y += common.c
> +SRCS-$(CONFIG_X86) += common_x86.c
> +SRCS-$(CONFIG_X86) += common_x86_pv.c
> +SRCS-$(CONFIG_X86) += restore_x86_pv.c
> +SRCS-$(CONFIG_X86) += restore_x86_hvm.c
> +SRCS-$(CONFIG_X86) += save_x86_pv.c
> +SRCS-$(CONFIG_X86) += save_x86_hvm.c
> +SRCS-y += restore.c
> +SRCS-y += save.c
> +else
> +SRCS-y += nomigrate.c
> +endif

Depending on the answers to the general question above...

I don't think pulling nomigrate into this new library is sensible.  A
dedicate migration library, stubbed to errors based on some exterior
setting, is very rude.

Given the proposed new structure, the way this ought to be expressed is
libxl-save-restore-helper being conditional on CONFIG_MIGRATE in the
first place.

Also, xensaverestore is a mouthful.  If we are changing things, how
about xenmigrate instead?

~Andrew




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.