mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-12-29 09:16:33 +00:00
cgroup/cpuset: add callback_lock helper
To modify cpuset, both cpuset_mutex and callback_lock are needed. Add helpers for cpuset-v1 to get callback_lock. Signed-off-by: Chen Ridong <chenridong@huawei.com> Acked-by: Waiman Long <longman@redhat.com> Signed-off-by: Tejun Heo <tj@kernel.org>
This commit is contained in:
parent
90eec9548d
commit
530020f28f
@ -239,6 +239,8 @@ static inline int is_spread_slab(const struct cpuset *cs)
|
||||
}
|
||||
|
||||
void rebuild_sched_domains_locked(void);
|
||||
void callback_lock_irq(void);
|
||||
void callback_unlock_irq(void);
|
||||
|
||||
/*
|
||||
* cpuset-v1.c
|
||||
|
@ -275,6 +275,16 @@ void cpuset_unlock(void)
|
||||
|
||||
static DEFINE_SPINLOCK(callback_lock);
|
||||
|
||||
void callback_lock_irq(void)
|
||||
{
|
||||
spin_lock_irq(&callback_lock);
|
||||
}
|
||||
|
||||
void callback_unlock_irq(void)
|
||||
{
|
||||
spin_unlock_irq(&callback_lock);
|
||||
}
|
||||
|
||||
static struct workqueue_struct *cpuset_migrate_mm_wq;
|
||||
|
||||
static DECLARE_WAIT_QUEUE_HEAD(cpuset_attach_wq);
|
||||
|
Loading…
Reference in New Issue
Block a user