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

Re: [Xen-devel] [PATCH] xen/common: Drop function calls for Xen compile/version information



On 18/01/17 16:30, Wei Liu wrote:
> On Wed, Jan 18, 2017 at 04:21:06PM +0000, Roger Pau Monné wrote:
>> On Wed, Jan 18, 2017 at 11:10:40AM -0500, Konrad Rzeszutek Wilk wrote:
>>> On Wed, Jan 18, 2017 at 10:13:34AM +0000, Roger Pau Monné wrote:
>>>> On Tue, Jan 17, 2017 at 03:46:30PM -0500, Konrad Rzeszutek Wilk wrote:
>>>>>>> Is this patch of yours that neccessary? Could at least some of the
>>>>>>> functions still exist?
>>>>>> Well.  This patch is manually doing what LTO would do automatically when
>>>>>> it has a cross-translation-unit view of things, and come to the
>>>>>> conclusion that in all cases, inlining cross-unit will make the calling
>>>>>> code shorter, and allow the functions to be elided entirely.
>>>>>>
>>>>>> I take it from this that noone has tried livepatching an LTO build of 
>>>>>> Xen.
>>>>> Roger did build it (FreeBSD uses it), but I don't think he tried
>>>>> the test-cases.
>>>> I've tried livepatch, but not LTO, neither on it's own.
>>> Gotcha.
>>>>> Wait, I think he may have as his patch: 
>>>>> f8c66c2ad2efdb281e4ebf15bf329d73c4f02ce7
>>>>> Author: Roger Pau Monne <roger.pau@xxxxxxxxxx>
>>>>> Date:   Tue May 3 12:55:09 2016 +0200
>>>>>
>>>>>     xen/xsplice: add ELFOSABI_FREEBSD as a supported OSABI for payloads
>>>>>
>>>>> implies that he did build an payload (and I remember us trying to figure
>>>>> out if the issues he had been hitting were due to LTO or something else).
>>>> IIRC issues where related to not translating error codes from the return 
>>>> of the
>>>> livepatch hypercalls, and the patch upload tool refusing to upload patches 
>>>> with
>>>> ELFOSABI_FREEBSD instead of ELFOSABI_NONE (which I assume is what Linux 
>>>> uses).
>>>>
>>>> It's been sometime since I've tried livepatch with FreeBSD, so I could 
>>>> give it
>>>> a spin if you think there's a chance things might have broken.
>>> That is OK. 
>>>
>>> I think I can also try myself to build Xen with LTO on Linux and see how
>>> the test-cases fare.
>>>
>>> Not sure what is involved but I will find out.
>>>
>>> And to answer Andrew's question - No, nobody tried LTO with livepatching 
>>> then :-(
>> TBH, I think nobody has tried LTO on it's own in a long time, much less with
>> livepatch. Adding Wei who recently sent some LTO makefile fixes, maybe he 
>> tried
>> it.
>>
> LTO is now controlled by CONFIG_LTO in kconfig.
>
> Xen build system is broken when LTO is enabled. Furthermore GCC
> toolchain can't handle LTO yet. 
>
> Konrad, feel free to fix LTO build. :-)

Last time I tried LTO:

* The GCC build did work, but the net binary was bigger rather than
smaller, and it successfully boot
* The Clang build worked, made a much smaller binary, but due to a clang
bug, "optimised" code into using SSE, and blew up spectacularly when
booting.

From experiments with XTF, Clang 3.9 LTO is far more comprehensive, and
is basically capable of optimising entire XTF tests into one single test
function, and properly respects the "no FPU ever" options used during boot.

~Andrew

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

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