History

tick/sched: Remove nohz disabled special case in cputime fetch

Even when nohz is not runtime enabled, the dynticks idle cputime accounting can run and the common idle cputime accessors are still relevant. Remove the nohz disabled special case accordingly.

Frederic Weisbecker committed 6 months ago

Commit bd0c77c1 parent cf6444c1 file · +2 −5Browse files

Showing the changes to kernel (1 of 1 file). Show all

Unified · Split

kernel/time/tick-sched.c+2−5
@@ -795,9 +795,6 @@ static u64 get_cpu_sleep_time_us(int cpu, enum cpu_usage_stat idx, · 794 unmodified lines
795795 ktime_t now, idle;
796796 unsigned int seq;
797797
798− if (!tick_nohz_active)
799− return -1;
800−
801798 now = ktime_get();
802799 if (last_update_time)
803800 *last_update_time = ktime_to_us(now);
@@ -839,7 +836,7 @@ static u64 get_cpu_sleep_time_us(int cpu, enum cpu_usage_stat idx, · 35 unmodified lines
839836 * This time is measured via accounting rather than sampling,
840837 * and is as accurate as ktime_get() is.
841838 *
842− * Return: -1 if NOHZ is not enabled, else total idle time of the @cpu
839+ * Return: -1 if generic vtime is enabled, else total idle time of the @cpu
843840 */
844841 u64 get_cpu_idle_time_us(int cpu, u64 *last_update_time)
845842 {
@@ -863,7 +860,7 @@ EXPORT_SYMBOL_GPL(get_cpu_idle_time_us); · 17 unmodified lines
863860 * This time is measured via accounting rather than sampling,
864861 * and is as accurate as ktime_get() is.
865862 *
866− * Return: -1 if NOHZ is not enabled, else total iowait time of @cpu
863+ * Return: -1 if generic vtime is enabled, else total iowait time of @cpu
867864 */
868865 u64 get_cpu_iowait_time_us(int cpu, u64 *last_update_time)
869866 {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t