summaryrefslogtreecommitdiff
path: root/include/linux/pstore_ram.h
diff options
context:
space:
mode:
authorJoel Fernandes <joelaf@google.com>2016-10-20 10:34:04 +0300
committerKees Cook <keescook@chromium.org>2016-11-16 03:34:26 +0300
commita1cf53ac6d156721afa86453d5e8423461881231 (patch)
tree9d3c608d505dbebbf58157177467d7d105a195fc /include/linux/pstore_ram.h
parentde83209249d64bad993f25d3ea4bba57683e2e2e (diff)
downloadlinux-a1cf53ac6d156721afa86453d5e8423461881231.tar.xz
ramoops: Split ftrace buffer space into per-CPU zones
If the RAMOOPS_FLAG_FTRACE_PER_CPU flag is passed to ramoops pdata, split the ftrace space into multiple zones depending on the number of CPUs. This speeds up the performance of function tracing by about 280% in my tests as we avoid the locking. The trade off being lesser space available per CPU. Let the ramoops user decide which option they want based on pdata flag. Signed-off-by: Joel Fernandes <joelaf@google.com> [kees: added max_ftrace_cnt to track size, added DT logic and docs] Signed-off-by: Kees Cook <keescook@chromium.org>
Diffstat (limited to 'include/linux/pstore_ram.h')
-rw-r--r--include/linux/pstore_ram.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/pstore_ram.h b/include/linux/pstore_ram.h
index 4058bf991868..9395f06e8372 100644
--- a/include/linux/pstore_ram.h
+++ b/include/linux/pstore_ram.h
@@ -86,6 +86,8 @@ ssize_t persistent_ram_ecc_string(struct persistent_ram_zone *prz,
* @mem_address physical memory address to contain ramoops
*/
+#define RAMOOPS_FLAG_FTRACE_PER_CPU BIT(0)
+
struct ramoops_platform_data {
unsigned long mem_size;
phys_addr_t mem_address;
@@ -95,6 +97,7 @@ struct ramoops_platform_data {
unsigned long ftrace_size;
unsigned long pmsg_size;
int dump_oops;
+ u32 flags;
struct persistent_ram_ecc_info ecc_info;
};