From patchwork Thu Jun 23 15:12:49 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Russell King - ARM Linux X-Patchwork-Id: 909102 Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p5NFDTow003402 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 23 Jun 2011 15:13:50 GMT Received: from canuck.infradead.org ([2001:4978:20e::1]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QZlas-0002lw-9M; Thu, 23 Jun 2011 15:13:22 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1QZlar-0006Rq-PC; Thu, 23 Jun 2011 15:13:21 +0000 Received: from [2002:4e20:1eda::1] (helo=caramon.arm.linux.org.uk) by canuck.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QZlaf-0006PN-F0 for linux-arm-kernel@lists.infradead.org; Thu, 23 Jun 2011 15:13:10 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=arm.linux.org.uk; s=caramon; h=Sender:In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date; bh=95WaQflP3MyFmEb42uIYGwxeYXr79tbDtrOLMZLMgjs=; b=pma8DaamJJuuf4rMkYudctdAiJEEYd9ncUQpFOPnmEgjQsvBjnw/MRoGdhdZvh8H8ALIhM/WOo1yJPBwPs5BCuJe71hVtIm2qQHUDflAr062QOg/U6hqPH6+u6EjaJW70kilZHa/BoGhNnRysp0Oe7lrJEF43G/RPR0hJdHao40=; Received: from n2100.arm.linux.org.uk ([2002:4e20:1eda:1:214:fdff:fe10:4f86]) by caramon.arm.linux.org.uk with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1QZlaN-00055c-Di; Thu, 23 Jun 2011 16:12:51 +0100 Received: from linux by n2100.arm.linux.org.uk with local (Exim 4.72) (envelope-from ) id 1QZlaM-0000az-21; Thu, 23 Jun 2011 16:12:50 +0100 Date: Thu, 23 Jun 2011 16:12:49 +0100 From: Russell King - ARM Linux To: Catalin Marinas Subject: Re: parallel load of modules on an ARM multicore Message-ID: <20110623151249.GA23234@n2100.arm.linux.org.uk> References: <274124B9C6907D4B8CE985903EAA19E9185A92923E@SI-MBX06.de.bosch.com> <20110621155030.GA21245@1n450.cable.virginmedia.net> <274124B9C6907D4B8CE985903EAA19E9185A92978D@SI-MBX06.de.bosch.com> <20110623145229.GA18409@1n450.cable.virginmedia.net> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20110623145229.GA18409@1n450.cable.virginmedia.net> User-Agent: Mutt/1.5.19 (2009-01-05) X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110623_111310_150765_18517A24 X-CRM114-Status: GOOD ( 16.03 ) X-Spam-Score: 1.2 (+) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (1.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 1.3 RDNS_NONE Delivered to internal network by a host with no rDNS Cc: "EXTERNAL Waechtler Peter \(Fa. TCP, CM-AI/PJ-CF31\)" , "linux-arm-kernel@lists.infradead.org" X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Thu, 23 Jun 2011 15:13:50 +0000 (UTC) On Thu, Jun 23, 2011 at 03:52:29PM +0100, Catalin Marinas wrote: > Peter, > > On Thu, Jun 23, 2011 at 04:39:01PM +0200, EXTERNAL Waechtler Peter (Fa. TCP, CM-AI/PJ-CF31) wrote: > > it's interesting that you almost agree with me. > > > > But isn't it really expensive to flush the icache on switch_mm? > > Is that meant as a test to see if the problem goes away? > > Who said anything about flushing the icache on switch_mm()? My patch > doesn't do this, it actually reduces the amount of cache flushing on > ARM11MPCore. Ahem, your patch does: This means that if cache_ops_need_broadcast() is true, we will flush the I-cache at every MM context switch as very few MMs will have an empty mm_cpumask(). Far from reducing the number of I-cache flushes, this will significantly increase the flushing. --- a/arch/arm/include/asm/mmu_context.h +++ b/arch/arm/include/asm/mmu_context.h @@ -114,7 +114,8 @@ switch_mm(struct mm_struct *prev, struct mm_struct *next, #ifdef CONFIG_SMP /* check for possible thread migration */ if (!cpumask_empty(mm_cpumask(next)) && - !cpumask_test_cpu(cpu, mm_cpumask(next))) + (cache_ops_need_broadcast() || + !cpumask_test_cpu(cpu, mm_cpumask(next)))) __flush_icache_all(); #endif if (!cpumask_test_and_set_cpu(cpu, mm_cpumask(next)) || prev != next) {