- Jan 24, 2023
-
-
The new sysctl sched_pelt_multiplier allows a user to set a clock multiplier to x2 or x4 (x1 being the default). This clock multiplier artificially speeds up PELT ramp up/down similarly to use a faster half-life than the default 32ms. - x1: 32ms half-life - x2: 16ms half-life - x4: 8ms half-life Internally, a new clock is created: rq->clock_task_mult. It sits in the clock hierarchy between rq->clock_task and rq->clock_pelt. [peterz: Use sched_feat()] Signed-off-by:
Vincent Donnefort <vincent.donnefort@arm.com> Signed-off-by:
Dietmar Eggemann <dietmar.eggemann@arm.com> Signed-off-by:
Peter Zijlstra (Intel) <peterz@infradead.org>
-
commit 3fcbf1c7 ("arch_topology: Fix cache attributes detection in the CPU hotplug path") adds a call to detect_cache_attributes() to populate the cacheinfo before updating the siblings mask. detect_cache_attributes() allocates memory and can take the PPTT mutex (on ACPI platforms). On PREEMPT_RT kernels, on secondary CPUs, this triggers a: 'BUG: sleeping function called from invalid context' [1] as the code is executed with preemption and interrupts disabled. The primary CPU was previously storing the cache information using the now removed (struct cpu_topology).llc_id: commit 5b8dc787 ("arch_topology: Drop LLC identifier stash from the CPU topology") allocate_cache_info() tries to build the cacheinfo from the primary CPU prior secondary CPUs boot, if the DT/ACPI description contains cache information. If allocate_cache_info() fails, then fallback to the current state for the cacheinfo allocation. [1] will be triggered in such case. When unplugging a CPU, the cacheinfo memory cannot be freed. If it was, then the memory would be allocated early by the re-plugged CPU and would trigger [1]. [1]: [ 7.560791] BUG: sleeping function called from invalid context at kernel/locking/spinlock_rt.c:46 [ 7.560794] in_atomic(): 1, irqs_disabled(): 128, non_block: 0, pid: 0, name: swapper/111 [ 7.560796] preempt_count: 1, expected: 0 [ 7.560797] RCU nest depth: 1, expected: 1 [ 7.560799] 3 locks held by swapper/111/0: [ 7.560800] #0: ffff403e406cae98 (&pcp->lock){+.+.}-{3:3}, at: get_page_from_freelist+0x218/0x12c8 [ 7.560811] #1: ffffc5f8ed09f8e8 (rcu_read_lock){....}-{1:3}, at: rt_spin_trylock+0x48/0xf0 [ 7.560820] #2: ffff403f400b4fd8 (&zone->lock){+.+.}-{3:3}, at: rmqueue_bulk+0x64/0xa80 [ 7.560824] irq event stamp: 0 [ 7.560825] hardirqs last enabled at (0): [<0000000000000000>] 0x0 [ 7.560827] hardirqs last disabled at (0): [<ffffc5f8e9f7d594>] copy_process+0x5dc/0x1ab8 [ 7.560830] softirqs last enabled at (0): [<ffffc5f8e9f7d594>] copy_process+0x5dc/0x1ab8 [ 7.560833] softirqs last disabled at (0): [<0000000000000000>] 0x0 [ 7.560834] Preemption disabled at: [ 7.560835] [<ffffc5f8e9fd3c28>] migrate_enable+0x30/0x130 [ 7.560838] CPU: 111 PID: 0 Comm: swapper/111 Tainted: G W 6.0.0-rc4-rt6-[...] [ 7.560841] Call trace: [...] [ 7.560870] __kmalloc+0xbc/0x1e8 [ 7.560873] detect_cache_attributes+0x2d4/0x5f0 [ 7.560876] update_siblings_masks+0x30/0x368 [ 7.560880] store_cpu_topology+0x78/0xb8 [ 7.560883] secondary_start_kernel+0xd0/0x198 [ 7.560885] __secondary_switched+0xb0/0xb4 Signed-off-by:
Pierre Gondois <pierre.gondois@arm.com>
-
acpi_find_last_cache_level() allows to find the last level of cache for a given CPU. The function is only called on arm64 ACPI based platforms to check for cache information that would be missing in the CLIDR_EL1 register. To allow populating (struct cpu_cacheinfo).num_leaves by only parsing a PPTT, update acpi_find_last_cache_level() to get the 'split_levels', i.e. the number of cache levels being split in data/instruction caches. It is assumed that there will not be data/instruction caches above a unified cache. If a split level consist of one data cache and no instruction cache (or opposite), then the missing cache will still be populated by default with minimal cache information, and maximal cpumask (all non-existing caches have the same fw_token). Suggested-by:
Jeremy Linton <jeremy.linton@arm.com> Signed-off-by:
Pierre Gondois <pierre.gondois@arm.com> Reviewed-by:
Jeremy Linton <jeremy.linton@arm.com>
-
acpi_find_cache_levels() is used at a single place and is short enough to be merged into the calling function. The removal allows an easier renaming of the calling function in the next patch. Also reorder the local variables in the 'reversed Christmas tree' order. Signed-off-by:
Pierre Gondois <pierre.gondois@arm.com> Reviewed-by:
Sudeep Holla <sudeep.holla@arm.com> Reviewed-by:
Jeremy Linton <jeremy.linton@arm.com>
-
Make init_of_cache_level() return an error code when the cache information parsing fails to help detecting missing information. init_of_cache_level() is only called for riscv. Returning an error code instead of 0 will prevent detect_cache_attributes() to allocate memory if an incomplete DT is parsed. Signed-off-by:
Pierre Gondois <pierre.gondois@arm.com> Reviewed-by:
Sudeep Holla <sudeep.holla@arm.com>
-
RISC-V's implementation of init_of_cache_level() is following the Devicetree Specification v0.3 regarding caches, cf.: - s3.7.3 'Internal (L1) Cache Properties' - s3.8 'Multi-level and Shared Cache Nodes' Allow reusing the implementation by moving it. Signed-off-by:
Pierre Gondois <pierre.gondois@arm.com> Reviewed-by:
Conor Dooley <conor.dooley@microchip.com> Reviewed-by:
Sudeep Holla <sudeep.holla@arm.com>
-
The cpufreq cooling devices have been removed by 52e3b2ca ("arm64: dts: qcom: sdm845: Remove cpufreq cooling devices for CPU thermal zones") but the per-CPU thermal zones remain. Per monitor_thermal_zone(), we get one polling workqueue per TZ, which is a lot of noise considering the only time those thermal zones will affect the system will be upon crossing a critical trip point. Remove the per-CPU thermal zones and let the cluster-wide ones handle critical temperature trip points. Signed-off-by:
Valentin Schneider <valentin.schneider@arm.com>
-
This is a temporary hack. Currently trace points for PELT are only triggered when the PELT metrics consumed by the scheduler are actually updated, i.e. util_avg. This means no updates if no 1 ms boundary is being crossed by the update. When reconstructing the PELT signal based on this data, the peak PELT value can therefore be up to 1 ms worth of PELT accumulation off (23 in absolute terms). This leads to a discrepancy that causes test cases to fail. This patch ensures that trace events are always emitted even if the metrics haven't been updated which should allow accurate reconstruction of the PELT signals.
-
Signed-off-by:
Ionela Voinescu <ionela.voinescu@arm.com>
-
arm and arm64: Add Debug per_cpu maps access Add Prove Locking Add Scheduler statistics arm: Add kernel .config support and /proc/config.gz arm64: Add Scheduler debugging Add Ftrace Signed-off-by:
Dietmar Eggemann <dietmar.eggemann@arm.com>
-
arm and arm64: Add Cgroups (+ FAIR_GROUP_SCHED and FREEZER) Add Uclamp support for tasks and taskgroups Add CpuFreq governors and make schedutil default arm: Add Cpuset support Add Scheduler autogroups Add DIE (SCHED_MC) sched domain level Add Energy Model Signed-off-by:
Dietmar Eggemann <dietmar.eggemann@arm.com> Signed-off-by:
Ionela Voinescu <ionela.voinescu@arm.com> [@Ionela: cpufreq governor enablement for both arm and arm64]
-
This reverts commit 5d777b18. [ionela.voinescu@arm.com: modify capacity of current CPU only]
-
These configs are causing instability on Juno boards.
-
For Arm: Add ARM vexpress-spc cpufreq driver Add ARM Big.Little cpuidle driver Add Sensor Vexpress Disable CONFIG_HARDEN_BRANCH_HISTORY
-
-
- Jan 20, 2023
-
-
Deepak Kumar Mishra authored
-
- Jan 19, 2023
-
-
Rafael J. Wysocki authored
* thermal-core: thermal: core: call put_device() only after device_register() fails
-
Viresh Kumar authored
put_device() shouldn't be called before a prior call to device_register(). __thermal_cooling_device_register() doesn't follow that properly and needs fixing. Also thermal_cooling_device_destroy_sysfs() is getting called unnecessarily on few error paths. Fix all this by placing the calls at the right place. Based on initial work done by Caleb Connolly. Fixes: 4748f968 ("thermal: core: fix some possible name leaks in error paths") Fixes: c408b3d1 ("thermal: Validate new state in cur_state_store()") Reported-by:
Caleb Connolly <caleb.connolly@linaro.org> Signed-off-by:
Viresh Kumar <viresh.kumar@linaro.org> Tested-by:
Frank Rowand <frowand.list@gmail.com> Reviewed-by:
Yang Yingliang <yangyingliang@huawei.com> Tested-by:
Caleb Connolly <caleb.connolly@linaro.org> Signed-off-by:
Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-
Rafael J. Wysocki authored
* thermal-intel: thermal: intel: menlow: Update function descriptions
-
Rafael J. Wysocki authored
* acpi-battery: ACPI: battery: Fix missing NUL-termination with large strings
-
- Jan 18, 2023
-
-
Deming Wang authored
Update function parameter descriptions for sensor_get_auxtrip() and sensor_set_auxtrip(). [ rjw: New changelog, subject edits ] Signed-off-by:
Deming Wang <wangdeming@inspur.com> Signed-off-by:
Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-
Armin Wolf authored
When encountering a string bigger than the destination buffer (32 bytes), the string is not properly NUL-terminated, causing buffer overreads later. This for example happens on the Inspiron 3505, where the battery model name is larger than 32 bytes, which leads to sysfs showing the model name together with the serial number string (which is NUL-terminated and thus prevents worse). Fix this by using strscpy() which ensures that the result is always NUL-terminated. Fixes: 106449e8 ("ACPI: Battery: Allow extract string from integer") Signed-off-by:
Armin Wolf <W_Armin@gmx.de> Signed-off-by:
Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-
Rafael J. Wysocki authored
* acpi-prm: ACPI: PRM: Check whether EFI runtime is available
-
Ard Biesheuvel authored
The ACPI PRM address space handler calls efi_call_virt_pointer() to execute PRM firmware code, but doing so is only permitted when the EFI runtime environment is available. Otherwise, such calls are guaranteed to result in a crash, and must therefore be avoided. Given that the EFI runtime services may become unavailable after a crash occurring in the firmware, we need to check this each time the PRM address space handler is invoked. If the EFI runtime services were not available at registration time to being with, don't install the address space handler at all. Fixes: cefc7ca4 ("ACPI: PRM: implement OperationRegion handler for the PlatformRtMechanism subtype") Signed-off-by:
Ard Biesheuvel <ardb@kernel.org> Cc: All applicable <stable@vger.kernel.org> Signed-off-by:
Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-
Rafael J. Wysocki authored
* acpi-maintainers: MAINTAINERS: Update the ACPICA development list address * acpi-video: ACPI: video: Add backlight=native DMI quirk for Acer Aspire 4810T
-
Rafael J. Wysocki authored
* acpi-pnp: ACPI: PNP: Introduce list of known non-PNP devices
-
Peter Zijlstra authored
The recent cpuidle changes started triggering RCU splats on Juno development boards: | ============================= | WARNING: suspicious RCU usage | ----------------------------- | include/trace/events/ipi.h:19 suspicious rcu_dereference_check() usage! Fix cpuidle on ARM64: - ... by introducing a new 'is_rcu' flag to the cpuidle helpers & make ARM64 use it, as ARM64 wants to keep RCU active longer and wants to do the ct_cpuidle_enter()/exit() dance itself. - Also update the PSCI driver accordingly. - This also removes the last known RCU_NONIDLE() user as a bonus. Reported-by:
Mark Rutland <mark.rutland@arm.com> Signed-off-by:
Peter Zijlstra <peterz@infradead.org> Signed-off-by:
Ingo Molnar <mingo@kernel.org> Tested-by:
Sudeep Holla <sudeep.holla@arm.com> Tested-by:
Mark Rutland <mark.rutland@arm.com> Reviewed-by:
Mark Rutland <mark.rutland@arm.com> Link: https://lore.kernel.org/r/Y8Z31UbzG3LJgAXE@hirez.programming.kicks-ass.net --
-
Arnd Bergmann authored
The added '.flags' value is sometimes ignored here because it gets overwritten by another initialization: drivers/cpuidle/cpuidle-mvebu-v7.c:24:33: error: initialized field overwritten [-Werror=override-init] 24 | #define MVEBU_V7_FLAG_DEEP_IDLE 0x10000 | ^~~~~~~ drivers/cpuidle/cpuidle-mvebu-v7.c:69:43: note: in expansion of macro 'MVEBU_V7_FLAG_DEEP_IDLE' ... Merge the two fields into one. Fixes: 4ce40e9d ("cpuidle, armada: Push RCU-idle into driver") Signed-off-by:
Arnd Bergmann <arnd@arndb.de> Signed-off-by:
Ingo Molnar <mingo@kernel.org> Acked-by:
Peter Zijlstra <peterz@infradead.org> Link: https://lore.kernel.org/r/20230117164642.1672784-1-arnd@kernel.org
-
- Jan 17, 2023
-
-
Hans de Goede authored
The Acer Aspire 4810T predates Windows 8, so it defaults to using acpi_video# for backlight control, but this is non functional on this model. Add a DMI quirk to use the native backlight interface which does work properly. Signed-off-by:
Hans de Goede <hdegoede@redhat.com> Signed-off-by:
Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-
Rafael J. Wysocki authored
The previous ACPICA development list address, devel@acpica.org, started to bounce some time ago and it is not likely to be restored, so replace it with a new one, acpica-devel@lists.linuxfoundation.org. Signed-off-by:
Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-
Rafael J. Wysocki authored
* thermal-intel: thermal: intel: Fix unsigned comparison with less than zero thermal/x86_pkg_temp_thermal: Add support for handling dynamic tjmax thermal/x86_pkg_temp_thermal: Use Intel TCC library thermal/intel/intel_tcc_cooling: Use Intel TCC library thermal/intel/intel_soc_dts_iosf: Use Intel TCC library thermal/int340x/processor_thermal: Use Intel TCC library thermal/intel: Introduce Intel TCC library
-
Rafael J. Wysocki authored
* thermal: (37 commits) thermal/drivers/armada: Use strscpy() to instead of strncpy() thermal/drivers/qcom: Fix lock inversion thermal/drivers/tegra: Fix set_trip_temp() deadlock thermal/drivers/qcom: Fix set_trip_temp() deadlock thermal/drivers/mellanox: Use generic thermal_zone_get_trip() function wifi: iwlwifi: Use generic thermal_zone_get_trip() function thermal/drivers/tegra: Fix crash when getting critical temp thermal/drivers/exynos: Fix NULL pointer dereference when getting the critical temp thermal/drivers/intel: Use generic thermal_zone_get_trip() function thermal/intel/int340x: Replace parameter to simplify thermal/drivers/cxgb4: Use generic thermal_zone_get_trip() function thermal/drivers/acerhdf: Use generic thermal_zone_get_trip() function thermal/drivers/ti: Remove unused macros ti_thermal_get_trip_value() / ti_thermal_trip_is_valid() thermal/drivers/da9062: Use generic thermal_zone_get_trip() function thermal/drivers/broadcom: Use generic thermal_zone_get_trip() function thermal/drivers/rcar: Use generic thermal_zone_get_trip() function thermal/drivers/imx: Use generic thermal_zone_get_trip() function thermal/drivers/st: Use generic trip points thermal/of: Remove of_thermal_get_crit_temp() thermal/of: Remove of_thermal_set_trip_hyst() ...
-
Rafael J. Wysocki authored
* pm-core: PM: runtime: Simplify __rpm_get_callback() PM: runtime: Document that force_suspend() is incompatible with SMART_SUSPEND
-
Rafael J. Wysocki authored
* pm-cpuidle: cpuidle-haltpoll: select haltpoll governor cpuidle: teo: Introduce util-awareness cpuidle: teo: Optionally skip polling states in teo_find_shallower_state()
-
Rafael J. Wysocki authored
* acpi-processor: cpufreq: intel_pstate: Drop ACPI _PSS states table patching ACPI: processor: perflib: Avoid updating frequency QoS unnecessarily ACPI: processor: perflib: Use the "no limit" frequency QoS ACPI: processor: idle: Drop unnecessary (void *) conversion * acpi-tables: ACPI: tables: Add support for NBFT * acpi-pmic: ACPI: PMIC: Add pmic_i2c_address to BYT Crystal Cove support * acpi-misc: ACPI: Drop the custom_method debugfs interface ACPI: Silence missing prototype warnings
-
Rafael J. Wysocki authored
* acpica: ACPICA: nsrepair: handle cases without a return value correctly ACPICA: Constify pathname argument for acpi_get_handle() ACPICA: Drop port I/O validation for some regions
-
Rafael J. Wysocki authored
In some cases, PNP device IDs from acpi_pnp_device_ids[] are returned by _CID for devices for which matching platform drivers are present in the kernel and should be bound to them. However, the IDs coming from _CID cause the PNP scan handler to attach to those devices which prevents platform device objects from being created for them. Address this by introducing a list of known non-PNP device IDs into acpi_pnp.c such that if a device ID is there in that list, it cannot be attached to by the PNP scan handler and add the platform runtime update and telemetry device IDs to that list to start with. Reported-by:
Chen Yu <yu.c.chen@intel.com> Signed-off-by:
Rafael J. Wysocki <rafael.j.wysocki@intel.com> Tested-by:
Zhang Yang <Yang5.zhang@intel.com>
-
- Jan 15, 2023
-
-
Linus Torvalds authored
-
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tipLinus Torvalds authored
Pull x86 fixes from Borislav Petkov: - Make sure the poking PGD is pinned for Xen PV as it requires it this way - Fixes for two resctrl races when moving a task or creating a new monitoring group - Fix SEV-SNP guests running under HyperV where MTRRs are disabled to not return a UC- type mapping type on memremap() and thus cause a serious slowdown - Fix insn mnemonics in bioscall.S now that binutils is starting to fix confusing insn suffixes * tag 'x86_urgent_for_v6.2_rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/mm: fix poking_init() for Xen PV guests x86/resctrl: Fix event counts regression in reused RMIDs x86/resctrl: Fix task CLOSID/RMID update race x86/pat: Fix pat_x_mtrr_type() for MTRR disabled case x86/boot: Avoid using Intel mnemonics in AT&T syntax asm
-