On 2018-09-20 8:31 PM, John David Anglin wrote:
On 2018-09-20 6:47 PM, Mikulas Patocka wrote:
Perhaps disassembling the HP-UX TLB handlers would be the best
option:) I suppose they selected the optimal implementation.
This is what I see. The situation isn't very clear as I believe the
code may get patched depending
on the processor.
000000000002b0a0 <tbitmss_PCXU>:
2b0a0: d9 19 03 e0 extrd,u,* r8,31,32,r25
2b0a4: 0b 21 02 99 xor r1,r25,r25
2b0a8: f3 19 0c 0c depd,* r25,31,20,r24
000000000002b0ac <pdir_base_patch_021>:
2b0ac: 20 20 00 0a ldil L%500000,r1
000000000002b0b0 <pdir_shift_patch_021>:
2b0b0: f0 21 00 00 depd,z,* r1,63,32,r1
000000000002b0b4 <pdir_mask_patch_021>:
2b0b4: f0 31 04 a8 depd,* r17,58,24,r1
2b0b8: 0c 20 10 d1 ldd 0(r1),r17
000000000002b0bc <tbitloop_PCXU>:
2b0bc: bf 11 20 3a cmpb,*<>,n r17,r24,2b0e0
<tbit_target_miss_PCXU>
2b0c0: 0c 30 10 c8 ldd 8(r1),r8
2b0c4: 50 29 00 20 ldd 10(r1),r9
2b0c8: c4 48 60 3a bb,*<,n r8,2,2b0ec <t_vioref_trap_PCXU>
000000000002b0cc <make_nop_if_split_TLB_2_0_10>:
2b0cc: f5 0e 0d 3d depdi,* 7,22,3,r8
2b0d0: 05 09 18 00 idtlbt r9,r8
2b0d4: 0c 28 12 d0 std r8,8(r1)
2b0d8: 00 00 0c a0 rfi,r
2b0dc: 08 00 02 40 nop
I would say HP-UX has a much better page table layout and lookup. The
flags are set
by the "depdi" instruction and they are always written back. There's no
locking so I
suspect HP-UX only changes the page directory when it's safe to do so.
Dave
--
John David Anglin dave.anglin@xxxxxxxx