- 07 Aug, 2023 1 commit
-
-
Miaohe Lin authored
There's no need to use '<=' when knowing 'l->list[mid] != pid' already. No functional change intended. Signed-off-by:
Miaohe Lin <linmiaohe@huawei.com> Signed-off-by:
Tejun Heo <tj@kernel.org>
-
- 04 Aug, 2023 2 commits
-
-
Miaohe Lin authored
Since commit e76ecaee ("cgroup: use cgroup_kn_lock_live() in other cgroup kernfs methods"), cgroup_kn_lock_live() is used in cgroup kernfs methods. Update corresponding comment. Signed-off-by:
Miaohe Lin <linmiaohe@huawei.com> Acked-by:
Johannes Weiner <hannes@cmpxchg.org> Signed-off-by:
Tejun Heo <tj@kernel.org>
-
Han Dapeng authored
Signed-off-by:
Han Dapeng <han-dapeng@foxmail.com> Signed-off-by:
Tejun Heo <tj@kernel.org>
-
- 02 Aug, 2023 3 commits
-
-
Miaohe Lin authored
Since commit 8f36aaec ("cgroup: Use rcu_work instead of explicit rcu and work item"), css_free_work_fn has been renamed to css_free_rwork_fn. Update corresponding comment. Signed-off-by:
Miaohe Lin <linmiaohe@huawei.com> Signed-off-by:
Tejun Heo <tj@kernel.org>
-
Cai Xinchen authored
Add kernel-doc of param @rotor to fix warnings: kernel/cgroup/cpuset.c:4162: warning: Function parameter or member 'rotor' not described in 'cpuset_spread_node' kernel/cgroup/cpuset.c:3771: warning: Function parameter or member 'work' not described in 'cpuset_hotplug_workfn' Signed-off-by:
Cai Xinchen <caixinchen1@huawei.com> Acked-by:
Waiman Long <longman@redhat.com> Signed-off-by:
Tejun Heo <tj@kernel.org>
-
Kamalesh Babulal authored
Convert the only printk() to use pr_*() helper. No functional change. Signed-off-by:
Kamalesh Babulal <kamalesh.babulal@oracle.com> Signed-off-by:
Tejun Heo <tj@kernel.org>
-
- 21 Jul, 2023 4 commits
-
-
Miaohe Lin authored
Since commit 74321038 ("cgroup: use cgrp->kn->id as the cgroup ID"), cgrp is associated with its kernfs_node. Update corresponding comment. Signed-off-by:
Miaohe Lin <linmiaohe@huawei.com> Signed-off-by:
Tejun Heo <tj@kernel.org>
-
Xiongwei Song authored
"listers" -> "listeners" Signed-off-by:
Xiongwei Song <xiongwei.song@windriver.com> Signed-off-by:
Tejun Heo <tj@kernel.org>
-
Xiongwei Song authored
The radix-tree for Page Cache has been replaced with xarray, see commit eb797a8e ("page cache: Rearrange address_space"), so move "radix-tree" to "xarray". Signed-off-by:
Xiongwei Song <xiongwei.song@windriver.com> Signed-off-by:
Tejun Heo <tj@kernel.org>
-
Haitao Huang authored
Change 'new_usage' type to u64 so it can be compared with unsigned 'max' and 'capacity' properly even if the value crosses the signed boundary. Signed-off-by:
Haitao Huang <haitao.huang@linux.intel.com> Signed-off-by:
Tejun Heo <tj@kernel.org>
-
- 18 Jul, 2023 2 commits
-
-
Haitao Huang authored
So the variables can account for resources of huge quantities even on 32-bit machines. Signed-off-by:
Haitao Huang <haitao.huang@linux.intel.com> Signed-off-by:
Tejun Heo <tj@kernel.org>
-
Kamalesh Babulal authored
Update the miscellaneous controller's structure member's description of struct misc_res and struct misc_cg. Signed-off-by:
Kamalesh Babulal <kamalesh.babulal@oracle.com> Signed-off-by:
Tejun Heo <tj@kernel.org>
-
- 17 Jul, 2023 3 commits
-
-
Kamalesh Babulal authored
cgroup_create() creates cgrp and assigns the kernfs_node to cgrp->kn, then cgroup_mkdir() populates base and csses cft file by calling css_populate_dir() and cgroup_apply_control_enable() with a valid cgrp->kn. Check for NULL cgrp->kn, will always be false, remove it. Signed-off-by:
Kamalesh Babulal <kamalesh.babulal@oracle.com> Signed-off-by:
Tejun Heo <tj@kernel.org>
-
Miaohe Lin authored
cgroup_taskset_migrate() has been renamed to cgroup_migrate_execute() since commit e595cd70 ("cgroup: track migration context in cgroup_mgctx"). Update the corresponding comment. Signed-off-by:
Miaohe Lin <linmiaohe@huawei.com> Signed-off-by:
Tejun Heo <tj@kernel.org>
-
Miaohe Lin authored
Use local variable parent to initialize iter tcgrp in for loop so the size of cgroup.o can be reduced by 64 bytes. No functional change intended. Signed-off-by:
Miaohe Lin <linmiaohe@huawei.com> Signed-off-by:
Tejun Heo <tj@kernel.org>
-
- 14 Jul, 2023 1 commit
-
-
Miaohe Lin authored
There's no flag in the delay accounting structure indicates that the task is waiting on IO since commit 1193829d ("delayacct: cleanup flags in struct task_delay_info and functions use it"). So remove the comment. Signed-off-by:
Miaohe Lin <linmiaohe@huawei.com> Signed-off-by:
Tejun Heo <tj@kernel.org>
-
- 11 Jul, 2023 1 commit
-
-
Miaohe Lin authored
Put cgroup_tryget_css() inside CONFIG_CGROUP_SCHED to fix the warning of 'cgroup_tryget_css' defined but not used [-Wunused-function] when CONFIG_CGROUP_SCHED is disabled. Signed-off-by:
Miaohe Lin <linmiaohe@huawei.com> Reviewed-by:
Kamalesh Babulal <kamalesh.babulal@oracle.com> Signed-off-by:
Tejun Heo <tj@kernel.org>
-
- 10 Jul, 2023 14 commits
-
-
Waiman Long authored
A single partition setup and tear-down operation can lead to multiple rebuild_sched_domains_locked() calls which is a waste of effort. This can partly be mitigated by adding a flag to suppress the rebuild_sched_domains_locked() call in update_cpumasks_hier(). Since a Boolean flag has already been passed as the 3rd argument to update_cpumasks_hier(), we can extend that to a full flag word. The sched domain rebuild suppression is now enabled in update_sibling_cpumasks() as all it callers will do the sched domain rebuild after its return later on anyway. Signed-off-by:
Waiman Long <longman@redhat.com> Signed-off-by:
Tejun Heo <tj@kernel.org>
-
Waiman Long authored
The limitation that update_parent_subparts_cpumask() can only use addmask & delmask in the given tmp cpumasks is fragile and may lead to unexpected error. Fix this problem by allocating/freeing a struct tmpmasks in update_cpumask() to avoid reusing the cpumasks in trial_cs. With this change, we can move the update_tasks_cpumask() for the parent and update_sibling_cpumasks() for the sibling to inside update_parent_subparts_cpumask(). Signed-off-by:
Waiman Long <longman@redhat.com> Signed-off-by:
Tejun Heo <tj@kernel.org>
-
Waiman Long authored
Extract out the setting of CS_CPU_EXCLUSIVE and CS_SCHED_LOAD_BALANCE flags as well as the rebuilding of scheduling domains into the new update_partition_exclusive() and update_partition_sd_lb() helper functions to simplify the logic. The update_partition_exclusive() helper is called mainly at the beginning of the caller, but it may be called at the end too. The update_partition_sd_lb() helper is called at the end of the caller. This patch should reduce the chance that cpuset partition will end up in an incorrect state. Signed-off-by:
Waiman Long <longman@redhat.com> Signed-off-by:
Tejun Heo <tj@kernel.org>
-
Waiman Long authored
Since commit f28e2244 ("cgroup/cpuset: Add a new isolated cpus.partition type"), the CS_SCHED_LOAD_BALANCE bit of a v2 cpuset can be on or off. The child cpusets of a partition root must have the same setting as its parent or it may screw up the rebuilding of sched domains. Fix this problem by making sure the a child v2 cpuset will follows its parent cpuset load balance state unless the child cpuset is a new partition root itself. Fixes: f28e2244 ("cgroup/cpuset: Add a new isolated cpus.partition type") Signed-off-by:
Waiman Long <longman@redhat.com> Signed-off-by:
Tejun Heo <tj@kernel.org>
-
Miaohe Lin authored
cgroup_tree_mutex is removed since commit 8353da1f ("cgroup: remove cgroup_tree_mutex"), update corresponding comment. Signed-off-by:
Miaohe Lin <linmiaohe@huawei.com> Signed-off-by:
Tejun Heo <tj@kernel.org>
-
Michal Koutný authored
Add a separate testfile to verify treating permissions when tasks are migrated on cgroup v2 hierarchy between cpuset cgroups. In accordance with v2 design, migration should be allowed based on delegation boundaries (i.e. cgroup.procs permissions) and does not depend on the migrated object (i.e. unprivileged process can migrate another process (even privileged) as long as it remains in the original dedicated scope). Signed-off-by:
Michal Koutný <mkoutny@suse.com> Signed-off-by:
Tejun Heo <tj@kernel.org>
-
Michal Koutný authored
No functional change intended, these small changes are merged into one commit and they serve as a preparation for an upcoming new testcase. Signed-off-by:
Michal Koutný <mkoutny@suse.com> Reviewed-by:
Waiman Long <longman@redhat.com> Signed-off-by:
Tejun Heo <tj@kernel.org>
-
Michal Koutný authored
When we migrate a task between two cgroups, one of the checks is a verification whether we can modify task's scheduler settings (cap_task_setscheduler()). An implicit migration occurs also when enabling a controller on the unified hierarchy (think of parent to child migration). The aforementioned check may be problematic if the caller of the migration (enabling a controller) has no permissions over migrated tasks. For instance, a user's cgroup that ends up running a process of a different user. Although cgroup permissions are configured favorably, the enablement fails due to the foreign process [1]. Change the behavior by relaxing the permissions check on the unified hierarchy when no effective change would happen. This is in accordance with unified hierarchy attachment behavior when permissions of the source to target cgroups are decisive whereas the migrated task is opaque (as opposed to more restrictive check in __cgroup1_procs_write()). Notice that foreign task's affinity may still be modified if the user can modify destination cgroup's cpuset attributes (update_tasks_cpumask() does no permissions check). The permissions check could thus be skipped on v2 even when affinity changes. Stay conservative in this patch though. [1] https://github.com/systemd/systemd/issues/18293#issuecomment-831205649Signed-off-by:
Michal Koutný <mkoutny@suse.com> Reviewed-by:
Waiman Long <longman@redhat.com> Signed-off-by:
Tejun Heo <tj@kernel.org>
-
Miaohe Lin authored
cpuset_mutex unlock and lock pair is only needed when transferring tasks out of empty cpuset. Avoid unneeded cpuset_mutex re-lock when !is_empty to save cpu cycles. Signed-off-by:
Miaohe Lin <linmiaohe@huawei.com> Reviewed-by:
Waiman Long <longman@redhat.com> Signed-off-by:
Tejun Heo <tj@kernel.org>
-
Miaohe Lin authored
kthread_is_per_cpu() can be called directly without checking whether PF_KTHREAD is set in task->flags. So remove PF_KTHREAD check to make code more concise. Signed-off-by:
Miaohe Lin <linmiaohe@huawei.com> Reviewed-by:
Waiman Long <longman@redhat.com> Signed-off-by:
Tejun Heo <tj@kernel.org>
-
Miaohe Lin authored
Make it under CONFIG_CGROUP_SCHED to rid of __maybe_unused annotation. And further fetch cgrp inside cgroup_extra_stat_show() directly to rid of __maybe_unused annotation of cgrp. No functional change intended. Signed-off-by:
Miaohe Lin <linmiaohe@huawei.com> Signed-off-by:
Tejun Heo <tj@kernel.org>
-
Miaohe Lin authored
The return value of cgroup_rm_cftypes_locked() is always 0. So remove it to simplify the code. No functional change intended. Signed-off-by:
Miaohe Lin <linmiaohe@huawei.com> Reviewed-by:
Michal Koutný <mkoutny@suse.com> Signed-off-by:
Tejun Heo <tj@kernel.org>
-
git://www.linux-watchdog.org/linux-watchdogLinus Torvalds authored
Pull watchdog update from Wim Van Sebroeck: - Add Loongson-1 watchdog dt-bindings * tag 'linux-watchdog-6.5-rc2' of git://www.linux-watchdog.org/linux-watchdog: dt-bindings: watchdog: Add Loongson-1 watchdog
-
git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6Linus Torvalds authored
Pull crypto fixes from Herbert Xu: "Fix a couple of regressions in af_alg and incorrect return values in crypto/asymmetric_keys/public_key" * tag 'v6.5-p2' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: algif_hash - Fix race between MORE and non-MORE sends KEYS: asymmetric: Fix error codes crypto: af_alg - Fix merging of written data into spliced pages
-
- 09 Jul, 2023 9 commits
-
-
Linus Torvalds authored
-
Linus Torvalds authored
We just sorted the entries and fields last release, so just out of a perverse sense of curiosity, I decided to see if we can keep things ordered for even just one release. The answer is "No. No we cannot". I suggest that all kernel developers will need weekly training sessions, involving a lot of Big Bird and Sesame Street. And at the yearly maintainer summit, we will all sing the alphabet song together. I doubt I will keep doing this. At some point "perverse sense of curiosity" turns into just a cold dark place filled with sadness and despair. Repeats: 80e62bc8 ("MAINTAINERS: re-sort all entries and fields") Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
git://git.infradead.org/users/hch/dma-mappingLinus Torvalds authored
Pull dma-mapping fixes from Christoph Hellwig: - swiotlb area sizing fixes (Petr Tesarik) * tag 'dma-mapping-6.5-2023-07-09' of git://git.infradead.org/users/hch/dma-mapping: swiotlb: reduce the number of areas to match actual memory pool size swiotlb: always set the number of areas before allocating the pool
-
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tipLinus Torvalds authored
Pull irq update from Borislav Petkov: - Optimize IRQ domain's name assignment * tag 'irq_urgent_for_v6.5_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: irqdomain: Use return value of strreplace()
-
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tipLinus Torvalds authored
Pull x86 fpu fix from Borislav Petkov: - Do FPU AP initialization on Xen PV too which got missed by the recent boot reordering work * tag 'x86_urgent_for_v6.5_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/xen: Fix secondary processors' FPU initialization
-
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tipLinus Torvalds authored
Pull x86 fix from Thomas Gleixner: "A single fix for the mechanism to park CPUs with an INIT IPI. On shutdown or kexec, the kernel tries to park the non-boot CPUs with an INIT IPI. But the same code path is also used by the crash utility. If the CPU which panics is not the boot CPU then it sends an INIT IPI to the boot CPU which resets the machine. Prevent this by validating that the CPU which runs the stop mechanism is the boot CPU. If not, leave the other CPUs in HLT" * tag 'x86-core-2023-07-09' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/smp: Don't send INIT to boot CPU
-
git://git.kernel.org/pub/scm/linux/kernel/git/mips/linuxLinus Torvalds authored
Pull MIPS fixes from Thomas Bogendoerfer: - fixes for KVM - fix for loongson build and cpu probing - DT fixes * tag 'mips_6.5_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: MIPS: kvm: Fix build error with KVM_MIPS_DEBUG_COP0_COUNTERS enabled MIPS: dts: add missing space before { MIPS: Loongson: Fix build error when make modules_install MIPS: KVM: Fix NULL pointer dereference MIPS: Loongson: Fix cpu_probe_loongson() again
-
git://git.kernel.org/pub/scm/fs/xfs/xfs-linuxLinus Torvalds authored
Pull xfs fix from Darrick Wong: "Nothing exciting here, just getting rid of a gcc warning that I got tired of seeing when I turn on gcov" * tag 'xfs-6.5-merge-6' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: xfs: fix uninit warning in xfs_growfs_data
-
git://git.samba.org/sfrench/cifs-2.6Linus Torvalds authored
Pull more smb client updates from Steve French: - fix potential use after free in unmount - minor cleanup - add worker to cleanup stale directory leases * tag '6.5-rc-smb3-client-fixes-part2' of git://git.samba.org/sfrench/cifs-2.6: cifs: Add a laundromat thread for cached directories smb: client: remove redundant pointer 'server' cifs: fix session state transition to avoid use-after-free issue
-