Re: [PATCH v2] zsmalloc: Add Kconfig for enabling PTE method

From: Seth Jennings
Date: Mon Feb 18 2013 - 13:09:24 EST


On 02/17/2013 12:19 AM, Ric Mason wrote:
> On 02/06/2013 10:17 AM, Minchan Kim wrote:
>> Zsmalloc has two methods 1) copy-based and 2) pte-based to access
>> allocations that span two pages. You can see history why we supported
>> two approach from [1].
>>
>> In summary, copy-based method is 3 times fater in x86 while pte-based
>> is 6 times faster in ARM.
>
> Why in some arches copy-based method is better and in the other arches
> pte-based is better? What's the root reason?

Minchan might know more about this (or Russell King) but I'll give it
a try.

MMU designs can vary pretty significantly from arch to arch. An
operation that is cheap on one MMU design can be expensive on another,
especially once SMP gets involved, possibly resulting in
inter-processor interrupts.

RAM speed is also a factor since the copy-method will use more memory
bandwidth. Embedded systems typically won't have really fast memory.

Seth

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/