mirror of https://github.com/torvalds/linux.git
sched_ext: Use kvfree_rcu() to release per-cpu ksyncs object
The free_kick_syncs_rcu() rcu-callback only invoke kvfree() to release per-cpu ksyncs object, this can use kvfree_rcu() replace call_rcu() to release per-cpu ksyncs object in the free_kick_syncs(). Signed-off-by: Zqiang <qiang.zhang@linux.dev> Signed-off-by: Tejun Heo <tj@kernel.org>
This commit is contained in:
parent
1dcb98bbb7
commit
348d3c587a
|
|
@ -4161,13 +4161,6 @@ static const char *scx_exit_reason(enum scx_exit_kind kind)
|
|||
}
|
||||
}
|
||||
|
||||
static void free_kick_syncs_rcu(struct rcu_head *rcu)
|
||||
{
|
||||
struct scx_kick_syncs *ksyncs = container_of(rcu, struct scx_kick_syncs, rcu);
|
||||
|
||||
kvfree(ksyncs);
|
||||
}
|
||||
|
||||
static void free_kick_syncs(void)
|
||||
{
|
||||
int cpu;
|
||||
|
|
@ -4178,7 +4171,7 @@ static void free_kick_syncs(void)
|
|||
|
||||
to_free = rcu_replace_pointer(*ksyncs, NULL, true);
|
||||
if (to_free)
|
||||
call_rcu(&to_free->rcu, free_kick_syncs_rcu);
|
||||
kvfree_rcu(to_free, rcu);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue