From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from na01-bl2-obe.outbound.protection.outlook.com (mail-bl2on0134.outbound.protection.outlook.com [65.55.169.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 537DD1A0A49 for ; Wed, 7 Jan 2015 13:53:00 +1100 (AEDT) Message-ID: <1420599166.4961.47.camel@freescale.com> Subject: Re: [PATCH] powerpc/8xx: reduce pressure on TLB due to context switches From: Scott Wood To: Christophe Leroy Date: Tue, 6 Jan 2015 20:52:46 -0600 In-Reply-To: <20150105151453.E32BD1A4CF3@localhost.localdomain> References: <20150105151453.E32BD1A4CF3@localhost.localdomain> Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Cc: linux-kernel@vger.kernel.org, Paul Mackerras , linuxppc-dev@lists.ozlabs.org List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Mon, 2015-01-05 at 16:14 +0100, Christophe Leroy wrote: > + } > + __clear_bit(id, stale_map[cpu]); > + > + } Whitespace > + > + /* Flush the TLB for all contexts */ > + _tlbil_all(); Can you put a comment in here pointing out that for this to work on SMP, it needs to be a global invalidation, or at least some indication on this function that it's not SMP-safe? I realize there's no SMP 8xx, and this is only called in place of steal_context_up(), but in case others think of reusing this elsewhere[1]... -Scott [1] It might be helpful on e500 derivatives in virtualized environments where invalidate-by-PID is expensive, depending on how often stealing happens there.