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

Re: [PATCH 4/6] x86/trace: Reduce stack usage from HVMTRACE_ND()


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 20 Sep 2021 15:00:12 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.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; bh=hm7m1lFQkBWcIUn8FkgnqbFp/XgM4RikeEDzakOZDEw=; b=Fzop+7iHlJaUnwsAMZrr47nLOjmeJMHXxPOA7j9nEqKt47evvQtNp6dZI2JaxUh7jOqV/Ct2kaVa6gdDRYF7SgZs7hU/VHf8riEkxLi26+8AuUTmKqY/c5+HwBW1sN/RV/AoH3LSWybbClnRSL64gSfY4TJWMaVNY7SgXdOOH+PRlKkd0HOISBckhg229Se+VD/JVeRv8sJzfIkp/pIHbt51qWxnzgpdGrxocvB6UI52ZIQFgv/8M0ZiIApf4YIr0tlkXdZ0Qpff7ZewQ83npwzT7A3DL71bot9+IcMcmDQAecKy2Dhog5RaiFyM0ELxKeJh11844+UtCNSRiFpycA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=b/wjWg50xm8U/3kMWzge3y+3OkMS/lc4spV2lC1zw1yztAiVl0j68iRJT9kkT4mDQ1ffWV0FqicyS1zjXM1fFspzXcdX63RQcobHUH2/UZL2jdpkfR93OnfXaMTgBKmhdpmRYWaMBhS5UcF01+lGJ8Vg1xo2fTNELE2+o2M3P2qN9JCAyMXwSDHOBaWo9TYeDZA6dTLoqExKCDKYpKP5wl+Uavy2SipB+2ndtkcRaSNGjhDptSEls9TBaxUhWDWC2FpFT8DUdPMXB2/6VqCcMQIatnvj/QF+5rwPQEqS405DUf1sHyvH5Jec5R4jaov99AOHlBbTgrc/zvB0kfqLTA==
  • Authentication-results: lists.xenproject.org; dkim=none (message not signed) header.d=none;lists.xenproject.org; dmarc=none action=none header.from=suse.com;
  • Cc: George Dunlap <George.Dunlap@xxxxxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Julien Grall <julien@xxxxxxx>, Dario Faggioli <dfaggioli@xxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Mon, 20 Sep 2021 13:00:34 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 20.09.2021 13:02, Andrew Cooper wrote:
> On 20/09/2021 10:05, Jan Beulich wrote:
>> On 17.09.2021 10:45, Andrew Cooper wrote:
>>> It is pointless to write all 6 entries and only consume the useful subset.
>>> bloat-o-meter shows quite how obscene the overhead is in 
>>> vmx_vmexit_handler(),
>>> weighing in at 11% of the function arranging unread zeroes on the stack, and
>>> 8% for svm_vmexit_handler().
>>>
>>>   add/remove: 0/0 grow/shrink: 0/20 up/down: 0/-1867 (-1867)
>>>   Function                                     old     new   delta
>>>   hvm_msr_write_intercept                     1049    1033     -16
>>>   vmx_enable_intr_window                       238     214     -24
>>>   svm_enable_intr_window                       337     313     -24
>>>   hvmemul_write_xcr                            115      91     -24
>>>   hvmemul_write_cr                             350     326     -24
>>>   hvmemul_read_xcr                             115      91     -24
>>>   hvmemul_read_cr                              146     122     -24
>>>   hvm_mov_to_cr                                438     414     -24
>>>   hvm_mov_from_cr                              253     229     -24
>>>   vmx_intr_assist                             1150    1118     -32
>>>   svm_intr_assist                              459     427     -32
>>>   hvm_rdtsc_intercept                          138     106     -32
>>>   hvm_msr_read_intercept                       898     866     -32
>>>   vmx_vmenter_helper                          1142    1094     -48
>>>   vmx_inject_event                             813     765     -48
>>>   svm_vmenter_helper                           238     190     -48
>>>   hvm_hlt                                      197     146     -51
>>>   svm_inject_event                            1678    1614     -64
>>>   svm_vmexit_handler                          5880    5416    -464
>>>   vmx_vmexit_handler                          7281    6473    -808
>>>   Total: Before=3644184, After=3642317, chg -0.05%
>>>
>>> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
>> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
> 
> Thanks, but this is buggy.  There are direct callers of HVMTRACE_ND()
> which need adjustments too.

Is this really "buggy" and "need" and not merely "incomplete" and
"want"? (Just for my own understanding in terms of what I may have
overlooked.)

Jan




 


Rackspace

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