Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
58814bae
Commit
58814bae
authored
Jul 25, 2009
by
Thomas Gleixner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sched: Convert cgroups release_list_lock to atomic_spinlock
Signed-off-by:
Thomas Gleixner
<
tglx@linutronix.de
>
parent
0fc7741c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
kernel/cgroup.c
kernel/cgroup.c
+9
-9
No files found.
kernel/cgroup.c
View file @
58814bae
...
...
@@ -188,7 +188,7 @@ list_for_each_entry(_root, &roots, root_list)
/* the list of cgroups eligible for automatic release. Protected by
* release_list_lock */
static
LIST_HEAD
(
release_list
);
static
DEFINE_SPINLOCK
(
release_list_lock
);
static
DEFINE_
ATOMIC_
SPINLOCK
(
release_list_lock
);
static
void
cgroup_release_agent
(
struct
work_struct
*
work
);
static
DECLARE_WORK
(
release_agent_work
,
cgroup_release_agent
);
static
void
check_for_release
(
struct
cgroup
*
cgrp
);
...
...
@@ -2733,11 +2733,11 @@ again:
finish_wait
(
&
cgroup_rmdir_waitq
,
&
wait
);
clear_bit
(
CGRP_WAIT_ON_RMDIR
,
&
cgrp
->
flags
);
spin_lock
(
&
release_list_lock
);
atomic_
spin_lock
(
&
release_list_lock
);
set_bit
(
CGRP_REMOVED
,
&
cgrp
->
flags
);
if
(
!
list_empty
(
&
cgrp
->
release_list
))
list_del
(
&
cgrp
->
release_list
);
spin_unlock
(
&
release_list_lock
);
atomic_
spin_unlock
(
&
release_list_lock
);
cgroup_lock_hierarchy
(
cgrp
->
root
);
/* delete this cgroup from parent->children */
...
...
@@ -3273,13 +3273,13 @@ static void check_for_release(struct cgroup *cgrp)
* already queued for a userspace notification, queue
* it now */
int
need_schedule_work
=
0
;
spin_lock
(
&
release_list_lock
);
atomic_
spin_lock
(
&
release_list_lock
);
if
(
!
cgroup_is_removed
(
cgrp
)
&&
list_empty
(
&
cgrp
->
release_list
))
{
list_add
(
&
cgrp
->
release_list
,
&
release_list
);
need_schedule_work
=
1
;
}
spin_unlock
(
&
release_list_lock
);
atomic_
spin_unlock
(
&
release_list_lock
);
if
(
need_schedule_work
)
schedule_work
(
&
release_agent_work
);
}
...
...
@@ -3326,7 +3326,7 @@ static void cgroup_release_agent(struct work_struct *work)
{
BUG_ON
(
work
!=
&
release_agent_work
);
mutex_lock
(
&
cgroup_mutex
);
spin_lock
(
&
release_list_lock
);
atomic_
spin_lock
(
&
release_list_lock
);
while
(
!
list_empty
(
&
release_list
))
{
char
*
argv
[
3
],
*
envp
[
3
];
int
i
;
...
...
@@ -3335,7 +3335,7 @@ static void cgroup_release_agent(struct work_struct *work)
struct
cgroup
,
release_list
);
list_del_init
(
&
cgrp
->
release_list
);
spin_unlock
(
&
release_list_lock
);
atomic_
spin_unlock
(
&
release_list_lock
);
pathbuf
=
kmalloc
(
PAGE_SIZE
,
GFP_KERNEL
);
if
(
!
pathbuf
)
goto
continue_free
;
...
...
@@ -3365,9 +3365,9 @@ static void cgroup_release_agent(struct work_struct *work)
continue_free:
kfree
(
pathbuf
);
kfree
(
agentbuf
);
spin_lock
(
&
release_list_lock
);
atomic_
spin_lock
(
&
release_list_lock
);
}
spin_unlock
(
&
release_list_lock
);
atomic_
spin_unlock
(
&
release_list_lock
);
mutex_unlock
(
&
cgroup_mutex
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment