linux-mips
[Top] [All Lists]

Re: [PATCH, RESEND] asm-generic, mm: pgtable: consolidate zero page help

To: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Subject: Re: [PATCH, RESEND] asm-generic, mm: pgtable: consolidate zero page helpers
From: David Rientjes <rientjes@google.com>
Date: Wed, 12 Dec 2012 14:54:55 -0800 (PST)
Cc: Andrew Morton <akpm@linux-foundation.org>, linux-mm@kvack.org, Arnd Bergmann <arnd@arndb.de>, linux-arch@vger.kernel.org, linux-s390@vger.kernel.org, Martin Schwidefsky <schwidefsky@de.ibm.com>, Heiko Carstens <heiko.carstens@de.ibm.com>, linux-mips@linux-mips.org, Ralf Baechle <ralf@linux-mips.org>, John Crispin <blogic@openwrt.org>
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=date:from:x-x-sender:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version:content-type; bh=05+xC4fgB6q12pou/KeBZJUaZRI19bHQ4h7zg86XZ/Q=; b=jaXxxHKtcWHNODDn+0qAT+oKB3ptWEM88mymZquMWmHrY2KzJeBzSztGr73GGjgl1v 8ATpnsftrFJHUK4JfE98oBf598bvl0+c9SDh4qi05a0quLJ/lQRJ5Ap+5zK3gnQDWJwf Ql0LDd6XgctRDsogyD4v1beaB3Wv3EFuAT14P7VEHK69tCsr94PBb2+QkMPYuXupGu5B 1pJqNw0Mxkcw157zqtB3SlSqLmfPejsfCYuHY3UY4p5LpCS/m2KaCfP1Tvl2aSsN78/U SC/RTM6dqIdF+bWFwWqu8JINNy2C8UB8fV3uvCmpt6puUf8lWRPGAiQgzJIug6x0vtlY Qvzg==
In-reply-to: <20121212105538.GA14208@otc-wbsnb-06>
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
References: <1354881215-26257-1-git-send-email-kirill.shutemov@linux.intel.com> <alpine.DEB.2.00.1212111906270.18872@chino.kir.corp.google.com> <20121212105538.GA14208@otc-wbsnb-06>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Alpine 2.00 (DEB 1167 2008-08-23)
On Wed, 12 Dec 2012, Kirill A. Shutemov wrote:

> > What's the benefit from doing this other than generalizing some per-arch 
> > code?  It simply adds on more layer of redirection to try to find the 
> > implementation that matters for the architecture you're hacking on.
> 
> The idea of asm-generic is consolidation arch code which can be re-used
> for different arches. It also makes support of new arches easier.
> 

Yeah, but you're moving is_zero_pfn() unnecessarily into a header file 
when it is only used mm/memory.c and it adds a __HAVE_* definition that we 
always try to reduce (both __HAVE and __ARCH definitions are frowned 
upon).  I don't think it's much of a win to obfuscate the code because 
mips and s390 implement colored zero pages.

<Prev in Thread] Current Thread [Next in Thread>