Skip to contentSkip to conversation

Add a Signal Control Group Subsystem

RFC PATCH Cedric Le Goater 6 participants 8 messages Apr 23, 2008 – Apr 24, 2008 5 messages not in the archive

lore
Share & tools
lore
#3 lore raw
In reply to a message not in the archive

Hello Matt !

Quoted 6 lines

Add a signal control group subsystem that allows us to send signals to all tasks in the control group by writing the desired signal(7) number to the kill file.

NOTE: We don't really need per-cgroup state, but control groups doesn't support stateless subsystems yet.

Quoted 8 lines
---
 include/linux/cgroup_signal.h |   28 +++++++++
 include/linux/cgroup_subsys.h |    6 +
 init/Kconfig                  |    6 +
 kernel/Makefile               |    1 
 kernel/cgroup_signal.c        |  129 ++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 170 insertions(+)

I think there is a small race with new tasks entering the cgroup while it's beeing killed, and a _fork ops would handle that. nop ?

Thanks,

C.

#4 lore raw
In reply to a message not in the archive

Hello Matt !

Quoted 6 lines

Add a signal control group subsystem that allows us to send signals to all tasks in the control group by writing the desired signal(7) number to the kill file.

NOTE: We don't really need per-cgroup state, but control groups doesn't support stateless subsystems yet.

Quoted 8 lines
---
 include/linux/cgroup_signal.h |   28 +++++++++
 include/linux/cgroup_subsys.h |    6 +
 init/Kconfig                  |    6 +
 kernel/Makefile               |    1 
 kernel/cgroup_signal.c        |  129 ++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 170 insertions(+)

I think there is a small race with new tasks entering the cgroup while it's beeing killed, and a _fork ops would handle that. nop ?

Thanks,

C.

#5 lore raw
In reply to a message not in the archive

Hello Matt !

Quoted 6 lines

Add a signal control group subsystem that allows us to send signals to all tasks in the control group by writing the desired signal(7) number to the kill file.

NOTE: We don't really need per-cgroup state, but control groups doesn't support stateless subsystems yet.

Quoted 8 lines
---
 include/linux/cgroup_signal.h |   28 +++++++++
 include/linux/cgroup_subsys.h |    6 +
 init/Kconfig                  |    6 +
 kernel/Makefile               |    1 
 kernel/cgroup_signal.c        |  129 ++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 170 insertions(+)

I think there is a small race with new tasks entering the cgroup while it's beeing killed, and a _fork ops would handle that. nop ?

Thanks,

C.

#7 lore raw
In reply to a message not in the archive
Quoted 18 lines · Cedric Le Goater

Hello Matt !

Quoted 6 lines

Add a signal control group subsystem that allows us to send signals to all tasks in the control group by writing the desired signal(7) number to the kill file.

NOTE: We don't really need per-cgroup state, but control groups doesn't support stateless subsystems yet.

Quoted 8 lines
---
 include/linux/cgroup_signal.h |   28 +++++++++
 include/linux/cgroup_subsys.h |    6 +
 init/Kconfig                  |    6 +
 kernel/Makefile               |    1
 kernel/cgroup_signal.c        |  129 ++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 170 insertions(+)
Quoted 3 lines

I think there is a small race with new tasks entering the cgroup while it's beeing killed, and a _fork ops would handle that. nop ?

I never saw the actual patch (what lists did it go out to?) but I suspect that this is one of those operations that's just going to be inherently racy, and that the API should guarantee to affect all tasks that are members of the group for the entirety of the operation, but with no guarantees about what happens to tasks that enter or leave in the meantime.

Paul

#8 lore raw
In reply to Cedric Le Goater
Quoted 18 lines · Cedric Le Goater

Hello Matt !

Quoted 6 lines

Add a signal control group subsystem that allows us to send signals to all tasks in the control group by writing the desired signal(7) number to the kill file.

NOTE: We don't really need per-cgroup state, but control groups doesn't support stateless subsystems yet.

Quoted 8 lines
---
 include/linux/cgroup_signal.h |   28 +++++++++
 include/linux/cgroup_subsys.h |    6 +
 init/Kconfig                  |    6 +
 kernel/Makefile               |    1
 kernel/cgroup_signal.c        |  129 ++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 170 insertions(+)
Quoted 3 lines

I think there is a small race with new tasks entering the cgroup while it's beeing killed, and a _fork ops would handle that. nop ?

I never saw the actual patch (what lists did it go out to?) but I suspect that this is one of those operations that's just going to be inherently racy, and that the API should guarantee to affect all tasks that are members of the group for the entirety of the operation, but with no guarantees about what happens to tasks that enter or leave in the meantime.

Paul

#9 lore raw
In reply to Cedric Le Goater
Quoted 18 lines · Cedric Le Goater

Hello Matt !

Quoted 6 lines

Add a signal control group subsystem that allows us to send signals to all tasks in the control group by writing the desired signal(7) number to the kill file.

NOTE: We don't really need per-cgroup state, but control groups doesn't support stateless subsystems yet.

Quoted 8 lines
---
 include/linux/cgroup_signal.h |   28 +++++++++
 include/linux/cgroup_subsys.h |    6 +
 init/Kconfig                  |    6 +
 kernel/Makefile               |    1
 kernel/cgroup_signal.c        |  129 ++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 170 insertions(+)
Quoted 3 lines

I think there is a small race with new tasks entering the cgroup while it's beeing killed, and a _fork ops would handle that. nop ?

I never saw the actual patch (what lists did it go out to?) but I suspect that this is one of those operations that's just going to be inherently racy, and that the API should guarantee to affect all tasks that are members of the group for the entirety of the operation, but with no guarantees about what happens to tasks that enter or leave in the meantime.

Paul

#10 lore raw
Quoted 19 lines · Paul Menage
Quoted 18 lines · Cedric Le Goater

Hello Matt !

Quoted 14 lines

Add a signal control group subsystem that allows us to send signals to all tasks in the control group by writing the desired signal(7) number to the kill file.

NOTE: We don't really need per-cgroup state, but control groups doesn't support stateless subsystems yet.

---
 include/linux/cgroup_signal.h |   28 +++++++++
 include/linux/cgroup_subsys.h |    6 +
 init/Kconfig                  |    6 +
 kernel/Makefile               |    1
 kernel/cgroup_signal.c        |  129 ++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 170 insertions(+)
Quoted 5 lines
Quoted 3 lines

I think there is a small race with new tasks entering the cgroup while it's beeing killed, and a _fork ops would handle that. nop ?

I never saw the actual patch (what lists did it go out to?) but I

Hi Paul,

Sorry about this. MTA issues again :(. I think I've gotten them fixed
*this* time. I've resent them and you should have received your own copy this time. Please let me know if you still aren't receiving them.

Cheers,
-Matt

#12 lore raw
In reply to a message not in the archive
Quoted 19 lines · Paul Menage
Quoted 18 lines · Cedric Le Goater

Hello Matt !

Quoted 14 lines

Add a signal control group subsystem that allows us to send signals to all tasks in the control group by writing the desired signal(7) number to the kill file.

NOTE: We don't really need per-cgroup state, but control groups doesn't support stateless subsystems yet.

---
 include/linux/cgroup_signal.h |   28 +++++++++
 include/linux/cgroup_subsys.h |    6 +
 init/Kconfig                  |    6 +
 kernel/Makefile               |    1
 kernel/cgroup_signal.c        |  129 ++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 170 insertions(+)
Quoted 5 lines
Quoted 3 lines

I think there is a small race with new tasks entering the cgroup while it's beeing killed, and a _fork ops would handle that. nop ?

I never saw the actual patch (what lists did it go out to?) but I

Hi Paul,

Sorry about this. MTA issues again :(. I think I've gotten them fixed
*this* time. I've resent them and you should have received your own copy this time. Please let me know if you still aren't receiving them.

Cheers,
-Matt