History log of /freebsd/sys/kern/kern_cpu.c (Results 76 – 100 of 117)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# e94a0c1a 18-Feb-2005 Nate Lawson <njl@FreeBSD.org>

Introduce a new method, cpufreq_drv_type(), that returns the type of the
driver. This used to be handled by cpufreq_drv_settings() but it's
useful to get the type/flags separately from getting the s

Introduce a new method, cpufreq_drv_type(), that returns the type of the
driver. This used to be handled by cpufreq_drv_settings() but it's
useful to get the type/flags separately from getting the settings.
(For example, you don't have to pass an array of cf_setting just to find
the driver type.)

Use this new method in our in-tree drivers to detect reliably if acpi_perf
is present and owns the hardware. This simplifies logic in drivers as well
as fixing a bug introduced in my last commit where too many drivers attached.

show more ...


# 67c8649f 15-Feb-2005 Nate Lawson <njl@FreeBSD.org>

When dealing with systems with no absolute drivers attached, only calibrate
the rate for the 100% state once. Afterwards, use that value for deriving
states. This should fix the problem where the c

When dealing with systems with no absolute drivers attached, only calibrate
the rate for the 100% state once. Afterwards, use that value for deriving
states. This should fix the problem where the calibrated frequency was
different once a switch was done, giving a different set of levels each
time. Also, properly search for the right cpufreqX device when detaching.

show more ...


# 1196826a 15-Feb-2005 Nate Lawson <njl@FreeBSD.org>

Bind to the driver's parent cpu before switching, for both absolute and
relative drivers. Remove some extraneous KASSERTs since NULL pointers
will be found when they're used right afterwards.


# 5f0afa04 14-Feb-2005 Nate Lawson <njl@FreeBSD.org>

Implement priorities. This allows a driver (say, for cooling purposes) to
override the current freq level temporarily and restore it when the
higher priority condition is past. Note that only the f

Implement priorities. This allows a driver (say, for cooling purposes) to
override the current freq level temporarily and restore it when the
higher priority condition is past. Note that only the first overridden
value is saved. Callers pass NULL to CPUFREQ_SET to restore the saved
level. Priorities are not yet used so this commit should have no effect.

show more ...


# e22cd41c 13-Feb-2005 Nate Lawson <njl@FreeBSD.org>

Add support for the CPUFREQ_FLAG_INFO_ONLY flag. Devices that report this
are not added to the list(s) of available settings. However, other drivers
can call the CPUFREQ_DRV_SETTINGS() method on th

Add support for the CPUFREQ_FLAG_INFO_ONLY flag. Devices that report this
are not added to the list(s) of available settings. However, other drivers
can call the CPUFREQ_DRV_SETTINGS() method on those devices directly to
get info about available settings.

Update the acpi_perf(4) driver to use this flag in the presence of
"functional fixed hardware." Thus, future drivers like Powernow can
query acpi_perf for platform info but perform frequency transitions
themselves.

show more ...


# 0325089d 13-Feb-2005 Nate Lawson <njl@FreeBSD.org>

Set levels on all CPUs and attach a cpufreq device to each one. Sysctl
on dev.cpu.0 will affect all of the CPUs together. In the future,
independent control will be supported but this is good enoug

Set levels on all CPUs and attach a cpufreq device to each one. Sysctl
on dev.cpu.0 will affect all of the CPUs together. In the future,
independent control will be supported but this is good enough for now.
Check that the timecounter isn't TSC before switching (from Colin Percival.)

show more ...


# 88c9b54c 06-Feb-2005 Nate Lawson <njl@FreeBSD.org>

Add support for relative cpufreq drivers. Such drivers modulate clock
frequency as a percentage of the base rate and do not change the base
rate directly. The cpufreq framework combines these with

Add support for relative cpufreq drivers. Such drivers modulate clock
frequency as a percentage of the base rate and do not change the base
rate directly. The cpufreq framework combines these with absolute drivers
to produce synthesized levels made of one or more settings.

show more ...


# 73347b07 04-Feb-2005 Nate Lawson <njl@FreeBSD.org>

Add the cpufreq framework. This code manages multiple drivers and presents
a unified kernel and user interface for controlling cpu frequencies.


# 30215f48 08-Jan-2010 Christian Brueffer <brueffer@FreeBSD.org>

Free allocated sbufs before returning ENOMEM.

PR: 128335
Submitted by: Mateusz Guzik <mjguzik@gmail.com>
MFC after: 2 week


# 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.


12345