[PATCH v3 7/8] powerpc/mm: Consolidate radix and hash address map details

Michael Ellerman mpe at ellerman.id.au
Wed Apr 17 22:34:57 AEST 2019


Nicholas Piggin <npiggin at gmail.com> writes:
> Aneesh Kumar K.V's on April 16, 2019 8:07 pm:
>> We now have
>> 
>> 4K page size config
>> 
>>  kernel_region_map_size = 16TB
>>  kernel vmalloc start   = 0xc000100000000000
>>  kernel IO start        = 0xc000200000000000
>>  kernel vmemmap start   = 0xc000300000000000
>> 
>> with 64K page size config:
>> 
>>  kernel_region_map_size = 512TB
>>  kernel vmalloc start   = 0xc008000000000000
>>  kernel IO start        = 0xc00a000000000000
>>  kernel vmemmap start   = 0xc00c000000000000
>
> Hey Aneesh,
>
> I like the series, I like consolidating the address spaces into 0xc,
> and making the layouts match or similar isn't a bad thing. I don't
> see any real reason to force limitations on one layout or another --
> you could make the argument that 4k radix should match 64k radix
> as much as matching 4k hash IMO.

I don't think I agree. The 4K and 64K layouts must be different because
the page size is different and therefore the span of the page tables is
different. (Unless you shrunk the 64K layouts to match 4K but that would
be silly)

On the other hand there's no good reason why hash & radix need to
differ, it's just that radix has a more strictly defined layout and it
didn't match what hash used when we added radix. We really should have
done this realignment of the hash address ranges before we merged radix.


> I wouldn't like to tie them too strongly to the same base defines
> that force them to stay in sync.
>
> Can we drop this patch? Or at least keep the users of the H_ and R_
> defines and set them to the same thing in map.h?

I don't understand why that would be a good thing?

We have all this indirection through variables at the moment, for what
appear to be constants. It makes the code harder to follow and it's less
efficient as well.

cheers


More information about the Linuxppc-dev mailing list