Return-Path: Received: from mail.linutronix.de (146.0.238.70:993) by crypto-ml.lab.linutronix.de with IMAP4-SSL for ; 16 Feb 2019 16:58:33 -0000 Received: from mga11.intel.com ([192.55.52.93]) by Galois.linutronix.de with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1gv3IN-0000wp-Un for speck@linutronix.de; Sat, 16 Feb 2019 17:58:32 +0100 Date: Sat, 16 Feb 2019 08:58:28 -0800 From: Andi Kleen Subject: [MODERATED] Re: [PATCH v5 14/27] MDSv5 3 Message-ID: <20190216165828.GH16922@tassilo.jf.intel.com> References: <8b89fce6dd87638a00078082141d3ce5fe13d0ea.1547858934.git.ak@linux.intel.com> <20190216020039.GG16922@tassilo.jf.intel.com> MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit To: speck@linutronix.de List-ID: > 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