Read IO's latency as well as filemap fault could affect system
performance so this patch keeps track it on.
Mot-CRs-fixed: (CR)
Bug:
80168800
Change-Id: I761b7110339cf1e5ef24530ad32aedd784d00d07
Signed-off-by: Minchan Kim <minchan@google.com>
Signed-off-by: Cho KyongHo <pullip.cho@samsung.com>
Reviewed-on: https://gerrit.mot.com/
1453725
Tested-by: Jira Key
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
enum mm_event_type {
MM_MIN_FAULT = 0,
MM_MAJ_FAULT,
+ MM_READ_IO,
MM_COMPACTION,
MM_RECLAIM,
MM_SWP_FAULT,
__print_symbolic(type, \
{ MM_MIN_FAULT, "min_flt" }, \
{ MM_MAJ_FAULT, "maj_flt" }, \
+ { MM_READ_IO, "read_io" }, \
{ MM_COMPACTION, "compaction" }, \
{ MM_RECLAIM, "reclaim" }, \
{ MM_SWP_FAULT, "swp_flt" }, \
pgoff_t end_index;
loff_t isize;
unsigned long nr, ret;
+ ktime_t event_ts;
+ event_ts = 0;
cond_resched();
find_page:
if (fatal_signal_pending(current)) {
if (!page) {
if (iocb->ki_flags & IOCB_NOWAIT)
goto would_block;
+ mm_event_start(&event_ts);
page_cache_sync_readahead(mapping,
ra, filp,
index, last_index - index);
unlock_page(page);
}
page_ok:
+ if (event_ts != 0)
+ mm_event_end(MM_READ_IO, event_ts);
/*
* i_size must be checked after we know the page is Uptodate.
*