From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Google-Smtp-Source: AH8x225UtETziq22klypcoJzJF1tvEBKhTqrSIiUx4CLaJaW2LTd3ScV0DRcpr7XRO/SHxzB2Kmq ARC-Seal: i=1; a=rsa-sha256; t=1516886492; cv=none; d=google.com; s=arc-20160816; b=E4zeyBiZlTuWf1I5xyTv99cUQr4KmTFi/a4ESHbtxTn6FW5hAaY6R/oG5yMip9Af73 nzym36I02LObfPhu/VLYoBulbj0/ZFQTFb9iJrWNiIE3wJBOOHh6CI8ySvM01EtgtJa8 XneTxw6oZwIKumoYiCMBhvH+SDyugiEiT1Ifvva/vMriSI1PcpKgcGs+7Xv5WipF3SIQ Fpxa39aDZo8vTfYEe1djKs/jhKehbGl+QtUbj+1RNKNasfjTnEDnuIHbZTRDg98KedYc 4oZfRwwVrSLcdhx43ExxUH1p/+0nPXAfyI072RSYrJC90MTxQRvRYdtNdLRoHus93HtF M21w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:from:references:cc:to:subject :arc-authentication-results; bh=h+OUuTON1G+LjmdgdYHhvaEXSwDmVuxHZ5a/KLlpZZI=; b=RwWkr0ct1JRSg3OZRPqPiqMNrP5m7eF3Ut2X71Vu26jCLmeT/0726Q9YO6g4TpXHJo A/wpzvsI9BD+Xvqg4wXwz4XqTWFxoPYqTxL2L6MjQVSUu7cTVgUQMWnbbbWpahZfLh3P lIjDGeE9rtb5L1RJ/1GqJ+ZtoAv0A98A3V8uBM9ZsJom20a1gP/7i7eKL2CO8FobD5ZX 0eF55Iua0wo3yBt/64N3foPvOQRXE3Ax48vLthU11f9wM0EXZS1KEi58VAM0yHn3NDiU em3B62+5KuW+5FdIfPVswC7nx4ZAofX4tyanp4izIUhZLsfbq5yTarbBbjXjHABFPwTb J90g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of arjan@linux.intel.com designates 192.55.52.88 as permitted sender) smtp.mailfrom=arjan@linux.intel.com Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of arjan@linux.intel.com designates 192.55.52.88 as permitted sender) smtp.mailfrom=arjan@linux.intel.com X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,412,1511856000"; d="scan'208";a="29406897" Subject: Re: [RFC PATCH 1/2] x86/ibpb: Skip IBPB when we switch back to same user process To: Peter Zijlstra , Tim Chen Cc: linux-kernel@vger.kernel.org, KarimAllah Ahmed , Andi Kleen , Andrea Arcangeli , Andy Lutomirski , Ashok Raj , Asit Mallick , Borislav Petkov , Dan Williams , Dave Hansen , David Woodhouse , Greg Kroah-Hartman , "H . Peter Anvin" , Ingo Molnar , Janakarajan Natarajan , Joerg Roedel , Jun Nakajima , Laura Abbott , Linus Torvalds , Masami Hiramatsu , Paolo Bonzini , rkrcmar@redhat.com, Thomas Gleixner , Tom Lendacky , x86@kernel.org References: <20180125085820.GV2228@hirez.programming.kicks-ass.net> <20180125092233.GE2295@hirez.programming.kicks-ass.net> From: Arjan van de Ven Message-ID: <86541aca-8de7-163d-b620-083dddf29184@linux.intel.com> Date: Thu, 25 Jan 2018 05:21:30 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <20180125092233.GE2295@hirez.programming.kicks-ass.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: =?utf-8?q?1590523944221221739?= X-GMAIL-MSGID: =?utf-8?q?1590570770181699700?= X-Mailing-List: linux-kernel@vger.kernel.org List-ID: > > This means that 'A -> idle -> A' should never pass through switch_mm to > begin with. > > Please clarify how you think it does. > the idle code does leave_mm() to avoid having to IPI CPUs in deep sleep states for a tlb flush. (trust me, that you really want, sequentially IPI's a pile of cores in a deep sleep state to just flush a tlb that's empty, the performance of that is horrific)