Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
06393d0f
Commit
06393d0f
authored
May 11, 2004
by
Dave Jones
Committed by
Dave Jones
May 11, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[CPUFREQ] Avoid scheduling cpufreq_delayed_get_work() twice; but do call it a bit earlier.
parent
b4ffaea1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
arch/i386/kernel/timers/timer_tsc.c
arch/i386/kernel/timers/timer_tsc.c
+7
-2
No files found.
arch/i386/kernel/timers/timer_tsc.c
View file @
06393d0f
...
@@ -244,7 +244,7 @@ static void mark_offset_tsc(void)
...
@@ -244,7 +244,7 @@ static void mark_offset_tsc(void)
clock_fallback
();
clock_fallback
();
}
}
/* ... but give the TSC a fair chance */
/* ... but give the TSC a fair chance */
if
(
lost_count
==
50
)
if
(
lost_count
>
25
)
cpufreq_delayed_get
();
cpufreq_delayed_get
();
}
else
}
else
lost_count
=
0
;
lost_count
=
0
;
...
@@ -331,6 +331,7 @@ static void mark_offset_tsc_hpet(void)
...
@@ -331,6 +331,7 @@ static void mark_offset_tsc_hpet(void)
#ifdef CONFIG_CPU_FREQ
#ifdef CONFIG_CPU_FREQ
#include <linux/workqueue.h>
#include <linux/workqueue.h>
static
unsigned
int
cpufreq_delayed_issched
=
0
;
static
unsigned
int
cpufreq_init
=
0
;
static
unsigned
int
cpufreq_init
=
0
;
static
struct
work_struct
cpufreq_delayed_get_work
;
static
struct
work_struct
cpufreq_delayed_get_work
;
...
@@ -340,6 +341,7 @@ static void handle_cpufreq_delayed_get(void *v)
...
@@ -340,6 +341,7 @@ static void handle_cpufreq_delayed_get(void *v)
for_each_online_cpu
(
cpu
)
{
for_each_online_cpu
(
cpu
)
{
cpufreq_get
(
cpu
);
cpufreq_get
(
cpu
);
}
}
cpufreq_delayed_issched
=
0
;
}
}
/* if we notice lost ticks, schedule a call to cpufreq_get() as it tries
/* if we notice lost ticks, schedule a call to cpufreq_get() as it tries
...
@@ -348,8 +350,11 @@ static void handle_cpufreq_delayed_get(void *v)
...
@@ -348,8 +350,11 @@ static void handle_cpufreq_delayed_get(void *v)
*/
*/
static
inline
void
cpufreq_delayed_get
(
void
)
static
inline
void
cpufreq_delayed_get
(
void
)
{
{
if
(
cpufreq_init
)
if
(
cpufreq_init
&&
!
cpufreq_delayed_issched
)
{
cpufreq_delayed_issched
=
1
;
printk
(
KERN_DEBUG
"Losing some ticks... checking if CPU frequency changed.
\n
"
);
schedule_work
(
&
cpufreq_delayed_get_work
);
schedule_work
(
&
cpufreq_delayed_get_work
);
}
}
}
/* If the CPU frequency is scaled, TSC-based delays will need a different
/* If the CPU frequency is scaled, TSC-based delays will need a different
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment