Re: [RFC] How to handle the rules engine for cgroups

From: Vivek Goyal
Date: Thu Jul 10 2008 - 14:49:32 EST


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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/