[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <485910A0.1060007@gmail.com>
Date: Wed, 18 Jun 2008 15:41:52 +0200
From: Jiri Slaby <jirislaby@...il.com>
To: Nick Piggin <nickpiggin@...oo.com.au>
CC: Ingo Molnar <mingo@...hat.com>, tglx@...utronix.de, hpa@...or.com,
linux-kernel@...r.kernel.org, linux-mm@...ck.org,
Andi Kleen <andi@...stfloor.org>
Subject: Re: [PATCH 1/1] MM: virtual address debug
Nick Piggin napsal(a):
> On Thursday 12 June 2008 21:56, Jiri Slaby wrote:
>> Add some (configurable) expensive sanity checking to catch wrong address
>> translations on x86.
>>
>> - create linux/mmdebug.h file to be able include this file in
>> asm headers to not get unsolvable loops in header files
>> - __phys_addr on x86_32 became a function in ioremap.c since
>> PAGE_OFFSET, is_vmalloc_addr and VMALLOC_* non-constasts are undefined
>> if declared in page_32.h
>
> Uh, I have to disagree with this. __phys_addr is used in some really
> performance critical parts of the kernel, and the function calls are
> free mindset is just wrong. Even for modern x86 CPUs, the function
> call return might take 10 cycles or more when you include all costs.
>
> And for something like this
>
> #define __phys_addr(x) ((x) - PAGE_OFFSET)
>
> the code to call the function is probably bigger than inline generated
> code anyway.
Thanks for comments, well, are you OK with __phys_addr being a function only
on CONFIG_VIRTUAL_DEBUG?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists