Nicholas Piggin c700b5e162 spapr: avoid overhead of finding vhyp class in critical operations
PPC_VIRTUAL_HYPERVISOR_GET_CLASS is used in critical operations like
interrupts and TLB misses and is quite costly. Running the
kvm-unit-tests sieve program with radix MMU enabled thrashes the TCG
TLB and spends a lot of time in TLB and page table walking code. The
test takes 67 seconds to complete with a lot of time being spent in
code related to finding the vhyp class:

   12.01%  [.] g_str_hash
    8.94%  [.] g_hash_table_lookup
    8.06%  [.] object_class_dynamic_cast
    6.21%  [.] address_space_ldq
    4.94%  [.] __strcmp_avx2
    4.28%  [.] tlb_set_page_full
    4.08%  [.] address_space_translate_internal
    3.17%  [.] object_class_dynamic_cast_assert
    2.84%  [.] ppc_radix64_xlate

Keep a pointer to the class and avoid this lookup. This reduces the
execution time to 40 seconds.

Reviewed-by: Harsh Prateek Bora <harshpb@linux.ibm.com>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
2024-05-24 08:57:50 +10:00
..
2024-05-03 15:47:47 +02:00
2024-05-17 16:49:04 +02:00
2024-05-22 15:32:25 -07:00
2024-05-22 17:34:41 -03:00
2023-12-29 11:17:30 +11:00
2023-12-29 11:17:30 +11:00
2024-04-25 09:43:29 -07:00
2024-04-25 09:43:29 -07:00
2024-05-03 15:47:48 +02:00
2024-05-06 10:19:56 -07:00
2024-04-25 09:43:29 -07:00
2024-04-29 12:13:35 +09:00
2024-05-10 15:45:15 +02:00