commit bf7165cfa23695c51998231c4efa080fe1d3548d upstream.
There are several trace include files that define TRACE_INCLUDE_FILE.
Include several of them in the same .c file (as I currently have in
some code I am working on), and the compile will blow up with a
"warning: "TRACE_INCLUDE_FILE" redefined #define TRACE_INCLUDE_FILE syscalls"
Every other include file in include/trace/events/ avoids that issue
by having a #undef TRACE_INCLUDE_FILE before the #define; syscalls.h
should have one, too.
Link: http://lkml.kernel.org/r/20160928225554.13bd7ac6@annuminas.surriel.com
Fixes: b8007ef742 ("tracing: Separate raw syscall from syscall tracer")
Signed-off-by: Rik van Riel <riel@redhat.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: Willy Tarreau <w@1wt.eu>
Similarly to the regular discard, trace zone reset events.
Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Consider recent history (residencies) of the cluster and core
low power modes while the cluster level low power mode to enter
is selected.
Change-Id: Ifdc847a71136f55aded8a758b92179bb9aebfdcb
Signed-off-by: Srinivas Rao L <lsrao@codeaurora.org>
Consider recent history (residencies) of the low power modes per
core while the next low power mode to enter is selected. If most
of the history says the pattern of residencies is repeating with
minimal deviation then use the average of these for predicting
the next mode to enter.
If the pattern is not repeating then if more than 50 percent of
the samples out of history have exited a low power mode earlier
than the minumim residency of that mode, restrict it and also low
power modes deeper than that.
In any of the above case, trigger a hrtimer to wakeup cpu with
timeout as predicted+delta or max residency of the mode selected
if a deeper state can be selected after waking up incase if
prediction goes wrong.
Change-Id: I902a06939e19ac51dfd8c2db6b727b203ebfda14
Signed-off-by: Srinivas Rao L <lsrao@codeaurora.org>
Decare war on uninterruptible sleep. Add a tracepoint which
walks the kernel stack and dumps the first non-scheduler function
called before the scheduler is invoked.
Change-Id: I19e965d5206329360a92cbfe2afcc8c30f65c229
Signed-off-by: Riley Andrews <riandrews@google.com>
include/trace/events/filemap.h: In function 'ftrace_raw_output_mm_filemap_find_page_cache_miss':
include/trace/ftrace.h:232:9: error: format '%lu' expects argument of type 'long unsigned int', but argument 5 has type 'size_t' [-Werror=format=]
Change-Id: Ic2d76f18fc8802cf1e2246f96d84a06d267a30ad
Signed-off-by: Jin Qian <jinqian@google.com>
This patch includes two trace events on generic_perform_write and
do_generic_file_read to check on the address_space mapping for the
pages to be accessed by the request.
Change-Id: Ib319b9b2c971b9e5c76645be6cfd995ef9465d77
Signed-off-by: Daniel Campello <campello@google.com>
Conflicts:
include/linux/pagemap.h
This patch introduces reserve_new_blocks to make preallocation of multi
blocks as in batch operation, so it can avoid lots of redundant
operation, result in better performance.
In virtual machine, with rotational device:
time fallocate -l 32G /mnt/f2fs/file
Before:
real 0m4.584s
user 0m0.000s
sys 0m4.580s
After:
real 0m0.292s
user 0m0.000s
sys 0m0.272s
In x86, with SSD:
time fallocate -l 500G $MNT/testfile
Before : 24.758 s
After : 1.604 s
Signed-off-by: Chao Yu <yuchao0@huawei.com>
[Jaegeuk Kim: fix bugs and add performance numbers measured in x86.]
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
f2fs support atomic write with following semantics:
1. open db file
2. ioctl start atomic write
3. (write db file) * n
4. ioctl commit atomic write
5. close db file
With this flow we can avoid file becoming corrupted when abnormal power
cut, because we hold data of transaction in referenced pages linked in
inmem_pages list of inode, but without setting them dirty, so these data
won't be persisted unless we commit them in step 4.
But we should still hold journal db file in memory by using volatile
write, because our semantics of 'atomic write support' is incomplete, in
step 4, we could fail to submit all dirty data of transaction, once
partial dirty data was committed in storage, then after a checkpoint &
abnormal power-cut, db file will be corrupted forever.
So this patch tries to improve atomic write flow by adding a revoking flow,
once inner error occurs in committing, this gives another chance to try to
revoke these partial submitted data of current transaction, it makes
committing operation more like aotmical one.
If we're not lucky, once revoking operation was failed, EAGAIN will be
reported to user for suggesting doing the recovery with held journal file,
or retrying current transaction again.
Signed-off-by: Chao Yu <chao2.yu@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
The last patch is:
commit beaa57dd986d4f398728c060692fc2452895cfd8
Author: Chao Yu <chao2.yu@samsung.com>
Date: Thu Oct 22 18:24:12 2015 +0800
f2fs: fix to skip shrinking extent nodes
In f2fs_shrink_extent_tree we should stop shrink flow if we have already
shrunk enough nodes in extent cache.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Provide userspace interface for tasks to be grouped together as
"related" threads. For example, all threads involved in updating
display buffer could be tagged as related.
Scheduler will attempt to provide special treatment for group of
related threads such as:
1) Colocation of related threads in same "preferred" cluster
2) Aggregation of demand towards determination of cluster frequency
This patch extends scheduler to provide best-effort colocation support
for a group of related threads.
Change-Id: Ic2cd769faf5da4d03a8f3cb0ada6224d0101a5f5
Signed-off-by: Srivatsa Vaddagiri <vatsa@codeaurora.org>
Signed-off-by: Syed Rameez Mustafa <rameezmustafa@codeaurora.org>
Signed-off-by: Srivatsa Vaddagiri <vatsa@codeaurora.org>
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
correct the time-stamp signature for logging in the format
of seconds.nanoseconds with all the digit.
Change-Id: I3c93c2c8daa546c4488096b2c2af939b93254b5c
Signed-off-by: Alok Chauhan <alokc@codeaurora.org>
Add trace events to the ad-hoc bus driver to log
Average BW (AB) that bus driver sends to RPM for
shared slaves.
Change-Id: I8fad0a3b3df6a6be5c659ca371f15fb27710b3f0
Signed-off-by: Alok Chauhan <alokc@codeaurora.org>
The msm_bus driver provides offers a means of managing performance
levels for the buses, fabrics and NoCs, which connect the peripherals
and processes within MSM chipsets.
This snapshot is taken to merge missing changes from msm-3.18 to msm-3.10.
Change-Id: If6fff441265716632ee2b8d666cbbdaf5974a34e
Signed-off-by: Alok Chauhan <alokc@codeaurora.org>
Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
clk_set_rate event involves a variable overhead due to a
number of additional operations needed (regulator set voltage
operations, etc). Since the overhead may differ based on a
number of factors, add a clk_set_rate event so as to enable
recording of clk_set_rate operation latency.
Change-Id: Ie5c0ab1929f32e08b04d2a255e631c95a68e49fc
Signed-off-by: Devesh Jhunjhunwala <deveshj@codeaurora.org>
cpuidle enter and exit ftrace events can mismatch if lpm driver falls
back after choosing a low power mode. Modify ftrace events to clearly
distinguish between cpu power select event and cpuidle enter event.
Change-Id: I81bc2b175264c6bdeec555b2b1271c0f40870b1b
Signed-off-by: Maulik Shah <mkshah@codeaurora.org>
Add trace events to capture mmc runtime suspend-resume latencies.
This would be useful to capture latencies for variety of MMC/SD cards
and decide on best possible runtime PM timeout.
Usage -
cd /sys/d/tracing
echo 1 > events/mmc/mmc_host_runtime_suspend/enable
echo 1 > events/mmc/mmc_host_runtime_resume/enable
Change-Id: Ia5dbb175c16f3e697d1239cb1faa5764ffeb5414
Signed-off-by: Konstantin Dorfman <kdorfman@codeaurora.org>
Add support for enter/exit cycle sysfs nodes for io detection
There are some usecases which may benefit from different enter/exit
cycle load criteria for IO load. This change adds support for
that.
Change-Id: Iff135ed11b92becc374ace4578e0efc212d2b731
Signed-off-by: Tapas Kumar Kundu <tkundu@codeaurora.org>
Add support for multi_enter_cycles/multi_exit_cycles per cluster
There are some usecases which may benefit from different enter/exit
cycle load criteria for multimode cpu load. This change adds support for
that.
Change-Id: I3408405307ca03b9bba3f03e216ef59b98f29832
Signed-off-by: Tapas Kumar Kundu <tkundu@codeaurora.org>
Certain governors may stop sending out notifications once CPUs enter
idle at min frequency.If governor's notifications stop then single mode
will not exit for long time. It can happen only if the exit conditions are
set in such a way that the time taken to exit single mode exceeds the time
for the governor to ramp down, idle out and hence stop sending
notifications leaving the system in single mode indefinitely.
This change adds seperate enter/exit cycle sysfs nodes along with a per
cluster non-deferrable timer for single mode exit. The timer is armed only
when the load starts falling below the exit load threshold and is
cancelled when either the load starts going up or SINGLE mode is exited
due to exceeding exit cycle count. On expiry the timer resets SINGLE mode
and the enter/exit cycle counts.
Change-Id: I02dd3fa8af39ca320e80da6391eb2b1ea635a433
Signed-off-by: Tapas Kumar Kundu <tkundu@codeaurora.org>
Reverting previous pm_qos changes since msm-3.10
will be supporting only 1 qos design for 8939 based
targets. There is no need to support multiple Qos
designs since there will be no target which needs
this.
Revert "mmc: sdhci-msm: add pm_qos trace-points"
This reverts commit 2ada209031.
Revert "mmc: sdhci-msm: support multiple pm_qos configurations"
This reverts commit a9070cf869.
Conflicts:
drivers/mmc/host/sdhci-msm.c
Change-Id: I84ce58f97632ae8006146d260ede9a1ef0f6428a
Signed-off-by: Ritesh Harjani <riteshh@codeaurora.org>
With this patch, anon pages of incative tasks can be reclaimed,
depending on memory pressure. Memory pressure is detected
using vmpressure events. 'N' best tasks in terms of anon
size is selected and pages proportional to their tasksize
is reclaimed. The total number of pages reclaimed at each
run of the swap work, can be tuned from userspace, the
default being SWAP_CLUSTER_MAX * 32.
The patch also adds tracepoints to debug and tune the
feature.
echo 1 > /sys/module/process_reclaim/parameters/enable_process_reclaim
to enable the feature.
echo <pages> > /sys/module/process_reclaim/parameters/per_swap_size,
to set the number of pages reclaimed in each scan.
/sys/module/process_reclaim/parameters/reclaim_avg_efficiency, provides
the average efficiency (scan to reclaim ratio) of the algorithm.
/sys/module/process_reclaim/parameters/swap_eff_win, to set the window
period (in unit of number of times reclaim is triggered) to detect
low efficiency runs.
/sys/module/process_reclaim/parameters/swap_opt_eff, to set the optimal
efficiency threshold for low efficiency detection.
Change-Id: I895986f10c997d1715761eaaadc4bbbee60db9d2
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
Add ftrace events when battery parameter change
is notified, when mitigation is initiated and
cleared.
CRs-Fixed: 760435
Change-Id: I901d8e737f9ba2150ef7c2a9c19bbcf79e93c0e6
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
Add ftrace events to bcl driver events. Events are
added in the places where the registers are read/write,
when interrupts are triggered and bcl state changes.
CRs-Fixed: 760435
Change-Id: I53985292a3bccb9a2e33f144528c56f4d659205a
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
The following three trace events:
ufshcd_clk_gating, ufshcd_hibern8_on_idle and ufshcd_auto_bkops_state
share the same arguments and meaning - logging some state change
in the UFS driver.
Defining those as template instances takes up less memory compared
to be defined as separate trace events.
Change-Id: I92c2bf3eada6f876b8c9e8a7bfc4568c7886548f
Signed-off-by: Gilad Broner <gbroner@codeaurora.org>
There were issues reported, where page cache thrashing was
observed because of LMK not killing tasks when required,
resulting in sluggishness and higher app launch latency.
LMK does not kill a task for the following reasons.
1. The free and file pages are above the LMK thresholds
2. LMK tries to pick task with an adj level corresponding
to current thresholds, but fails to do so because of the
absence of tasks in that level.
But sometimes it is better to kill a lower adj task, than thrashing.
And there are cases where the number of file pages are huge, though
we dont thrash, the reclaim process becomes time consuming, since
LMK triggers will be delayed because of higher number of file
pages. Even in such cases, when reclaim path finds it difficult
to reclaim pages, it is better to trigger lmk to free up some memory
faster.
The basic idea here is to make LMK more aggressive dynamically
when such a thrashing scenario is detected.
To detect thrashing, this patch uses vmpressure events.
The values of vmpressure upon which an action has to be taken,
was derived empirically.
This patch also adds tracepoints to validate this feature,
almk_shrink and almk_vmpressure.
Two knobs are available for the user to tune adaptive lmk
behaviour.
/sys/module/lowmemorykiller/parameters/adaptive_lmk - Write
1 to enable the feature, 0 to disable. By default disabled.
/sys/module/lowmemorykiller/parameters/vmpressure_file_min -
This parameter controls the behaviour of LMK when vmpressure
is in the range of 90-94. Adaptive lmk triggers based on number file
pages wrt vmpressure_file_min, when vmpressure is in the range of
90-94. Usually this is a pseudo minfree value, higher than the
highest configured value in minfree array.
Change-Id: I1a08160c35d3e33bdfd1d2c789c288fc07d0f0d3
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
There are too many bus events that stomp on other events
and make it difficult to live debug of use cases.
With this revert those additional bus events are removed.
This reverts commit 757a1fd684.
Change-Id: I835fe2e9d3d4a704630c54180334c239cded1804
Signed-off-by: Alok Chauhan <alokc@codeaurora.org>
Add trace-points for tracking pm_qos voting.
This assists in following the voting for debugging
performance related issues.
Change-Id: I5a9e886c739252043e9f28f100e0493436a0eb75
Signed-off-by: Dov Levenglick <dovl@codeaurora.org>
Extend sched_get_nr_running_avg() API to return average nr_big_tasks,
in addition to average nr_running and average nr_io_wait tasks. Also
add a new trace point to record values returned by
sched_get_nr_running_avg() API.
Change-Id: Id3591e6d04da8db484b4d1cb9d95dba075f5ab9a
Signed-off-by: Srivatsa Vaddagiri <vatsa@codeaurora.org>
Add ftrace events to track latency, sleep time and next event time
when core enter low power modes.
Change-Id: I83a11d75d8144d866ef8da2a58af02a3b8067ed3
Signed-off-by: Mahesh Sivasubramanian <msivasub@codeaurora.org>
Signed-off-by: Anil Kumar Mamidala <amami@codeaurora.org>