Some bugfix patches to address mpam issues.
Yu Liao (7): mpam/resctrl: Fix a deadlock due to inaccurate reference mpam/resctrl: Clean up unused function parameter in mkdir path mpam/resctrl: Clean up resctrl_group_rmdir_[ctrl/mon]() mpam/resctrl: Fix use-after-free due to inaccurate refcount of rdtgroup arm64/mpam: change allocation mode from GFP_KERNEL to GFP_NOWAIT arm64/mpam: Fix wrong seconds to jiffies conversion arm64/mpam: Fix softlockup when reading mondata
arch/arm64/kernel/mpam/mpam_ctrlmon.c | 3 ++ arch/arm64/kernel/mpam/mpam_resctrl.c | 6 +-- fs/resctrlfs.c | 57 ++++++++++----------------- 3 files changed, 27 insertions(+), 39 deletions(-)
hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I9PVOZ
--------------------------------
Found a deadlock issue in mpam which is already fixed in x86 resctrl by commit 334b0f4e9b1b ("x86/resctrl: Fix a deadlock due to inaccurate reference").
There is a race condition which results in a deadlock when rmdir and mkdir concurrently:
Thread 1: rmdir /sys/fs/resctrl/p1 Thread 2: mkdir /sys/fs/resctrl/p1/mon_groups/m1
Thread 1 is deleting control group "p1". Holding rdtgroup_mutex, kernfs_remove() removes all kernfs nodes under directory "p1" recursively, then waits for sub kernfs node "mon_groups" to drop active reference.
Thread 2 is trying to create a subdirectory "m1" in the "mon_groups" directory. The wrapper kernfs_iop_mkdir() takes an active reference to the "mon_groups" directory but the code drops the active reference to the parent directory "p1" instead.
As a result, Thread 1 is blocked on waiting for active reference to drop and never release rdtgroup_mutex, while Thread 2 is also blocked on trying to get rdtgroup_mutex.
Thread 1 (rdtgroup_rmdir) Thread 2 (rdtgroup_mkdir) (rmdir /sys/fs/resctrl/p1) (mkdir /sys/fs/resctrl/p1/mon_groups/m1) ------------------------- ------------------------- kernfs_iop_mkdir /* * kn: "m1", parent_kn: "mon_groups", * prgrp_kn: parent_kn->parent: "p1", * * "mon_groups", parent_kn->active++: 1 */ kernfs_get_active(parent_kn) kernfs_iop_rmdir /* "p1", kn->active++ */ kernfs_get_active(kn)
rdtgroup_kn_lock_live atomic_inc(&rdtgrp->waitcount) /* "p1", kn->active-- */ kernfs_break_active_protection(kn) mutex_lock
rdtgroup_rmdir_ctrl free_all_child_rdtgrp sentry->flags = RDT_DELETED
rdtgroup_ctrl_remove rdtgrp->flags = RDT_DELETED kernfs_get(kn) kernfs_remove(rdtgrp->kn) __kernfs_remove /* "mon_groups", sub_kn */ atomic_add(KN_DEACTIVATED_BIAS, &sub_kn->active) kernfs_drain(sub_kn) /* * sub_kn->active == KN_DEACTIVATED_BIAS + 1, * waiting on sub_kn->active to drop, but it * never drops in Thread 2 which is blocked * on getting rdtgroup_mutex. */ Thread 1 hangs here ----> wait_event(sub_kn->active == KN_DEACTIVATED_BIAS) ... rdtgroup_mkdir rdtgroup_mkdir_mon(parent_kn, prgrp_kn) mkdir_rdt_prepare(parent_kn, prgrp_kn) rdtgroup_kn_lock_live(prgrp_kn) atomic_inc(&rdtgrp->waitcount) /* * "p1", prgrp_kn->active-- * * The active reference on "p1" is * dropped, but not matching the * actual active reference taken * on "mon_groups", thus causing * Thread 1 to wait forever while * holding rdtgroup_mutex. */ kernfs_break_active_protection( prgrp_kn) /* * Trying to get rdtgroup_mutex * which is held by Thread 1. */ Thread 2 hangs here ----> mutex_lock ...
The problem is that the creation of a subdirectory in the "mon_groups" directory incorrectly releases the active protection of its parent directory instead of itself before it starts waiting for rdtgroup_mutex. This is triggered by the rdtgroup_mkdir() flow calling rdtgroup_kn_lock_live()/rdtgroup_kn_unlock() with kernfs node of the parent control group ("p1") as argument. It should be called with kernfs node "mon_groups" instead. What is currently missing is that the kn->priv of "mon_groups" is NULL instead of pointing to the rdtgrp.
Fix it by pointing kn->priv to rdtgrp when "mon_groups" is created. Then it could be passed to rdtgroup_kn_lock_live()/rdtgroup_kn_unlock() instead. And then it operates on the same rdtgroup structure but handles the active reference of kernfs node "mon_groups" to prevent deadlock. The same changes are also made to the "mon_data" directories.
This patch involved associating the private data of the "mon_groups" and "mon_data" directories to the resource group to which they belong instead of NULL as before.
Improving the directory removal safeguard to ensure that subdirectories of the resctrl root directory can only be removed if they are a child of the resctrl filesystem's root _and_ not associated with the default resource group.
This patch results in some unused function parameters that will be cleaned up in follow-up patch, this patch focuses on the fix only in support of backport efforts.
Fixes: 6065f5513f78 ("resctrlfs: init support resctrlfs") Signed-off-by: Yu Liao liaoyu15@huawei.com --- fs/resctrlfs.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/fs/resctrlfs.c b/fs/resctrlfs.c index 56f2a63ea43b..74b73eaa13c8 100644 --- a/fs/resctrlfs.c +++ b/fs/resctrlfs.c @@ -360,7 +360,7 @@ static struct dentry *resctrl_mount(struct file_system_type *fs_type,
if (resctrl_mon_capable) { ret = mongroup_create_dir(resctrl_group_default.kn, - NULL, "mon_groups", + &resctrl_group_default, "mon_groups", &kn_mongrp); if (ret) { dentry = ERR_PTR(ret); @@ -594,7 +594,7 @@ static int mkdir_resctrl_prepare(struct kernfs_node *parent_kn, uint files = 0; int ret;
- prdtgrp = resctrl_group_kn_lock_live(prgrp_kn); + prdtgrp = resctrl_group_kn_lock_live(parent_kn); rdt_last_cmd_clear(); if (!prdtgrp) { ret = -ENODEV; @@ -683,7 +683,7 @@ static int mkdir_resctrl_prepare(struct kernfs_node *parent_kn, kernfs_activate(kn);
/* - * The caller unlocks the prgrp_kn upon success. + * The caller unlocks the parent_kn upon success. */ return 0;
@@ -700,7 +700,7 @@ static int mkdir_resctrl_prepare(struct kernfs_node *parent_kn, out_free_rdtgrp: kfree(rdtgrp); out_unlock: - resctrl_group_kn_unlock(prgrp_kn); + resctrl_group_kn_unlock(parent_kn); return ret; }
@@ -741,7 +741,7 @@ static int resctrl_group_mkdir_mon(struct kernfs_node *parent_kn, */ ret = resctrl_update_groups_config(prgrp);
- resctrl_group_kn_unlock(prgrp_kn); + resctrl_group_kn_unlock(parent_kn); return ret; }
@@ -775,7 +775,7 @@ static int resctrl_group_mkdir_ctrl_mon(struct kernfs_node *parent_kn, * Create an empty mon_groups directory to hold the subset * of tasks and cpus to monitor. */ - ret = mongroup_create_dir(kn, NULL, "mon_groups", NULL); + ret = mongroup_create_dir(kn, rdtgrp, "mon_groups", NULL); if (ret) { rdt_last_cmd_puts("kernfs subdir error\n"); goto out_list_del; @@ -789,7 +789,7 @@ static int resctrl_group_mkdir_ctrl_mon(struct kernfs_node *parent_kn, out_common_fail: mkdir_resctrl_prepare_clean(rdtgrp); out_unlock: - resctrl_group_kn_unlock(prgrp_kn); + resctrl_group_kn_unlock(parent_kn); return ret; }
@@ -948,7 +948,8 @@ static int resctrl_group_rmdir(struct kernfs_node *kn) * If the resctrl_group is a mon group and parent directory * is a valid "mon_groups" directory, remove the mon group. */ - if (rdtgrp->type == RDTCTRL_GROUP && parent_kn == resctrl_group_default.kn) + if (rdtgrp->type == RDTCTRL_GROUP && parent_kn == resctrl_group_default.kn && + rdtgrp != &resctrl_group_default) ret = resctrl_group_rmdir_ctrl(kn, rdtgrp, tmpmask); else if (rdtgrp->type == RDTMON_GROUP && is_mon_groups(parent_kn, kn->name))
hulk inclusion category: cleanup bugzilla: https://gitee.com/openeuler/kernel/issues/I9PVOZ
--------------------------------
Previous commit ("mpam/resctrl: Fix a deadlock due to inaccurate reference") changed the argument to resctrl_group_kn_lock_live()/ resctrl_group_kn_unlock() within mkdir_resctrl_prepare(). That change resulted in an unused function parameter to mkdir_resctrl_prepare().
Clean up the unused function parameter in mkdir_resctrl_prepare() and its callers resctrl_group_mkdir_mon() and resctrl_group_mkdir_ctrl_mon().
Signed-off-by: Yu Liao liaoyu15@huawei.com --- fs/resctrlfs.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-)
diff --git a/fs/resctrlfs.c b/fs/resctrlfs.c index 74b73eaa13c8..ba40d4e3e851 100644 --- a/fs/resctrlfs.c +++ b/fs/resctrlfs.c @@ -585,7 +585,6 @@ static int find_rdtgrp_allocable_rmid(struct resctrl_group *rdtgrp) }
static int mkdir_resctrl_prepare(struct kernfs_node *parent_kn, - struct kernfs_node *prgrp_kn, const char *name, umode_t mode, enum rdt_group_type rtype, struct resctrl_group **r) { @@ -716,14 +715,12 @@ static void mkdir_resctrl_prepare_clean(struct resctrl_group *rgrp) * to monitor a subset of tasks and cpus in its parent ctrl_mon group. */ static int resctrl_group_mkdir_mon(struct kernfs_node *parent_kn, - struct kernfs_node *prgrp_kn, - const char *name, - umode_t mode) + const char *name, umode_t mode) { struct resctrl_group *rdtgrp, *prgrp; int ret;
- ret = mkdir_resctrl_prepare(parent_kn, prgrp_kn, name, mode, RDTMON_GROUP, + ret = mkdir_resctrl_prepare(parent_kn, name, mode, RDTMON_GROUP, &rdtgrp); if (ret) return ret; @@ -750,14 +747,13 @@ static int resctrl_group_mkdir_mon(struct kernfs_node *parent_kn, * to allocate and monitor resources. */ static int resctrl_group_mkdir_ctrl_mon(struct kernfs_node *parent_kn, - struct kernfs_node *prgrp_kn, const char *name, umode_t mode) { struct resctrl_group *rdtgrp; struct kernfs_node *kn; int ret;
- ret = mkdir_resctrl_prepare(parent_kn, prgrp_kn, name, mode, RDTCTRL_GROUP, + ret = mkdir_resctrl_prepare(parent_kn, name, mode, RDTCTRL_GROUP, &rdtgrp); if (ret) return ret; @@ -822,14 +818,14 @@ static int resctrl_group_mkdir(struct kernfs_node *parent_kn, const char *name, * subdirectory */ if (resctrl_alloc_capable && parent_kn == resctrl_group_default.kn) - return resctrl_group_mkdir_ctrl_mon(parent_kn, parent_kn, name, mode); + return resctrl_group_mkdir_ctrl_mon(parent_kn, name, mode);
/* * If RDT monitoring is supported and the parent directory is a valid * "mon_groups" directory, add a monitoring subdirectory. */ if (resctrl_mon_capable && is_mon_groups(parent_kn, name)) - return resctrl_group_mkdir_mon(parent_kn, parent_kn->parent, name, mode); + return resctrl_group_mkdir_mon(parent_kn, name, mode);
return -EPERM; }
hulk inclusion category: cleanup bugzilla: https://gitee.com/openeuler/kernel/issues/I9NZ3E
--------------------------------
resctrl_group_rm_ctrl() is only called in resctrl_group_rmdir_ctrl(), so merge resctrl_group_rm_ctrl() and resctrl_group_rmdir_ctrl() for the following fix patch. Also do the same on resctrl_group_rm_mon() and resctrl_group_rmdir_mon().
No functional change.
Signed-off-by: Yu Liao liaoyu15@huawei.com --- fs/resctrlfs.c | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-)
diff --git a/fs/resctrlfs.c b/fs/resctrlfs.c index ba40d4e3e851..2dc15f551d8e 100644 --- a/fs/resctrlfs.c +++ b/fs/resctrlfs.c @@ -830,7 +830,7 @@ static int resctrl_group_mkdir(struct kernfs_node *parent_kn, const char *name, return -EPERM; }
-static void resctrl_group_rm_mon(struct resctrl_group *rdtgrp, +static int resctrl_group_rmdir_mon(struct kernfs_node *kn, struct resctrl_group *rdtgrp, cpumask_var_t tmpmask) { struct resctrl_group *prdtgrp = rdtgrp->mon.parent; @@ -861,19 +861,14 @@ static void resctrl_group_rm_mon(struct resctrl_group *rdtgrp, */ WARN_ON(list_empty(&prdtgrp->mon.crdtgrp_list)); list_del(&rdtgrp->mon.crdtgrp_list); -} - -static int resctrl_group_rmdir_mon(struct kernfs_node *kn, struct resctrl_group *rdtgrp, - cpumask_var_t tmpmask) -{ - resctrl_group_rm_mon(rdtgrp, tmpmask);
kernfs_remove(rdtgrp->kn);
return 0; }
-static void resctrl_group_rm_ctrl(struct resctrl_group *rdtgrp, cpumask_var_t tmpmask) +static int resctrl_group_rmdir_ctrl(struct kernfs_node *kn, struct resctrl_group *rdtgrp, + cpumask_var_t tmpmask) { int cpu;
@@ -909,12 +904,6 @@ static void resctrl_group_rm_ctrl(struct resctrl_group *rdtgrp, cpumask_var_t tm free_all_child_rdtgrp(rdtgrp);
list_del(&rdtgrp->resctrl_group_list); -} - -static int resctrl_group_rmdir_ctrl(struct kernfs_node *kn, struct resctrl_group *rdtgrp, - cpumask_var_t tmpmask) -{ - resctrl_group_rm_ctrl(rdtgrp, tmpmask);
kernfs_remove(rdtgrp->kn);
hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I9NZ3E
--------------------------------
Backport the following x86 commit to MPAM to eliminate potential issues:
commit 074fadee59ee ("x86/resctrl: Fix use-after-free due to inaccurate refcount of rdtgroup")
There is a race condition in the following scenario which results in an use-after-free issue when reading a monitoring file and deleting the parent ctrl_mon group concurrently:
Thread 1 calls atomic_inc() to take refcount of rdtgrp and then calls kernfs_break_active_protection() to drop the active reference of kernfs node in rdtgroup_kn_lock_live().
In Thread 2, kernfs_remove() is a blocking routine. It waits on all sub kernfs nodes to drop the active reference when removing all subtree kernfs nodes recursively. Thread 2 could block on kernfs_remove() until Thread 1 calls kernfs_break_active_protection(). Only after kernfs_remove() completes the refcount of rdtgrp could be trusted.
Before Thread 1 calls atomic_inc() and kernfs_break_active_protection(), Thread 2 could call kfree() when the refcount of rdtgrp (sentry) is 0 instead of 1 due to the race.
In Thread 1, in rdtgroup_kn_unlock(), referring to earlier rdtgrp memory (rdtgrp->waitcount) which was already freed in Thread 2 results in use-after-free issue.
Thread 1 (rdtgroup_mondata_show) Thread 2 (rdtgroup_rmdir) -------------------------------- ------------------------- rdtgroup_kn_lock_live /* * kn active protection until * kernfs_break_active_protection(kn) */ rdtgrp = kernfs_to_rdtgroup(kn) rdtgroup_kn_lock_live atomic_inc(&rdtgrp->waitcount) mutex_lock rdtgroup_rmdir_ctrl free_all_child_rdtgrp /* * sentry->waitcount should be 1 * but is 0 now due to the race. */ kfree(sentry)*[1] /* * Only after kernfs_remove() * completes, the refcount of * rdtgrp could be trusted. */ atomic_inc(&rdtgrp->waitcount) /* kn->active-- */ kernfs_break_active_protection(kn) rdtgroup_ctrl_remove rdtgrp->flags = RDT_DELETED /* * Blocking routine, wait for * all sub kernfs nodes to drop * active reference in * kernfs_break_active_protection. */ kernfs_remove(rdtgrp->kn) rdtgroup_kn_unlock mutex_unlock atomic_dec_and_test( &rdtgrp->waitcount) && (flags & RDT_DELETED) kernfs_unbreak_active_protection(kn) kfree(rdtgrp) mutex_lock mon_event_read rdtgroup_kn_unlock mutex_unlock /* * Use-after-free: refer to earlier rdtgrp * memory which was freed in [1]. */ atomic_dec_and_test(&rdtgrp->waitcount) && (flags & RDT_DELETED) /* kn->active++ */ kernfs_unbreak_active_protection(kn) kfree(rdtgrp)
Fix it by moving free_all_child_rdtgrp() to after kernfs_remove() in rdtgroup_rmdir_ctrl() to ensure it has the accurate refcount of rdtgrp.
Fixes: 6065f5513f78 ("resctrlfs: init support resctrlfs") Signed-off-by: Yu Liao liaoyu15@huawei.com --- fs/resctrlfs.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/fs/resctrlfs.c b/fs/resctrlfs.c index 2dc15f551d8e..2c414c71f92f 100644 --- a/fs/resctrlfs.c +++ b/fs/resctrlfs.c @@ -894,19 +894,18 @@ static int resctrl_group_rmdir_ctrl(struct kernfs_node *kn, struct resctrl_group cpumask_or(tmpmask, tmpmask, &rdtgrp->cpu_mask); update_closid_rmid(tmpmask, NULL);
- rdtgrp->flags |= RDT_DELETED; closid_free(rdtgrp->closid.intpartid); rmid_free(rdtgrp->mon.rmid);
+ rdtgrp->flags |= RDT_DELETED; + list_del(&rdtgrp->resctrl_group_list); + + kernfs_remove(rdtgrp->kn); /* * Free all the child monitor group rmids. */ free_all_child_rdtgrp(rdtgrp);
- list_del(&rdtgrp->resctrl_group_list); - - kernfs_remove(rdtgrp->kn); - return 0; }
hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I9RXHK
--------------------------------
We observed the following stack: #0 [ffff80054c9e3af0] __switch_to at ffffa05c1ad69fbc #1 [ffff80054c9e3b40] __schedule at ffffa05c1baf4014 #2 [ffff80054c9e3ba0] __cond_resched at ffffa05c1baf4a70 #3 [ffff80054c9e3bc0] kmem_cache_alloc_trace at ffffa05c1b130584 #4 [ffff80054c9e3c20] __resctrl_group_move_task at ffffa05c1ad9a674 #5 [ffff80054c9e3c70] resctrl_group_rmid_write at ffffa05c1ad9bc40 #6 [ffff80054c9e3cd0] resctrl_group_file_write at ffffa05c1ad986e4
__resctrl_group_move_task() is called by resctrl_group_rmid_write() in atomic context where sleep is prohibited.
Ensure calling context won't sleep by changing allocation mode from GFP_KERNEL to GFP_NOWAIT.
Fixes: e37caef15c18 ("resctrlfs: mpam: Build basic framework for mpam") Signed-off-by: Yu Liao liaoyu15@huawei.com --- arch/arm64/kernel/mpam/mpam_resctrl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/kernel/mpam/mpam_resctrl.c b/arch/arm64/kernel/mpam/mpam_resctrl.c index 544468c4177a..dfbf1e056cc0 100644 --- a/arch/arm64/kernel/mpam/mpam_resctrl.c +++ b/arch/arm64/kernel/mpam/mpam_resctrl.c @@ -1401,7 +1401,7 @@ int __resctrl_group_move_task(struct task_struct *tsk, struct task_move_callback *callback; int ret;
- callback = kzalloc(sizeof(*callback), GFP_KERNEL); + callback = kzalloc(sizeof(*callback), GFP_NOWAIT); if (!callback) return -ENOMEM; callback->work.func = move_myself;
hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I9SXQ8
--------------------------------
According to the comment:
jiff = (sec) * (NSEC_PER_SEC / NSEC_PER_JIFFIE); jiff = ((sec) * ((NSEC_PER_SEC * SCALE)/ NSEC_PER_JIFFIE)) / SCALE; Then we make SCALE a power of two so: jiff = ((sec) * ((NSEC_PER_SEC << SCALE)/ NSEC_PER_JIFFIE)) >> SCALE; Now we define: #define SEC_CONV = ((NSEC_PER_SEC << SCALE)/ NSEC_PER_JIFFIE)) jiff = (sec * SEC_CONV) >> SCALE;
Fix the incorrect seconds to jiffies conversion.
Fixes: 8d7469cd8d3e ("arm64/mpam: Integrate monitor data for Memory Bandwidth if cdp enabled") Signed-off-by: Yu Liao liaoyu15@huawei.com --- arch/arm64/kernel/mpam/mpam_resctrl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/kernel/mpam/mpam_resctrl.c b/arch/arm64/kernel/mpam/mpam_resctrl.c index dfbf1e056cc0..c5316b276d05 100644 --- a/arch/arm64/kernel/mpam/mpam_resctrl.c +++ b/arch/arm64/kernel/mpam/mpam_resctrl.c @@ -467,7 +467,7 @@ static u64 cache_rdmon(struct rdt_domain *d, void *md_priv) * We should judge if return is OK, it is possible affected * by NRDY bit. */ - timeout = READ_ONCE(jiffies) + (1*SEC_CONVERSION); + timeout = READ_ONCE(jiffies) + msecs_to_jiffies(1000); do { if (time_after(READ_ONCE(jiffies), timeout)) { err = -ETIMEDOUT; @@ -508,7 +508,7 @@ static u64 mbw_rdmon(struct rdt_domain *d, void *md_priv) * We should judge if return is OK, it is possible affected * by NRDY bit. */ - timeout = READ_ONCE(jiffies) + (1*SEC_CONVERSION); + timeout = READ_ONCE(jiffies) + msecs_to_jiffies(1000); do { if (time_after(READ_ONCE(jiffies), timeout)) { err = -ETIMEDOUT;
hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I9SXQ8
--------------------------------
resctrl_dom_mon_data() call do_device_sync() wait for other CPU to respond IPI, which is expensive (up to a few ms). resctrl_dom_mon_data() may be called hundreds of times by resctrl_group_mondata_show(), causing soft lockup.
Fix this by adding a cond_resched between each loop.
Do the same for resctrl_group_update_domain_ctrls().
Fixes: 8d7469cd8d3e ("arm64/mpam: Integrate monitor data for Memory Bandwidth if cdp enabled") Signed-off-by: Yu Liao liaoyu15@huawei.com --- arch/arm64/kernel/mpam/mpam_ctrlmon.c | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/arch/arm64/kernel/mpam/mpam_ctrlmon.c b/arch/arm64/kernel/mpam/mpam_ctrlmon.c index 12e188f0b788..3780c0ec0819 100644 --- a/arch/arm64/kernel/mpam/mpam_ctrlmon.c +++ b/arch/arm64/kernel/mpam/mpam_ctrlmon.c @@ -289,6 +289,7 @@ static void resctrl_group_update_domain_ctrls(struct rdtgroup *rdtgrp, resctrl_cdp_mpamid_map_val(entry->closid.reqpartid, cfg[i].conf_type, closid.reqpartid); resctrl_dom_ctrl_config(cdp_both_ctrl, r, dom, ¶); + cond_resched(); } } } @@ -662,6 +663,8 @@ int resctrl_group_mondata_show(struct seq_file *m, void *arg) r->rid), type, md.u.mon);
usage += resctrl_dom_mon_data(r, d, md.priv); + + cond_resched(); } }
反馈: 您发送到kernel@openeuler.org的补丁/补丁集,已成功转换为PR! PR链接地址: https://gitee.com/openeuler/kernel/pulls/8491 邮件列表地址:https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/7...
FeedBack: The patch(es) which you have sent to kernel@openeuler.org mailing list has been converted to a pull request successfully! Pull request link: https://gitee.com/openeuler/kernel/pulls/8491 Mailing list address: https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/7...