[MODERATED] Re: [PATCH v5 14/27] MDSv5 3

Andi Kleen <[email protected]>
Newsgroups org.kernel.lore.historical-speck
Message-ID <[email protected]>
> Ergo, this can be completely done in switch_mm_irqs_off() and does not at
> all require any of that propagation logic in switch_to().

And why is that a benefit?

Ok it's just moving one if with a single condition to another function
to turn it into another condition

if (prev_mm != next_mm) 

->

if (this_cpu.lazy_tlb)

which depends on the quite hairy lazy tlb semantics.

I fail to see the benefit of your variant -- it is changing
a simple obvious if to be a subtly complicated if, and both
get executed for all context switches anyways, and are
the same cost to the CPU. The subtly complicated if needs a lot
more comments, and will be much harder to understand
for anyone else except you.

And worse we wasted lots of time arguing about this

-Andi
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.