mirror of
https://github.com/torvalds/linux.git
synced 2026-07-30 19:21:28 +02:00
soc: qcom: mem-offline: store mem-offline stats in usec
Store mem-offline stats in usec instead of msec for greater precision. Change-Id: I9c3d3dd22b5154548c26681fa03d9a6401295a91 Signed-off-by: Pratyush Brahma <quic_pbrahma@quicinc.com>
This commit is contained in:
parent
fd4ba1796e
commit
2f5247b0ce
|
|
@ -521,7 +521,7 @@ static int mem_event_callback(struct notifier_block *self,
|
|||
|
||||
break;
|
||||
case MEM_ONLINE:
|
||||
delay = ktime_ms_delta(ktime_get(), cur);
|
||||
delay = ktime_us_delta(ktime_get(), cur);
|
||||
record_stat(sec_nr, delay, MEMORY_ONLINE);
|
||||
cur = 0;
|
||||
set_memblk_bitmap_online(start_addr);
|
||||
|
|
@ -546,7 +546,7 @@ static int mem_event_callback(struct notifier_block *self,
|
|||
* help since this is the last stage of memory hotplug.
|
||||
*/
|
||||
|
||||
delay = ktime_ms_delta(ktime_get(), cur);
|
||||
delay = ktime_us_delta(ktime_get(), cur);
|
||||
record_stat(sec_nr, delay, MEMORY_OFFLINE);
|
||||
cur = 0;
|
||||
set_memblk_bitmap_offline(start_addr);
|
||||
|
|
@ -788,7 +788,7 @@ static unsigned int print_blk_residency_times(char *buf, size_t sz,
|
|||
delta = ktime_add(delta,
|
||||
mem_info[i + mode * idx].resident_time);
|
||||
c += scnprintf(buf + c, sz - c, "%lus\t\t",
|
||||
ktime_to_ms(delta) / MSEC_PER_SEC);
|
||||
ktime_to_us(delta) / USEC_PER_SEC);
|
||||
total_time[i + mode * idx] = delta;
|
||||
}
|
||||
return c;
|
||||
|
|
@ -824,26 +824,26 @@ static ssize_t show_mem_stats(struct kobject *kobj,
|
|||
c += scnprintf(buf + c, sz - c,
|
||||
"\tLast recd time:\t");
|
||||
for (i = 0; i <= tot_blks; i++)
|
||||
c += scnprintf(buf + c, sz - c, "%lums\t\t",
|
||||
c += scnprintf(buf + c, sz - c, "%luus\t\t",
|
||||
mem_info[i + j * idx].last_recorded_time);
|
||||
c += scnprintf(buf + c, sz - c, "\n");
|
||||
c += scnprintf(buf + c, sz - c,
|
||||
"\tAvg time:\t");
|
||||
for (i = 0; i <= tot_blks; i++)
|
||||
c += scnprintf(buf + c, sz - c,
|
||||
"%lums\t\t", mem_info[i + j * idx].avg_time);
|
||||
"%luus\t\t", mem_info[i + j * idx].avg_time);
|
||||
c += scnprintf(buf + c, sz - c, "\n");
|
||||
c += scnprintf(buf + c, sz - c,
|
||||
"\tBest time:\t");
|
||||
for (i = 0; i <= tot_blks; i++)
|
||||
c += scnprintf(buf + c, sz - c,
|
||||
"%lums\t\t", mem_info[i + j * idx].best_time);
|
||||
"%luus\t\t", mem_info[i + j * idx].best_time);
|
||||
c += scnprintf(buf + c, sz - c, "\n");
|
||||
c += scnprintf(buf + c, sz - c,
|
||||
"\tWorst time:\t");
|
||||
for (i = 0; i <= tot_blks; i++)
|
||||
c += scnprintf(buf + c, sz - c,
|
||||
"%lums\t\t", mem_info[i + j * idx].worst_time);
|
||||
"%luus\t\t", mem_info[i + j * idx].worst_time);
|
||||
c += scnprintf(buf + c, sz - c, "\n");
|
||||
c += scnprintf(buf + c, sz - c,
|
||||
"\tSuccess count:\t");
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user