From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753681Ab0KYRga (ORCPT ); Thu, 25 Nov 2010 12:36:30 -0500 Received: from mx1.redhat.com ([209.132.183.28]:12271 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752179Ab0KYRg3 (ORCPT ); Thu, 25 Nov 2010 12:36:29 -0500 Date: Thu, 25 Nov 2010 18:35:18 +0100 From: Andrea Arcangeli To: Linus Torvalds Cc: Mel Gorman , linux-mm@kvack.org, Andrew Morton , linux-kernel@vger.kernel.org, Marcelo Tosatti , Adam Litke , Avi Kivity , Hugh Dickins , Rik van Riel , Dave Hansen , Benjamin Herrenschmidt , Ingo Molnar , Mike Travis , KAMEZAWA Hiroyuki , Christoph Lameter , Chris Wright , bpicco@redhat.com, KOSAKI Motohiro , Balbir Singh , "Michael S. Tsirkin" , Peter Zijlstra , Johannes Weiner , Daisuke Nishimura , Chris Mason , Borislav Petkov Subject: Re: [PATCH 17 of 66] add pmd mangling generic functions Message-ID: <20101125173518.GR6118@random.random> References: <6022613f956ee326d9b6.1288798072@v2.random> <20101118125249.GN8135@csn.ul.ie> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 18, 2010 at 09:32:36AM -0800, Linus Torvalds wrote: > I dunno. Those macros are _way_ too big and heavy to be macros or > inline functions. Why aren't pmdp_splitting_flush() etc just > functions? That's because ptep_clear_flush and everything else in that file named with ptep_* and doing expensive tlb flushes was a macro. > > There is no performance advantage to inlining them - the TLB flush is > going to be expensive enough that there's no point in avoiding a > function call. And that header file really does end up being _really_ > ugly. I agree but to me it looks like your compliant applies to the current include/asm-generic/pgtable.h. My changes that simply mirrors closely the style of that file to avoid altering coding style just for the new stuff. That is compact code that I'm not even sure if anybody is using, most certainly x86 isn't using that code so the .text bloat isn't a practical concern. Do you like me to do a cleanup of the asm-generic/pgtable.h and move the tlb flushes to lib/pgtable.c? (ideally the pgtable.o file should be empty after the preprocessor runs on x86*) From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail190.messagelabs.com (mail190.messagelabs.com [216.82.249.51]) by kanga.kvack.org (Postfix) with SMTP id 3CB616B004A for ; Thu, 25 Nov 2010 12:36:12 -0500 (EST) Date: Thu, 25 Nov 2010 18:35:18 +0100 From: Andrea Arcangeli Subject: Re: [PATCH 17 of 66] add pmd mangling generic functions Message-ID: <20101125173518.GR6118@random.random> References: <6022613f956ee326d9b6.1288798072@v2.random> <20101118125249.GN8135@csn.ul.ie> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: owner-linux-mm@kvack.org To: Linus Torvalds Cc: Mel Gorman , linux-mm@kvack.org, Andrew Morton , linux-kernel@vger.kernel.org, Marcelo Tosatti , Adam Litke , Avi Kivity , Hugh Dickins , Rik van Riel , Dave Hansen , Benjamin Herrenschmidt , Ingo Molnar , Mike Travis , KAMEZAWA Hiroyuki , Christoph Lameter , Chris Wright , bpicco@redhat.com, KOSAKI Motohiro , Balbir Singh , "Michael S. Tsirkin" , Peter Zijlstra , Johannes Weiner , Daisuke Nishimura , Chris Mason , Borislav Petkov List-ID: On Thu, Nov 18, 2010 at 09:32:36AM -0800, Linus Torvalds wrote: > I dunno. Those macros are _way_ too big and heavy to be macros or > inline functions. Why aren't pmdp_splitting_flush() etc just > functions? That's because ptep_clear_flush and everything else in that file named with ptep_* and doing expensive tlb flushes was a macro. > > There is no performance advantage to inlining them - the TLB flush is > going to be expensive enough that there's no point in avoiding a > function call. And that header file really does end up being _really_ > ugly. I agree but to me it looks like your compliant applies to the current include/asm-generic/pgtable.h. My changes that simply mirrors closely the style of that file to avoid altering coding style just for the new stuff. That is compact code that I'm not even sure if anybody is using, most certainly x86 isn't using that code so the .text bloat isn't a practical concern. Do you like me to do a cleanup of the asm-generic/pgtable.h and move the tlb flushes to lib/pgtable.c? (ideally the pgtable.o file should be empty after the preprocessor runs on x86*) -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom policy in Canada: sign http://dissolvethecrtc.ca/ Don't email: email@kvack.org