• Joel Fernandes's avatar
    pstore: Make spinlock per zone instead of global · 10970449
    Joel Fernandes authored
    Currently pstore has a global spinlock for all zones. Since the zones
    are independent and modify different areas of memory, there's no need
    to have a global lock, so we should use a per-zone lock as introduced
    here. Also, when ramoops's ftrace use-case has a FTRACE_PER_CPU flag
    introduced later, which splits the ftrace memory area into a single zone
    per CPU, it will eliminate the need for locking. In preparation for this,
    make the locking optional.
    Signed-off-by: default avatarJoel Fernandes <joelaf@google.com>
    [kees: updated commit message]
    Signed-off-by: default avatarKees Cook <keescook@chromium.org>
    10970449
ram_core.c 13.1 KB