• Michael Ellerman's avatar
    powerpc/mm/hash64: Make vmalloc 56T on hash · 21a0e8c1
    Michael Ellerman authored
    On 64-bit book3s, with the hash MMU, we currently define the kernel
    virtual space (vmalloc, ioremap etc.), to be 16T in size. This is a
    leftover from pre v3.7 when our user VM was also 16T.
    
    Of that 16T we split it 50/50, with half used for PCI IO and ioremap
    and the other 8T for vmalloc.
    
    We never bothered to make it any bigger because 8T of vmalloc ought to
    be enough for anybody. But it turns out that's not true, the per cpu
    allocator wants large amounts of vmalloc space, not to make large
    allocations, but to allow a large stride between allocations, because
    we use pcpu_embed_first_chunk().
    
    With a bit of juggling we can increase the entire kernel virtual space
    to 64T. The only real complication is the check of the address in the
    SLB miss handler, see the comment in the code.
    
    Although we could continue to split virtual space 50/50 as we do now,
    no one seems to be running out of PCI IO or ioremap space. So instead
    keep that as 8T, and use the remaining 56T for vmalloc.
    
    In future we should be able to increase the kernel virtual space to
    512T, the code already supports that, it just needs testing on older
    hardware.
    Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
    Reviewed-by: default avatarAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
    21a0e8c1
slb_low.S 9.31 KB