Commit bf5835b
intel_idle: Disable IBRS during long idle
Having IBRS enabled while the SMT sibling is idle unnecessarily slows
down the running sibling. OTOH, disabling IBRS around idle takes two
MSR writes, which will increase the idle latency.
Therefore, only disable IBRS around deeper idle states. Shallow idle
states are bounded by the tick in duration, since NOHZ is not allowed
for them by virtue of their short target residency.
Only do this for mwait-driven idle, since that keeps interrupts disabled
across idle, which makes disabling IBRS vs IRQ-entry a non-issue.
Note: C6 is a random threshold, most importantly C1 probably shouldn't
disable IBRS, benchmarking needed.
Suggested-by: Tim Chen <tim.c.chen@linux.intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Josh Poimboeuf <jpoimboe@kernel.org>
Signed-off-by: Borislav Petkov <bp@suse.de>1 parent 6ad0ad2 commit bf5835b
3 files changed
Lines changed: 45 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
255 | 255 | | |
256 | 256 | | |
257 | 257 | | |
| 258 | + | |
258 | 259 | | |
259 | 260 | | |
260 | 261 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
82 | 88 | | |
83 | 89 | | |
84 | 90 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
50 | 51 | | |
51 | 52 | | |
52 | 53 | | |
53 | 54 | | |
54 | 55 | | |
| 56 | + | |
55 | 57 | | |
56 | 58 | | |
57 | 59 | | |
| |||
105 | 107 | | |
106 | 108 | | |
107 | 109 | | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
108 | 116 | | |
109 | 117 | | |
110 | 118 | | |
| |||
159 | 167 | | |
160 | 168 | | |
161 | 169 | | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
162 | 188 | | |
163 | 189 | | |
164 | 190 | | |
| |||
680 | 706 | | |
681 | 707 | | |
682 | 708 | | |
683 | | - | |
| 709 | + | |
684 | 710 | | |
685 | 711 | | |
686 | 712 | | |
687 | 713 | | |
688 | 714 | | |
689 | 715 | | |
690 | 716 | | |
691 | | - | |
| 717 | + | |
692 | 718 | | |
693 | 719 | | |
694 | 720 | | |
695 | 721 | | |
696 | 722 | | |
697 | 723 | | |
698 | 724 | | |
699 | | - | |
| 725 | + | |
700 | 726 | | |
701 | 727 | | |
702 | 728 | | |
703 | 729 | | |
704 | 730 | | |
705 | 731 | | |
706 | 732 | | |
707 | | - | |
| 733 | + | |
708 | 734 | | |
709 | 735 | | |
710 | 736 | | |
711 | 737 | | |
712 | 738 | | |
713 | 739 | | |
714 | 740 | | |
715 | | - | |
| 741 | + | |
716 | 742 | | |
717 | 743 | | |
718 | 744 | | |
| |||
741 | 767 | | |
742 | 768 | | |
743 | 769 | | |
744 | | - | |
| 770 | + | |
745 | 771 | | |
746 | 772 | | |
747 | 773 | | |
| |||
1819 | 1845 | | |
1820 | 1846 | | |
1821 | 1847 | | |
| 1848 | + | |
| 1849 | + | |
| 1850 | + | |
| 1851 | + | |
| 1852 | + | |
| 1853 | + | |
1822 | 1854 | | |
1823 | 1855 | | |
1824 | 1856 | | |
| |||
0 commit comments