Repository navigation
Commit 5d176f7
powerpc: tm: Enable transactional memory (TM) lazily for userspace
Currently the MSR TM bit is always set if the hardware is TM capable.
This adds extra overhead as it means the TM SPRS (TFHAR, TEXASR and
TFAIR) must be swapped for each process regardless of if they use TM.
For processes that don't use TM the TM MSR bit can be turned off
allowing the kernel to avoid the expensive swap of the TM registers.
A TM unavailable exception will occur if a thread does use TM and the
kernel will enable MSR_TM and leave it so for some time afterwards.
Signed-off-by: Cyril Bur <cyrilbur@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>1 parent 172f7aa commit 5d176f7
3 files changed
Lines changed: 33 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
257 | 257 | | |
258 | 258 | | |
259 | 259 | | |
| 260 | + | |
260 | 261 | | |
261 | 262 | | |
262 | 263 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
812 | 812 | | |
813 | 813 | | |
814 | 814 | | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
815 | 821 | | |
816 | 822 | | |
817 | 823 | | |
| |||
892 | 898 | | |
893 | 899 | | |
894 | 900 | | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
895 | 904 | | |
896 | 905 | | |
897 | 906 | | |
| |||
924 | 933 | | |
925 | 934 | | |
926 | 935 | | |
927 | | - | |
| 936 | + | |
928 | 937 | | |
929 | 938 | | |
930 | 939 | | |
| |||
955 | 964 | | |
956 | 965 | | |
957 | 966 | | |
958 | | - | |
959 | | - | |
| 967 | + | |
| 968 | + | |
| 969 | + | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
960 | 977 | | |
961 | 978 | | |
962 | 979 | | |
| |||
1393 | 1410 | | |
1394 | 1411 | | |
1395 | 1412 | | |
| 1413 | + | |
| 1414 | + | |
| 1415 | + | |
1396 | 1416 | | |
1397 | 1417 | | |
1398 | 1418 | | |
| |||
1636 | 1656 | | |
1637 | 1657 | | |
1638 | 1658 | | |
1639 | | - | |
1640 | | - | |
1641 | 1659 | | |
1642 | 1660 | | |
1643 | 1661 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1392 | 1392 | | |
1393 | 1393 | | |
1394 | 1394 | | |
| 1395 | + | |
| 1396 | + | |
| 1397 | + | |
| 1398 | + | |
| 1399 | + | |
| 1400 | + | |
| 1401 | + | |
| 1402 | + | |
| 1403 | + | |
1395 | 1404 | | |
1396 | 1405 | | |
1397 | 1406 | | |
| |||
0 commit comments