Messages in this thread | | | Date | Thu, 10 Jul 2008 14:41:42 -0400 | From | Vivek Goyal <> | Subject | Re: [RFC] How to handle the rules engine for cgroups |
| |
On Thu, Jul 10, 2008 at 10:39:28AM -0700, Ulrich Drepper wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Rik van Riel wrote: > > One easy way is to have a "migrate on exec" option added to the > > process group code. > > That's going to be ugly because the exec functions are signal-safe. > I.e., they can happen at any time. This would mean that one always has > to set the migration policy before every exec call and that there must > be a way to retrieve the currently selected policy so that it can > potentially be restored. This policy must be a thread property, not a > process property. >
Sorry, I did not understand exactly what's the problem with signal safe exec function. Before exec, we should be able to determine the migration policy related to process/thread (either by reading file or something else etc). Set the policy through cgroup file system. If exec fails for some reason, we just need to go back to cgroup file system to undo the effect of setting migration policy previously set for that thread.
Thanks Vivek
| |