On Tue, 1 Oct 2024 11:15:02 +0200 Christian Borntraeger <borntrae...@linux.ibm.com> wrote: [..] > >> So 500+4 should probably not cause any harm apart from branch prediction > >> going wrong the first 2 or 3 notifies. > >> > >> 502 will make kvm_s390_handle_diag larger. > > > > What do you mean by this last paragraph? [..]
> gcc has logic for switch statements that decide about branch table or > a chained compare+jump. I think due to spectre gcc now avoids indirect > branches as much as possible but still a larger switch statement might > kick the decision from inline compare/jump to a branch table. > > I am not worried in this particular case this was more or less a > "what could go wrong". Hm, you did state that "502 will make kvm_s390_handle_diag larger". I suppose now we agree that 502 would not make kvm_s390_handle_diag larger. Right? I understood that you prefer 500+4 over 502 because the latter would make kvm_s390_handle_diag larger. Now that we have, I hope clarified, that 502 would not make the switch larger, do you still prefer 500+4? BTW your insights are very appreciated! Regards, Halil