xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: Juergen Gross <jgross@suse.com>, Olaf Hering <olaf@aepfle.de>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
	George Dunlap <george.dunlap@citrix.com>,
	Ian Jackson <iwj@xenproject.org>, Julien Grall <julien@xen.org>,
	Stefano Stabellini <sstabellini@kernel.org>, Wei Liu <wl@xen.org>,
	Anthony PERARD <anthony.perard@citrix.com>,
	xen-devel@lists.xenproject.org
Subject: Re: [PATCH v3] tools: create libxensaverestore
Date: Wed, 14 Apr 2021 09:14:31 +0200	[thread overview]
Message-ID: <7c342ee1-c275-5cd2-8129-e384e0bcd827@suse.com> (raw)
In-Reply-To: <5d483005-c6ca-88f1-0469-dd4a23c6752d@suse.com>

On 14.04.2021 07:46, Juergen Gross wrote:
> On 13.04.21 19:20, 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.
>> 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
>>
>> Signed-off-by: Olaf Hering <olaf@aepfle.de>
>> ---
>> v3:
>> - repost in time for 4.16
>> v2:
>> - copy also license header
>> - move xg_nomigrate.c
>> - add size(1) output to commit msg
>> - remove change from libxl_create.c
>>
>>   .gitignore                                    |   2 +
>>   tools/include/xenguest.h                      | 186 ----------------
>>   tools/include/xensaverestore.h                | 208 ++++++++++++++++++
>>   tools/libs/Makefile                           |   1 +
>>   tools/libs/guest/Makefile                     |  11 -
>>   tools/libs/guest/xg_offline_page.c            |   1 -
>>   tools/libs/light/Makefile                     |   4 +-
>>   tools/libs/light/libxl_internal.h             |   1 +
>>   tools/libs/light/libxl_save_helper.c          |   1 +
>>   tools/libs/light/libxl_save_msgs_gen.pl       |   2 +-
>>   tools/libs/saverestore/Makefile               |  38 ++++
>>   .../{guest => saverestore}/xg_nomigrate.c     |   0
>>   .../{guest => saverestore}/xg_save_restore.h  |   2 -
>>   .../{guest => saverestore}/xg_sr_common.c     |   0
>>   .../{guest => saverestore}/xg_sr_common.h     |  12 +
>>   .../{guest => saverestore}/xg_sr_common_x86.c |   0
>>   .../{guest => saverestore}/xg_sr_common_x86.h |   0
>>   .../xg_sr_common_x86_pv.c                     |   0
>>   .../xg_sr_common_x86_pv.h                     |   0
>>   .../{guest => saverestore}/xg_sr_restore.c    |   0
>>   .../xg_sr_restore_x86_hvm.c                   |   0
>>   .../xg_sr_restore_x86_pv.c                    |   0
>>   .../libs/{guest => saverestore}/xg_sr_save.c  |   0
>>   .../xg_sr_save_x86_hvm.c                      |   0
>>   .../xg_sr_save_x86_pv.c                       |   0
>>   .../xg_sr_stream_format.h                     |   0
>>   tools/libs/uselibs.mk                         |   4 +-
>>   27 files changed, 269 insertions(+), 204 deletions(-)
>>   create mode 100644 tools/include/xensaverestore.h
>>   create mode 100644 tools/libs/saverestore/Makefile
>>   rename tools/libs/{guest => saverestore}/xg_nomigrate.c (100%)
>>   rename tools/libs/{guest => saverestore}/xg_save_restore.h (98%)
>>   rename tools/libs/{guest => saverestore}/xg_sr_common.c (100%)
>>   rename tools/libs/{guest => saverestore}/xg_sr_common.h (98%)
>>   rename tools/libs/{guest => saverestore}/xg_sr_common_x86.c (100%)
>>   rename tools/libs/{guest => saverestore}/xg_sr_common_x86.h (100%)
>>   rename tools/libs/{guest => saverestore}/xg_sr_common_x86_pv.c (100%)
>>   rename tools/libs/{guest => saverestore}/xg_sr_common_x86_pv.h (100%)
>>   rename tools/libs/{guest => saverestore}/xg_sr_restore.c (100%)
>>   rename tools/libs/{guest => saverestore}/xg_sr_restore_x86_hvm.c (100%)
>>   rename tools/libs/{guest => saverestore}/xg_sr_restore_x86_pv.c (100%)
>>   rename tools/libs/{guest => saverestore}/xg_sr_save.c (100%)
>>   rename tools/libs/{guest => saverestore}/xg_sr_save_x86_hvm.c (100%)
>>   rename tools/libs/{guest => saverestore}/xg_sr_save_x86_pv.c (100%)
>>   rename tools/libs/{guest => saverestore}/xg_sr_stream_format.h (100%)
> 
> What about dropping the "xg_" prefix from the filenames?

To be honest, dropping xg_ here should not even be under question.
sr_ is what I would think should also be dropped, but which may
be controversial, seeing that some (but not all) of the libraries
under tools/libs/ use such redundant (with their directory's name)
prefixes. Besides being longer to read/write, these unnecessary
prefixes hamper name completion mechanisms.

Jan


  reply	other threads:[~2021-04-14  7:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-13 17:20 [PATCH v3] tools: create libxensaverestore Olaf Hering
2021-04-14  5:46 ` Juergen Gross
2021-04-14  7:14   ` Jan Beulich [this message]
2021-04-14  7:19   ` Olaf Hering
2021-04-21 10:24 ` Wei Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7c342ee1-c275-5cd2-8129-e384e0bcd827@suse.com \
    --to=jbeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=anthony.perard@citrix.com \
    --cc=george.dunlap@citrix.com \
    --cc=iwj@xenproject.org \
    --cc=jgross@suse.com \
    --cc=julien@xen.org \
    --cc=olaf@aepfle.de \
    --cc=sstabellini@kernel.org \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).