From patchwork Tue Jul 12 07:34:59 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: heechul Yun X-Patchwork-Id: 967402 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 p6C7ZFIe020736 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 12 Jul 2011 07:35:37 GMT Received: from canuck.infradead.org ([2001:4978:20e::1]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QgXUq-0007CG-2v; Tue, 12 Jul 2011 07:35:08 +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 1QgXUp-00015Y-Nv; Tue, 12 Jul 2011 07:35:07 +0000 Received: from mail-yi0-f49.google.com ([209.85.218.49]) by canuck.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QgXUl-00015C-9D for linux-arm-kernel@lists.infradead.org; Tue, 12 Jul 2011 07:35:06 +0000 Received: by yib17 with SMTP id 17so2131129yib.36 for ; Tue, 12 Jul 2011 00:34:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type; bh=LedfGCoTTF6aL/CrdkIM2vKdi81DodCZzh80qVB7UeU=; b=rEXqlqk1numbGuvSSk2TrLbhHyW6AEzhlxdt2nvzZSdAQeKrZUS9zHWsKOlAElaYLN 6AMCnnbdiXpbaSWmBr8N++svr8fCF8dnesb3Z4LBelhktTX8xVfxrE1XAhFYVq261U/c RsXNhG6hSA87KkRjg/JhqW4ZZQC+UkcyjZQJI= MIME-Version: 1.0 Received: by 10.236.5.206 with SMTP id 54mr6537395yhl.200.1310456099147; Tue, 12 Jul 2011 00:34:59 -0700 (PDT) Received: by 10.236.61.35 with HTTP; Tue, 12 Jul 2011 00:34:59 -0700 (PDT) Date: Tue, 12 Jul 2011 00:34:59 -0700 X-Google-Sender-Auth: nSEww2uVp3zIz0XeO7WgMlZ2oBg Message-ID: Subject: [RFC] Improving scalability of smp_mb__[before|after]_clear_bit From: heechul Yun To: catalin.marinas@arm.com, Russell King - ARM Linux X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110712_033503_472521_EC6C71FC X-CRM114-Status: GOOD ( 10.81 ) X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (heechul.yun[at]gmail.com) -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.218.49 listed in list.dnswl.org] 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 Cc: 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]); Tue, 12 Jul 2011 07:35:37 +0000 (UTC) I think L2 cache sync operation, called by mb(), is not necessary for bitops. This patch improves lat_pagefault of lmbench by up to 11% on a A9 SMP. Higher proceesor counts can benefit more. Acked-by: Catalin Marinas diff --git a/arch/arm/include/asm/bitops.h b/arch/arm/include/asm/bitops.h index b4892a0..f428059 100644 --- a/arch/arm/include/asm/bitops.h +++ b/arch/arm/include/asm/bitops.h @@ -26,8 +26,8 @@ #include #include -#define smp_mb__before_clear_bit() mb() -#define smp_mb__after_clear_bit() mb() +#define smp_mb__before_clear_bit() smp_mb() +#define smp_mb__after_clear_bit() smp_mb() /* * These functions are the basis of our bit ops.