Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit beab0f41 authored by Linux Build Service Account's avatar Linux Build Service Account
Browse files

Merge 090c2c57 on remote branch

Change-Id: I42eb57f73518181ad928920a3bbbcfd3e82febe0
parents 6a43f0d3 090c2c57
Loading
Loading
Loading
Loading
+63 −0
Original line number Diff line number Diff line
Qualcomm Technologies, Inc. l2 Cache counters
=============================================

This driver supports the L2 cache clusters counters found in
Qualcomm Technologies, Inc.

There are multiple physical L2 cache clusters, each with their
own counters. Each cluster has one or more CPUs associated with it.

There is one logical L2 PMU exposed, which aggregates the results from
the physical PMUs(counters).

The driver provides a description of its available events and configuration
options in sysfs, see /sys/devices/l2cache_counters.

The "format" directory describes the format of the events.

And format is of the form 0xXXX
Where,

  1 bit(lsb) for group (group is either txn/tenure counter).
  4 bits for serial number for counter starting from 0 to 8.
  5 bits for bit position of counter enable bit in a register.

The driver provides a "cpumask" sysfs attribute which contains a mask
consisting of one CPU per cluster which will be used to handle all the PMU
events on that cluster.

Examples for use with perf:

  perf stat -e l2cache_counters/ddr_read/,l2cache_counters/ddr_write/ -a sleep 1

  perf stat -e l2cache_counters/cycles/ -C 2 sleep 1

Limitation: The driver does not support sampling, therefore "perf record" will
not work. Per-task perf sessions are not supported.

For transaction counters we don't need to set any configuration
before monitoring.

For tenure counter use case, we need to set threshold value of low and mid
range occurrence counter value of cluster(as these occurrence counter exist
for each cluster) in sysfs.

echo 1 > /sys/bus/eventsource/devices/l2cache_counters/which_cluster_tenure
echo X > /sys/bus/event_source/devices/l2cache_counters/low_tenure_threshold
echo Y > /sys/bus/event_source/devices/l2cache_counters/mid_tenure_threshold
Here, X < Y

e.g:

  perf stat -e l2cache_counters/low_range_occur/ -e
  l2cache_counters/mid_range_occur/ -e l2cache_counters/high_range
  _occur/ -C 4 sleep 10

 Performance counter stats for 'CPU(s) 4':

                 7      l2cache_counters/low_range_occur/
                 5      l2cache_counters/mid_range_occur/
                 7      l2cache_counters/high_range_occur/

      10.204140400 seconds time elapsed
+30 −0
Original line number Diff line number Diff line
@@ -97,6 +97,7 @@ config ARM
	select HAVE_SYSCALL_TRACEPOINTS
	select HAVE_UID16
	select HAVE_VIRT_CPU_ACCOUNTING_GEN
	select IOMMU_DMA if IOMMU_SUPPORT
	select IRQ_FORCED_THREADING
	select MODULES_USE_ELF_REL
	select NEED_DMA_MAP_STATE
@@ -1717,6 +1718,35 @@ config ARM_MODULE_PLTS
	  Disabling this is usually safe for small single-platform
	  configurations. If unsure, say y.

choice
	prompt "Virtual Memory Reclaim"
	default ENABLE_VMALLOC_SAVING
	help
	  Select the method of reclaiming virtual memory. Two values
	  are allowed to choose, one is NO_VM_RECLAIM, the other is
	  ENABLE_VMALLOC_SAVING.

	  If you are not absolutely sure what you are doing, leave this
	  option alone.

config ENABLE_VMALLOC_SAVING
	bool "Reclaim memory for each subsystem"
	help
	  Enable this config to reclaim the virtual space belonging
	  to any subsystem which is expected to have a lifetime of
	  the entire system. This feature allows lowmem to be non-
	  contiguous.

config NO_VM_RECLAIM
	bool "Do not reclaim memory"
	help
	  Do not reclaim any memory. This might result in less lowmem
	  and wasting some virtual memory space which could otherwise
	  be reclaimed by using any of the other two config options as
	  above.

endchoice

config FORCE_MAX_ZONEORDER
	int "Maximum zone order"
	default "12" if SOC_AM33XX
+6 −0
Original line number Diff line number Diff line
@@ -491,6 +491,7 @@ CONFIG_UIO_MSM_SHAREDMEM=y
CONFIG_STAGING=y
CONFIG_ASHMEM=y
CONFIG_ION=y
CONFIG_ION_POOL_AUTO_REFILL=y
CONFIG_QPNP_REVID=y
CONFIG_SPS=y
CONFIG_SPS_SUPPORT_NDP_BAM=y
@@ -511,6 +512,7 @@ CONFIG_HWSPINLOCK_QCOM=y
CONFIG_MAILBOX=y
CONFIG_QCOM_APCS_IPC=y
CONFIG_MSM_QMP=y
CONFIG_IOMMU_IO_PGTABLE_FAST=y
CONFIG_ARM_SMMU=y
CONFIG_QCOM_LAZY_MAPPING=y
CONFIG_IOMMU_DEBUG=y
@@ -529,6 +531,7 @@ CONFIG_QCOM_QMI_HELPERS=y
CONFIG_QCOM_SMEM=y
CONFIG_QCOM_SMD_RPM=y
CONFIG_QCOM_EARLY_RANDOM=y
CONFIG_QCOM_MEMORY_DUMP_V2=y
CONFIG_QCOM_SMP2P=y
CONFIG_SETUP_SSR_NOTIF_TIMEOUTS=y
CONFIG_SSR_SYSMON_NOTIF_TIMEOUT=20000
@@ -544,6 +547,7 @@ CONFIG_MSM_PIL_SSR_GENERIC=y
CONFIG_MSM_BOOT_STATS=y
CONFIG_QCOM_DCC_V2=y
CONFIG_QCOM_EUD=y
CONFIG_QCOM_MINIDUMP=y
CONFIG_QCOM_FSA4480_I2C=y
CONFIG_QCOM_WATCHDOG_V2=y
CONFIG_QCOM_FORCE_WDOG_BITE_ON_PANIC=y
@@ -557,6 +561,7 @@ CONFIG_MSM_EVENT_TIMER=y
CONFIG_QTEE_SHM_BRIDGE=y
CONFIG_MEM_SHARE_QMI_SERVICE=y
CONFIG_QMP_DEBUGFS_CLIENT=y
CONFIG_QCOM_CDSP_RM=y
CONFIG_QCOM_QHEE_ENABLE_MEM_PROTECTION=y
CONFIG_QCOM_CX_IPEAK=y
CONFIG_ICNSS=y
@@ -645,6 +650,7 @@ CONFIG_CORESIGHT_LINK_AND_SINK_TMC=y
CONFIG_CORESIGHT_DYNAMIC_REPLICATOR=y
CONFIG_CORESIGHT_STM=y
CONFIG_CORESIGHT_CTI=y
CONFIG_CORESIGHT_CTI_SAVE_DISABLE=y
CONFIG_CORESIGHT_TPDA=y
CONFIG_CORESIGHT_TPDM=y
CONFIG_CORESIGHT_HWEVENT=y
+8 −0
Original line number Diff line number Diff line
@@ -96,6 +96,7 @@ CONFIG_IOSCHED_BFQ=y
# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
CONFIG_CLEANCACHE=y
CONFIG_CMA=y
CONFIG_CMA_DEBUG=y
CONFIG_CMA_DEBUGFS=y
CONFIG_CMA_ALLOW_WRITE_DEBUGFS=y
CONFIG_ZSMALLOC=y
@@ -494,6 +495,7 @@ CONFIG_UIO_MSM_SHAREDMEM=y
CONFIG_STAGING=y
CONFIG_ASHMEM=y
CONFIG_ION=y
CONFIG_ION_POOL_AUTO_REFILL=y
CONFIG_QPNP_REVID=y
CONFIG_SPS=y
CONFIG_SPS_SUPPORT_NDP_BAM=y
@@ -514,7 +516,9 @@ CONFIG_HWSPINLOCK_QCOM=y
CONFIG_MAILBOX=y
CONFIG_QCOM_APCS_IPC=y
CONFIG_MSM_QMP=y
CONFIG_IOMMU_IO_PGTABLE_FAST=y
CONFIG_ARM_SMMU=y
CONFIG_IOMMU_TLBSYNC_DEBUG=y
CONFIG_ARM_SMMU_TESTBUS_DUMP=y
CONFIG_QCOM_LAZY_MAPPING=y
CONFIG_IOMMU_DEBUG=y
@@ -533,6 +537,7 @@ CONFIG_QCOM_QMI_HELPERS=y
CONFIG_QCOM_SMEM=y
CONFIG_QCOM_SMD_RPM=y
CONFIG_QCOM_EARLY_RANDOM=y
CONFIG_QCOM_MEMORY_DUMP_V2=y
CONFIG_QCOM_SMP2P=y
CONFIG_SETUP_SSR_NOTIF_TIMEOUTS=y
CONFIG_SSR_SYSMON_NOTIF_TIMEOUT=20000
@@ -548,6 +553,7 @@ CONFIG_MSM_PIL_SSR_GENERIC=y
CONFIG_MSM_BOOT_STATS=y
CONFIG_QCOM_DCC_V2=y
CONFIG_QCOM_EUD=y
CONFIG_QCOM_MINIDUMP=y
CONFIG_MSM_CORE_HANG_DETECT=y
CONFIG_MSM_GLADIATOR_HANG_DETECT=y
CONFIG_MSM_GLADIATOR_ERP=y
@@ -566,6 +572,7 @@ CONFIG_MSM_EVENT_TIMER=y
CONFIG_QTEE_SHM_BRIDGE=y
CONFIG_MEM_SHARE_QMI_SERVICE=y
CONFIG_QMP_DEBUGFS_CLIENT=y
CONFIG_QCOM_CDSP_RM=y
CONFIG_QCOM_QHEE_ENABLE_MEM_PROTECTION=y
CONFIG_QCOM_CX_IPEAK=y
CONFIG_ICNSS=y
@@ -651,6 +658,7 @@ CONFIG_DEBUG_SECTION_MISMATCH=y
CONFIG_MAGIC_SYSRQ=y
CONFIG_DEBUG_PAGEALLOC=y
CONFIG_SLUB_DEBUG_PANIC_ON=y
CONFIG_DEBUG_PANIC_ON_OOM=y
CONFIG_DEBUG_PAGEALLOC_ENABLE_DEFAULT=y
CONFIG_PAGE_POISONING_ENABLE_DEFAULT=y
CONFIG_DEBUG_OBJECTS=y
+1 −1
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@

#include <linux/types.h>

#define COMMAND_LINE_SIZE 1024
#define COMMAND_LINE_SIZE 2048

/* The list ends with an ATAG_NONE node. */
#define ATAG_NONE	0x00000000
Loading