Revision tags: release/14.0.0 |
|
#
95ee2897 |
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Remove $FreeBSD$: two-line .h pattern
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
|
#
9fb6718d |
| 25-Apr-2023 |
Mark Johnston <markj@FreeBSD.org> |
smp: Dynamically allocate the stoppcbs array
This avoids bloating the kernel image when MAXCPU is large.
A follow-up patch for kgdb and other kernel debuggers is needed since the stoppcbs symbol is
smp: Dynamically allocate the stoppcbs array
This avoids bloating the kernel image when MAXCPU is large.
A follow-up patch for kgdb and other kernel debuggers is needed since the stoppcbs symbol is now a pointer. Bump __FreeBSD_version so that debuggers can use osreldate to figure out how to handle stoppcbs.
PR: 269572 MFC after: never Reviewed by: mjg, emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39806
show more ...
|
Revision tags: release/13.2.0, release/12.4.0, release/13.1.0 |
|
#
d28d74de |
| 14-Dec-2021 |
sebastien.bini <sebastien.bini@stormshield.eu> |
smp.h: make sign conversion explicit
When comparing singed with unsigned the signed value is casted to unsigned. Make this explicit as it might lead to compilation warnings otherwise.
Obtained from
smp.h: make sign conversion explicit
When comparing singed with unsigned the signed value is casted to unsigned. Make this explicit as it might lead to compilation warnings otherwise.
Obtained from: Stormshield
show more ...
|
Revision tags: release/12.3.0 |
|
#
ef50d5fb |
| 23-Sep-2021 |
Alexander Motin <mav@FreeBSD.org> |
x86: Add NUMA nodes into CPU topology.
Depending on hardware, NUMA nodes may match last level caches, or they may be above them (AMD Zen 2/3) or below (Intel Xeon w/ SNC). This information is provid
x86: Add NUMA nodes into CPU topology.
Depending on hardware, NUMA nodes may match last level caches, or they may be above them (AMD Zen 2/3) or below (Intel Xeon w/ SNC). This information is provided by ACPI instead of CPUID, and it is provided for each CPU individually instead of mask widths, but this code should be able to properly handle all the above cases.
This change should immediately allow idle stealing in sched_ule(4) to prefer load from NUMA-local CPUs to remote ones when the node does not match LLC. Later we may think of how to better handle it on sched_pickcpu() side.
MFC after: 1 month
show more ...
|
#
aefe0a8c |
| 29-Jul-2021 |
Alexander Motin <mav@FreeBSD.org> |
Refactor/optimize cpu_search_*().
Remove cpu_search_both(), unused for many years. Without it there is less sense for the trick of compiling common cpu_search() into separate cpu_search_lowest() an
Refactor/optimize cpu_search_*().
Remove cpu_search_both(), unused for many years. Without it there is less sense for the trick of compiling common cpu_search() into separate cpu_search_lowest() and cpu_search_highest(), so split them completely, making code more readable. While there, split iteration over children groups and CPUs, complicating code for very small deduplication.
Stop passing cpuset_t arguments by value and avoid some manipulations. Since MAXCPU bump from 64 to 256, what was a single register turned into 32-byte memory array, requiring memory allocation and accesses. Splitting struct cpu_search into parameter and result parts allows to even more reduce stack usage, since the first can be passed through on recursion.
Remove CPU_FFS() from the hot paths, precalculating first and last CPU for each CPU group in advance during initialization. Again, it was not a problem for 64 CPUs before, but for 256 FFS needs much more code.
With these changes on 80-thread system doing ~260K uncached ZFS reads per second I observe ~30% reduction of time spent in cpu_search_*().
MFC after: 1 month
show more ...
|
Revision tags: release/13.0.0, release/12.2.0 |
|
#
de6fc2e3 |
| 15-Aug-2020 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r364082 through r364250.
|
#
440cec3f |
| 12-Aug-2020 |
Glen Barber <gjb@FreeBSD.org> |
MFH
Sponsored by: Rubicon Communications, LLC (netgate.com)
|
#
6eecc07f |
| 11-Aug-2020 |
Conrad Meyer <cem@FreeBSD.org> |
smp.h: Reconcile definition and declaration of smp_ncpus
The variable is defined unconditionally; declare it unconditionally as well.
It is already initialized to the correct value (1) for !SMP bui
smp.h: Reconcile definition and declaration of smp_ncpus
The variable is defined unconditionally; declare it unconditionally as well.
It is already initialized to the correct value (1) for !SMP builds.
No functional change.
show more ...
|
Revision tags: release/11.4.0 |
|
#
44e86fbd |
| 13-Feb-2020 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r357662 through r357854.
|
#
e4f58497 |
| 12-Feb-2020 |
Mateusz Guzik <mjg@FreeBSD.org> |
Add smp_rendezvous_cpus_retry
This is a wrapper around smp_rendezvous_cpus which enables use of IPI handlers which can fail and require retrying.
wait_func argument is added to to provide a routine
Add smp_rendezvous_cpus_retry
This is a wrapper around smp_rendezvous_cpus which enables use of IPI handlers which can fail and require retrying.
wait_func argument is added to to provide a routine which can be used to poll CPU of interest for when the IPI can be retried.
Handlers which succeed must call smp_rendezvous_cpus_done to denote that fact.
Discussed with: jeff Differential Revision: https://reviews.freebsd.org/D23582
show more ...
|
#
5032fe17 |
| 30-Nov-2019 |
Mateusz Guzik <mjg@FreeBSD.org> |
Add a way to inject fences using IPIs
A variant of this facility was already used by rmlocks where IPIs would enforce ordering.
This allows to elide fences where they are rarely needed and the cost
Add a way to inject fences using IPIs
A variant of this facility was already used by rmlocks where IPIs would enforce ordering.
This allows to elide fences where they are rarely needed and the cost of IPI (should it be necessary) is cheaper.
Reviewed by: kib, jeff (previous version) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D21740
show more ...
|
Revision tags: release/12.1.0, release/11.3.0 |
|
#
6b83069e |
| 04-Jan-2019 |
Conrad Meyer <cem@FreeBSD.org> |
Expose threads-per-core and physical core count information
With new sysctls (to the best of our ability do detect them). Restructured smp.4 slightly for clarity (keep relevant stuff closer to the
Expose threads-per-core and physical core count information
With new sysctls (to the best of our ability do detect them). Restructured smp.4 slightly for clarity (keep relevant stuff closer to the top) while documenting.
Reviewed by: markj, jhibbits (ppc parts) MFC after: 3 days Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D18322
show more ...
|
Revision tags: release/12.0.0, release/11.2.0 |
|
#
54b4b13c |
| 24-Dec-2017 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r326936 through r327149.
|
#
da9fba54 |
| 21-Dec-2017 |
Bruce Evans <bde@FreeBSD.org> |
Use resume_cpus() instead of restart_cpus() to resume from ACPI suspension. restart_cpus() worked well enough by accident. Before this set of fixes, resume_cpus() used the same cpuset (started_cpus,
Use resume_cpus() instead of restart_cpus() to resume from ACPI suspension. restart_cpus() worked well enough by accident. Before this set of fixes, resume_cpus() used the same cpuset (started_cpus, meaning CPUs directed to restart) as restart_cpus(). resume_cpus() waited for the wrong cpuset (stopped_cpus) to become empty, but since mixtures of stopped and suspended CPUs are not close to working, stopped_cpus must be empty when resuming so the wait is null -- restart_cpus just allows the other CPUs to restart and returns without waiting.
Fix resume_cpus() to wait on a non-wrong cpuset for the ACPI case, and add further kludges to try to keep it working for the XEN case. It was only used for XEN. It waited on suspended_cpus. This works for XEN. However, for ACPI, resuming is a 2-step process. ACPI has already woken up the other CPUs and removed them from suspended_cpus. This fix records the move by putting them in a new cpuset resuming_cpus. Waiting on suspended_cpus would give the same null wait as waiting on stopped_cpus. Wait on resuming_cpus instead.
Add a cpuset toresume_cpus to map the CPUs being told to resume to keep this separate from the cpuset started_cpus for mapping the CPUs being told to restart. Mixtures of stopped and suspended/resuming CPUs are still far from working. Describe new and some old cpusets in comments.
Add further kludges to cpususpend_handler() to try to avoid breaking it for XEN. XEN doesn't use resumectx(), so it doesn't use the second return path for savectx(), and it goes from the suspended state directly to the restarted state, while ACPI resume goes through the resuming state. Enter the resuming state early for all cases so that resume_cpus can test for being in this state and not have to worry about the intermediate !suspended state for ACPI only.
Reviewed by: kib
show more ...
|
#
64de3fdd |
| 30-Nov-2017 |
Pedro F. Giffuni <pfg@FreeBSD.org> |
SPDX: use the Beerware identifier.
|
Revision tags: release/10.4.0 |
|
#
b754c279 |
| 13-Sep-2017 |
Navdeep Parhar <np@FreeBSD.org> |
MFH @ r323558.
|
#
1be4c195 |
| 25-Aug-2017 |
Enji Cooper <ngie@FreeBSD.org> |
MFhead@r322870
|
#
bb14d564 |
| 22-Aug-2017 |
Conrad Meyer <cem@FreeBSD.org> |
subr_smp: Clean up topology analysis, add additional layers
Rather than repeatedly nesting loops, separate concerns with a single loop per call stack level. Use a table to drive the recursive routi
subr_smp: Clean up topology analysis, add additional layers
Rather than repeatedly nesting loops, separate concerns with a single loop per call stack level. Use a table to drive the recursive routine. Handle missing topology layers more gracefully (infer a single unit).
Analyze some additional optional layers which may be present on e.g. AMD Zen systems (groups, aka dies, per package; and cachegroups, aka CCXes, per group).
Display that additional information in the boot-time topology information, when it is relevent (non-one).
Reviewed by: markj@, mjoras@ (earlier version) Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D12019
show more ...
|
Revision tags: release/11.1.0 |
|
#
67d955aa |
| 09-Apr-2017 |
Patrick Kelsey <pkelsey@FreeBSD.org> |
Corrected misspelled versions of rendezvous.
The MFC will include a compat definition of smp_no_rendevous_barrier() that calls smp_no_rendezvous_barrier().
Reviewed by: gnn, kib MFC after: 1 week D
Corrected misspelled versions of rendezvous.
The MFC will include a compat definition of smp_no_rendevous_barrier() that calls smp_no_rendezvous_barrier().
Reviewed by: gnn, kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D10313
show more ...
|
Revision tags: release/11.0.1, release/11.0.0 |
|
#
d6084013 |
| 05-Apr-2016 |
Glen Barber <gjb@FreeBSD.org> |
MFH
Sponsored by: The FreeBSD Foundation
|
#
4725e6bf |
| 04-Apr-2016 |
Andriy Gapon <avg@FreeBSD.org> |
new x86 smp topology detection code
Previously, the code determined a topology of processing units (hardware threads, cores, packages) and then deduced a cache topology using certain assumptions. T
new x86 smp topology detection code
Previously, the code determined a topology of processing units (hardware threads, cores, packages) and then deduced a cache topology using certain assumptions. The new code builds a topology that includes both processing units and caches using the information provided by the hardware.
At the moment, the discovered full topology is used only to creeate a scheduling topology for SCHED_ULE. There is no KPI for other kernel uses.
Summary: - based on APIC ID derivation rules for Intel and AMD CPUs - can handle non-uniform topologies - requires homogeneous APIC ID assignment (same bit widths for ID components) - topology for dual-node AMD CPUs may not be optimal - topology for latest AMD CPU models may not be optimal as the code is several years old - supports only thread/package/core/cache nodes
Todo: - AMD dual-node processors - latest AMD processors - NUMA nodes - checking for homogeneity of the APIC ID assignment across packages - more flexible cache placement within topology - expose topology to userland, e.g., via sysctl nodes
Long term todo: - KPI for CPU sharing and affinity with respect to various resources (e.g., two logical processors may share the same FPU, etc)
Reviewed by: mav Tested by: mav MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D2728
show more ...
|
Revision tags: release/10.3.0, release/10.2.0 |
|
#
98e0ffae |
| 27-May-2015 |
Simon J. Gerraty <sjg@FreeBSD.org> |
Merge sync of head
|
#
51dd214c |
| 19-Jan-2015 |
Enji Cooper <ngie@FreeBSD.org> |
MFhead @ r277403
|
#
d899be7d |
| 19-Jan-2015 |
Glen Barber <gjb@FreeBSD.org> |
Reintegrate head: r274132-r277384
Sponsored by: The FreeBSD Foundation
|
#
8f0ea33f |
| 13-Jan-2015 |
Glen Barber <gjb@FreeBSD.org> |
Reintegrate head revisions r273096-r277147
Sponsored by: The FreeBSD Foundation
|