History log of /freebsd/sys/kern/kern_cpu.c (Results 51 – 75 of 117)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 7e857dd1 12-Jun-2009 Oleksandr Tymoshenko <gonzo@FreeBSD.org>

- Merge from HEAD


# f436f175 31-May-2009 Nathan Whitehorn <nwhitehorn@FreeBSD.org>

Provide a new CPU device driver ivar to report the nominal speed of the
CPU, if available. This is meant to solve the issue of cpufreq misreporting
speeds on CPUs that boot in a reduced power mode an

Provide a new CPU device driver ivar to report the nominal speed of the
CPU, if available. This is meant to solve the issue of cpufreq misreporting
speeds on CPUs that boot in a reduced power mode and have only relative
speed control.

show more ...


Revision tags: release/7.2.0_cvs, release/7.2.0, release/7.1.0_cvs, release/7.1.0
# 41fe50f5 20-Dec-2008 Sam Leffler <sam@FreeBSD.org>

MFH @ 186335


# d288bcc4 16-Dec-2008 Alexander Motin <mav@FreeBSD.org>

If possible, try to obtain max_mhz on cpufreq attach instead of first request.

On HyperThreading CPUs logical cores have same frequency, so setting it
on any core will change the other's one. In mos

If possible, try to obtain max_mhz on cpufreq attach instead of first request.

On HyperThreading CPUs logical cores have same frequency, so setting it
on any core will change the other's one. In most cases first request
to the second core will be the "set" request, done after setting frequency
of the first core. In such case second CPU will obtain throttled frequency
of the first core as it's max_mhz making cpufreq broken due to different
frequency sets.

show more ...


Revision tags: release/6.4.0_cvs, release/6.4.0
# be00f605 05-May-2008 John Baldwin <jhb@FreeBSD.org>

Fix a few edge cases with error handling in cpufreq(4)'s CPUFREQ_GET()
method:
- If the last of the child cpufreq drivers returns an error while trying to
fetch its list of supported frequencies bu

Fix a few edge cases with error handling in cpufreq(4)'s CPUFREQ_GET()
method:
- If the last of the child cpufreq drivers returns an error while trying to
fetch its list of supported frequencies but an earlier driver found the
requested frequency, don't return an error to the caller.
- If all of the child cpufreq drivers fail and the attempt to match the
frequency based on 'cpu_est_clockrate()' fails, return ENXIO rather than
returning success and returning a frequency of CPUFREQ_VAL_UNKNOWN.

MFC after: 3 days
PR: kern/121433
Reported by: Eugene Grosbein eugen ! kuzbass dot ru

show more ...


Revision tags: release/7.0.0_cvs, release/7.0.0
# e1f13773 16-Jan-2008 Nate Lawson <njl@FreeBSD.org>

Remove duplicate cpufreq levels, i.e. ones that are within 25 Mhz of each
other. The first one survives, the rest are removed. So far, it appears
only some acpi_perf(4) BIOS tables have these inval

Remove duplicate cpufreq levels, i.e. ones that are within 25 Mhz of each
other. The first one survives, the rest are removed. So far, it appears
only some acpi_perf(4) BIOS tables have these invalid states, but address
this in the core to be sure to handle other potential driver data.

PR: kern/114722
Tested by: stefan.lambrev / moneybookers.com
MFC after: 3 days

show more ...


Revision tags: release/6.3.0_cvs, release/6.3.0
# a15e947d 30-Oct-2007 Nate Lawson <njl@FreeBSD.org>

If we're on an SMP kernel and there is more than 1 CPU, reject any attempts
to change the freq before the other CPUs are active. The current code
always attempts to change all CPUs to match each oth

If we're on an SMP kernel and there is more than 1 CPU, reject any attempts
to change the freq before the other CPUs are active. The current code
always attempts to change all CPUs to match each other, and the requisite
sched_bind() call won't work before APs are launched.

show more ...


# 62db376a 20-Aug-2007 Nate Lawson <njl@FreeBSD.org>

Always call sched_bind(), even if on the CPU in question. It is wrong to
check if we're already on that cpu and skip the bind since the thread could
be migrated off in the meantime.

Suggested by: j

Always call sched_bind(), even if on the CPU in question. It is wrong to
check if we're already on that cpu and skip the bind since the thread could
be migrated off in the meantime.

Suggested by: jeff
Approved by: re

show more ...


# 2145b9d2 19-Aug-2007 Nate Lawson <njl@FreeBSD.org>

Use a different loop variable for the inner loop. This previous reuse could
have caused a hang, but we got lucky with the available multi-CPU states
on actual hardware.

Submitted by: Bjorn Koenig <

Use a different loop variable for the inner loop. This previous reuse could
have caused a hang, but we got lucky with the available multi-CPU states
on actual hardware.

Submitted by: Bjorn Koenig <bkoenig / alpha-tierchen.de>
Approved by: re
MFC after: 3 days

show more ...


# 982d11f8 05-Jun-2007 Jeff Roberson <jeff@FreeBSD.org>

Commit 14/14 of sched_lock decomposition.
- Use thread_lock() rather than sched_lock for per-thread scheduling
sychronization.
- Use the per-process spinlock rather than the sched_lock for per-p

Commit 14/14 of sched_lock decomposition.
- Use thread_lock() rather than sched_lock for per-thread scheduling
sychronization.
- Use the per-process spinlock rather than the sched_lock for per-process
scheduling synchronization.

Tested by: kris, current@
Tested on: i386, amd64, ULE, 4BSD, libthr, libkse, PREEMPTION, etc.
Discussed with: kris, attilio, kmacy, jhb, julian, bde (small parts each)

show more ...


# 0d4ac62a 26-Mar-2007 Nate Lawson <njl@FreeBSD.org>

Add an interface for drivers to be notified of changes to CPU frequency.
cpufreq_pre_change is called before the change, giving each driver a chance
to revoke the change. cpufreq_post_change provide

Add an interface for drivers to be notified of changes to CPU frequency.
cpufreq_pre_change is called before the change, giving each driver a chance
to revoke the change. cpufreq_post_change provides the results of the
change (success or failure). cpufreq_levels_changed gives the unit number
of the cpufreq device whose number of available levels has changed. Hook
in all the drivers I could find that needed it.

* TSC: update TSC frequency value. When the available levels change, take the
highest possible level and notify the timecounter set_cputicker() of that
freq. This gets rid of the "calcru: runtime went backwards" messages.
* identcpu: updates the sysctl hw.clockrate value
* Profiling: if profiling is active when the clock changes, let the user
know the results may be inaccurate.

Reviewed by: bde, phk
MFC after: 1 month

show more ...


Revision tags: release/6.2.0_cvs, release/6.2.0, release/5.5.0_cvs, release/5.5.0, release/6.1.0_cvs, release/6.1.0
# b4130b8a 03-Mar-2006 Marcus Alves Grando <mnag@FreeBSD.org>

- Print message about cpufreq and timecounter TSC

Approved by: njl
MFC after: 1 day


Revision tags: release/6.0.0_cvs, release/6.0.0
# 56e5a87a 03-Oct-2005 Hajimu UMEMOTO <ume@FreeBSD.org>

make saved cpu level stackable.


# 9000b91e 02-Sep-2005 Nate Lawson <njl@FreeBSD.org>

Break out the checks for duplicates and absolute settings being too high
instead of trying to do them all at once. This should fix the level sorting
problems from the previous revision.

Testing hel

Break out the checks for duplicates and absolute settings being too high
instead of trying to do them all at once. This should fix the level sorting
problems from the previous revision.

Testing help: ume

show more ...


# 5308b2a6 30-Aug-2005 Nate Lawson <njl@FreeBSD.org>

Eliminate cpufreq levels for two cases that are less than optimal:

1. Walk the absolute list in reverse to prefer duplicated levels that have
a lower absolute setting, i.e. 800 Mhz/50% is better tha

Eliminate cpufreq levels for two cases that are less than optimal:

1. Walk the absolute list in reverse to prefer duplicated levels that have
a lower absolute setting, i.e. 800 Mhz/50% is better than 1600 Mhz/25% even
though both have the same actual frequency. This also removes the need to
check for already-modified levels since by definition, those will be added
later in the sorted list.

2. Compare the absolute settings for derived levels and don't use the new
level if it's higher. For example, a level of 800 Mhz/75% is preferable to
1600 Mhz/25% even though the latter has a lower total frequency.

This work is based on a patch from the submitter but reworked by myself.

Submitted by: Tijl Coosemans (tijl/ulyssis.org)

show more ...


# 1fea6ce7 18-Aug-2005 Hajimu UMEMOTO <ume@FreeBSD.org>

- don't forget to save freqency when priority is raised.
- nuke redundant variable initialization.


# 5f363934 18-Aug-2005 Hajimu UMEMOTO <ume@FreeBSD.org>

don't forget to update curr_priority. even when frequency is
not changed, priority may be changed.


# 961f7f91 16-Aug-2005 Hajimu UMEMOTO <ume@FreeBSD.org>

Save cpu level only when priority is greater than PRIO_USER
to make CPUFREQ_SET(NULL, prio) work.
TODO: implement saved_level as stack.

Reviewed by: njl


# da8a77c1 11-Aug-2005 Nate Lawson <njl@FreeBSD.org>

The "lowest" sysctl setting makes more sense as the lowest one to use, so
discard all levels less than this setting, not less than/equal to.

MFC after: 1 day


Revision tags: release/5.4.0_cvs, release/5.4.0
# 8d913481 10-Apr-2005 Nate Lawson <njl@FreeBSD.org>

Add debugging prints to all the methods in case there are problems with
managing levels. This can be enabled with the debug.cpufreq.verbose
tunable and sysctl.


# 71ab130c 31-Mar-2005 Nate Lawson <njl@FreeBSD.org>

Add a check for cpufreq_unregister() being called with no cpufreq device
active. Note that the logic indicates this should not be possible so
generate a warning if this ever happens.

Found by: Cove

Add a check for cpufreq_unregister() being called with no cpufreq device
active. Note that the logic indicates this should not be possible so
generate a warning if this ever happens.

Found by: Coverity Prevent (via sam)

show more ...


# 789f03ce 27-Feb-2005 Nate Lawson <njl@FreeBSD.org>

Add locking to handle multiple threads getting/setting frequencies at the
same time. We use an sx lock and serialize the cpufreq device's
get/set/levels methods.


# b070969b 26-Feb-2005 Nate Lawson <njl@FreeBSD.org>

Allow users to reject levels below a given frequency (in MHz) via the
debug.cpufreq.lowest tunable and sysctl. Some systems seem to have problems
with the lowest frequencies so setting this prevents

Allow users to reject levels below a given frequency (in MHz) via the
debug.cpufreq.lowest tunable and sysctl. Some systems seem to have problems
with the lowest frequencies so setting this prevents them from being
available or used.

show more ...


# d269386a 24-Feb-2005 Nate Lawson <njl@FreeBSD.org>

Bump the maximum number of levels to 64 and add warning messages about
what to do to fix reduced functionality if the number of levels is too low.


# e959a70b 20-Feb-2005 Nate Lawson <njl@FreeBSD.org>

Add the "freq_settings" sysctl to each device that registers with cpufreq
so their individual settings can be seen separately for debugging.


12345