virt-pvm / linux

Linux kernel source tree for PVM
Other
9 stars 1 forks source link

Enhance exit reason handling for PVM hypercalls #10

Open ljrcore opened 1 month ago

ljrcore commented 1 month ago

Improve the handling of exit reasons for PVM hypercalls by adding more specific exit reasons based on the type of PVM hypercall. This enables a more fine-grained analysis of the performance and behavior of PVM-based virtual machines.

This change benefits performance analysis tools, such as perf, by allowing them to provide more detailed information about the execution of PVM hypercalls.

https://github.com/virt-pvm/linux/pull/9

ljrcore commented 1 month ago

Perf kvm depends on this change, and perf related code will be contributed after optimization and cleanup.

Analyze events for all VMs, all VCPUs:

                                 VM-EXIT    Samples  Samples%     Time%    Min Time    Max Time         Avg time

                                HC_WRMSR        183    33.46%     0.01%      0.28us      4.41us      0.66us ( +-   6.03% )
                                 PF excp        117    21.39%     2.38%      0.78us  34187.94us    294.36us ( +-  99.26% )
                                   ERETS         95    17.37%     0.01%      0.60us     12.55us      0.96us ( +-  12.96% )
                             HC_IRQ_HALT         76    13.89%    95.11%   1022.33us 351940.05us  18130.74us ( +-  29.91% )
                                HC_RDMSR         28     5.12%     0.00%      0.33us      0.78us      0.45us ( +-   4.89% )
                               INTERRUPT         27     4.94%     2.50%      0.73us  36012.79us   1339.30us ( +-  99.57% )
                                   ERETU         14     2.56%     0.00%      0.46us      0.98us      0.61us ( +-   6.90% )
                           HC_TLB_INVLPG          3     0.55%     0.00%      0.88us      1.86us      1.53us ( +-  21.41% )
                           HC_LOAD_PGTBL          2     0.37%     0.00%      7.39us     18.36us     12.88us ( +-  42.60% )
                              HC_IRQ_WIN          1     0.18%     0.00%      1.11us      1.11us      1.11us ( +-   0.00% )
                              HC_LOAD_GS          1     0.18%     0.00%      0.55us      0.55us      0.55us ( +-   0.00% )

Total Samples:547, Total events handled time:1448802.46us.