On Thu, Oct 17, 2013 at 5:33 AM, Stanislav Fomichev
<stfomic...@yandex-team.ru> wrote:
> Kernel may be configured with different options (like swap) and may or
> may not have some group options. This commit adds possibility to use
> common cgconfig.conf between these machines with different compiled options.
> We still print a warning to the log so user is still aware that
> something went wrong.
>

I feel very nervous with this one. Let's say the setup is for cpu,
with nested groups such a and a/b. What if something fails to be set
in a, or a/b which then causes problems with containment/other groups.
You would be asking for the user to check whether cgconfigparser
actually succeeded or not. That sounds like a regression to me.

thanks!
Dhaval

> Signed-off-by: Stanislav Fomichev <stfomic...@yandex-team.ru>
> ---
>  src/config.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/src/config.c b/src/config.c
> index f2a9e54a8971..187b988f8bef 100644
> --- a/src/config.c
> +++ b/src/config.c
> @@ -741,6 +741,14 @@ static int cgroup_config_create_groups(void)
>                 error = cgroup_create_cgroup(cgroup, 0);
>                 cgroup_dbg("creating group %s, error %d\n", cgroup->name,
>                         error);
> +
> +               /* if for some reason we couldn't set group value, just
> +                * skip it with a warning */
> +               if (error == ECGCANTSETVALUE) {
> +                       error = 0;
> +                       continue;
> +               }
> +
>                 if (error)
>                         return error;
>         }
> --
> 1.8.1.2
>

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk
_______________________________________________
Libcg-devel mailing list
Libcg-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libcg-devel

Reply via email to