From patchwork Wed Feb 4 01:08:54 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roland Dreier X-Patchwork-Id: 21822 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id B1624DE176 for ; Wed, 4 Feb 2009 12:09:49 +1100 (EST) X-Original-To: linuxppc-dev@ozlabs.org Delivered-To: linuxppc-dev@ozlabs.org Received: from sj-iport-6.cisco.com (sj-iport-6.cisco.com [171.71.176.117]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (Client CN "sj-iport-6.cisco.com", Issuer "Cisco SSCA" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 28CBCDDEF1 for ; Wed, 4 Feb 2009 12:09:10 +1100 (EST) X-IronPort-AV: E=Sophos;i="4.37,375,1231113600"; d="scan'208";a="242370480" Received: from sj-dkim-4.cisco.com ([171.71.179.196]) by sj-iport-6.cisco.com with ESMTP; 04 Feb 2009 01:08:55 +0000 Received: from sj-core-2.cisco.com (sj-core-2.cisco.com [171.71.177.254]) by sj-dkim-4.cisco.com (8.12.11/8.12.11) with ESMTP id n1418tZh000826; Tue, 3 Feb 2009 17:08:55 -0800 Received: from xbh-sjc-211.amer.cisco.com (xbh-sjc-211.cisco.com [171.70.151.144]) by sj-core-2.cisco.com (8.13.8/8.13.8) with ESMTP id n1418tVK023042; Wed, 4 Feb 2009 01:08:55 GMT Received: from xfe-sjc-211.amer.cisco.com ([171.70.151.174]) by xbh-sjc-211.amer.cisco.com with Microsoft SMTPSVC(6.0.3790.1830); Tue, 3 Feb 2009 17:08:55 -0800 Received: from roland-conroe ([10.33.42.9]) by xfe-sjc-211.amer.cisco.com with Microsoft SMTPSVC(6.0.3790.1830); Tue, 3 Feb 2009 17:08:55 -0800 Received: by roland-conroe (Postfix, from userid 33217) id E4E27E71E3; Tue, 3 Feb 2009 17:08:54 -0800 (PST) From: Roland Dreier To: Benjamin Herrenschmidt , Eli Cohen Subject: FW: [PATCH] powerpc/mm: Export HPAGE_SHIFT References: <20090203164930.GA10101@mtls03> X-Message-Flag: Warning: May contain useful information Date: Tue, 03 Feb 2009 17:08:54 -0800 In-Reply-To: <20090203164930.GA10101@mtls03> (Eli Cohen's message of "Tue, 3 Feb 2009 18:49:30 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) MIME-Version: 1.0 X-OriginalArrivalTime: 04 Feb 2009 01:08:55.0135 (UTC) FILETIME=[266E46F0:01C98665] DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; l=1523; t=1233709735; x=1234573735; c=relaxed/simple; s=sjdkim4002; h=Content-Type:From:Subject:Content-Transfer-Encoding:MIME-Version; d=cisco.com; i=rdreier@cisco.com; z=From:=20Roland=20Dreier=20 |Subject:=20FW=3A=20[PATCH]=20powerpc/mm=3A=20Export=20HPAG E_SHIFT |Sender:=20; bh=T10xYtbeQt8/SCUg9vYSBRxBUO0wYSNoRU9V1fpqkuQ=; b=gM8o6qLSS9L2CUrv2jg/4XwWvSpKs1P4uNHFku3zR9NLSvSON4nZShgs8Y H1De1wQm/2v7/OzIvLUzYW9XGaZB9tvBzldvSAZqtX8VpcjTA3xLrA24STNR 7Hu/8hRyeI; Authentication-Results: sj-dkim-4; header.From=rdreier@cisco.com; dkim=pass ( sig from cisco.com/sjdkim4002 verified; ); Cc: linuxppc-dev@ozlabs.org, linux-kernel@vger.kernel.org X-BeenThere: linuxppc-dev@ozlabs.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org Forwarding Eli's patch below, since PowerPC guys may have missed it. I guess the question for Ben et al is whether there is any issue with exporting HPAGE_SHIFT for modules (can be EXPORT_SYMBOL_GPL if you feel it's an internal detail). It would probably make sense to roll this change into the mlx4 change that Eli alludes to below and merge through my tree (with ppc maintainer acks of course), rather than splitting this patch out and introducing cross-tree dependencies (and also separating the rationale for the change from the change itself). Thanks, Roland Drivers may want to take advantage of the large pages used for memory obtained from hugetlbfs. One example is mlx4_ib which can use much less MTT entries (in the order of HPAGE_SIZE / PAGE_SIZE) when registering such memory, thus scale significantly better when registering larger memory regions. Other drivers could also benefit from this. Signed-off-by: Eli Cohen --- arch/powerpc/mm/hash_utils_64.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c index 8d5b475..6cff8c7 100644 --- a/arch/powerpc/mm/hash_utils_64.c +++ b/arch/powerpc/mm/hash_utils_64.c @@ -104,6 +104,7 @@ int mmu_highuser_ssize = MMU_SEGSIZE_256M; u16 mmu_slb_size = 64; #ifdef CONFIG_HUGETLB_PAGE unsigned int HPAGE_SHIFT; +EXPORT_SYMBOL(HPAGE_SHIFT); #endif #ifdef CONFIG_PPC_64K_PAGES int mmu_ci_restrictions;