[PATCH kernel] powerpc/powernv/ioda2: Gracefully fail if too many TCE levels requested

Alexey Kardashevskiy aik at ozlabs.ru
Mon Mar 6 15:02:29 AEDT 2017


On 06/03/17 14:36, Benjamin Herrenschmidt wrote:
> On Mon, 2017-03-06 at 12:28 +1100, Alexey Kardashevskiy wrote:
>> 8192*8192*8192*65536>>40 = 32768TB of addressable memory (but there is no
>> good reason not to use huge pages);
> 
> No, 39 bits is half a TB. That's not enough.

Ah. My bad. 55 bits it is. It is 2 "indirect" levels + 1 "direct" level,
each 8192 entries. So 13*3+16=55.


> 
>> 8192*8192*8192*4096>>40 = 2048TB or addressable memory (even with 2
>> indirect levels but we can have all 5 levels with 4K IOMMU pages).
>>
>> Looks enough to me...
>>
>> And in this particular patch I am not limiting anything, I just replace
>> already existing EEH condition with -EINVAL. If it is this important to
>> have all 5 levels, then we can switch from alloc_pages_node() to
>> kmem_cache_alloc_node(), in a separate patch.
>>
>>
>> -- 
> 


-- 
Alexey


More information about the Linuxppc-dev mailing list