• Pavel Tatashin's avatar
    mm: define memblock_virt_alloc_try_nid_raw · ea1f5f37
    Pavel Tatashin authored
    * A new variant of memblock_virt_alloc_* allocations:
        - Does not zero the allocated memory
        - Does not panic if request cannot be satisfied
    * optimize early system hash allocations
    Clients can call alloc_large_system_hash() with flag: HASH_ZERO to
    specify that memory that was allocated for system hash needs to be
    zeroed, otherwise the memory does not need to be zeroed, and client will
    initialize it.
    If memory does not need to be zero'd, call the new
    memblock_virt_alloc_raw() interface, and thus improve the boot
    * debug for raw alloctor
    When CONFIG_DEBUG_VM is enabled, this patch sets all the memory that is
    returned by memblock_virt_alloc_try_nid_raw() to ones to ensure that no
    places excpect zeroed memory.
    Link: http://lkml.kernel.org/r/20171013173214.27300-6-pasha.tatashin@oracle.com
    Signed-off-by: default avatarPavel Tatashin <pasha.tatashin@oracle.com>
    Reviewed-by: default avatarSteven Sistare <steven.sistare@oracle.com>
    Reviewed-by: default avatarDaniel Jordan <daniel.m.jordan@oracle.com>
    Reviewed-by: default avatarBob Picco <bob.picco@oracle.com>
    Tested-by: default avatarBob Picco <bob.picco@oracle.com>
    Acked-by: default avatarMichal Hocko <mhocko@suse.com>
    Cc: Alexander Potapenko <glider@google.com>
    Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>
    Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
    Cc: Catalin Marinas <catalin.marinas@arm.com>
    Cc: Christian Borntraeger <borntraeger@de.ibm.com>
    Cc: David S. Miller <davem@davemloft.net>
    Cc: Dmitry Vyukov <dvyukov@google.com>
    Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
    Cc: "H. Peter Anvin" <hpa@zytor.com>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: Mark Rutland <mark.rutland@arm.com>
    Cc: Matthew Wilcox <willy@infradead.org>
    Cc: Mel Gorman <mgorman@techsingularity.net>
    Cc: Michal Hocko <mhocko@kernel.org>
    Cc: Sam Ravnborg <sam@ravnborg.org>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Cc: Will Deacon <will.deacon@arm.com>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>