• Kairui Song's avatar
    vmcore: add a kernel parameter novmcoredd · c6c40533
    Kairui Song authored
    Since commit 2724273e ("vmcore: add API to collect hardware dump in
    second kernel"), drivers are allowed to add device related dump data to
    vmcore as they want by using the device dump API.  This has a potential
    issue, the data is stored in memory, drivers may append too much data
    and use too much memory.  The vmcore is typically used in a kdump kernel
    which runs in a pre-reserved small chunk of memory.  So as a result it
    will make kdump unusable at all due to OOM issues.
    
    So introduce new 'novmcoredd' command line option.  User can disable
    device dump to reduce memory usage.  This is helpful if device dump is
    using too much memory, disabling device dump could make sure a regular
    vmcore without device dump data is still available.
    
    [akpm@linux-foundation.org: tweak documentation]
    [akpm@linux-foundation.org: vmcore.c needs moduleparam.h]
    Link: http://lkml.kernel.org/r/20190528111856.7276-1-kasong@redhat.comSigned-off-by: default avatarKairui Song <kasong@redhat.com>
    Acked-by: default avatarDave Young <dyoung@redhat.com>
    Reviewed-by: default avatarBhupesh Sharma <bhsharma@redhat.com>
    Cc: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
    Cc: "David S . Miller" <davem@davemloft.net>
    Cc: Eric Biederman <ebiederm@xmission.com>
    Cc: Alexey Dobriyan <adobriyan@gmail.com>
    Cc: Baoquan He <bhe@redhat.com>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    c6c40533
vmcore.c 40.2 KB