Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

powerpc/pseries: Add wait interval counter definitions to struct lppaca

The hypervisor exposes accumulated partition scheduling interval times
in the VPA (lppaca). These can be used to implement a simple stolen time
in the guest without complex and costly dtl scanning.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Reviewed-by: Fabiano Rosas <farosas@linux.ibm.com>
Link: https://lore.kernel.org/r/20220902085316.2071519-2-npiggin@gmail.com

authored by

Nicholas Piggin and committed by
Michael Ellerman
a8933c8d 501fe299

+7 -3
+7 -3
arch/powerpc/include/asm/lppaca.h
··· 104 104 volatile __be32 dispersion_count; /* dispatch changed physical cpu */ 105 105 volatile __be64 cmo_faults; /* CMO page fault count */ 106 106 volatile __be64 cmo_fault_time; /* CMO page fault time */ 107 - u8 reserved10[104]; 107 + u8 reserved10[64]; /* [S]PURR expropriated/donated */ 108 + volatile __be64 enqueue_dispatch_tb; /* Total TB enqueue->dispatch */ 109 + volatile __be64 ready_enqueue_tb; /* Total TB ready->enqueue */ 110 + volatile __be64 wait_ready_tb; /* Total TB wait->ready */ 111 + u8 reserved11[16]; 108 112 109 113 /* cacheline 4-5 */ 110 114 111 115 __be32 page_ins; /* CMO Hint - # page ins by OS */ 112 - u8 reserved11[148]; 116 + u8 reserved12[148]; 113 117 volatile __be64 dtl_idx; /* Dispatch Trace Log head index */ 114 - u8 reserved12[96]; 118 + u8 reserved13[96]; 115 119 } ____cacheline_aligned; 116 120 117 121 #define lppaca_of(cpu) (*paca_ptrs[cpu]->lppaca_ptr)