OpenVZ Forum


Home » Mailing lists » Devel » Re: [ckrm-tech] [PATCH 7/7] containers (V7): Container interface to nsproxy subsystem
Re: [ckrm-tech] [PATCH 7/7] containers (V7): Container interface to nsproxy subsystem [message #18074] Thu, 05 April 2007 08:01 Go to next message
Paul Menage is currently offline  Paul Menage
Messages: 642
Registered: September 2006
Senior Member
On 4/5/07, Pavel Emelianov <xemul@sw.ru> wrote:
>
> Right now I do not. Calling container_init_eary() is OK from
> my POV. What I do not like is that I have to reinitialize
> container->create() callback.

I don't think you should need to do that. The way cpuset_create()
handles it is for the root cpuset to be statically allocated, so the
code looks like:

	if (!cont->parent) {
		/* This is early initialization for the top container */
		set_container_cs(cont, &top_cpuset);
		top_cpuset.css.container = cont;
		top_cpuset.mems_generation = cpuset_mems_generation++;
		return 0;
	}

        ... other normal code that allocates a cpuset ...

Mildly ugly, but it solves the problem.

Paul
_______________________________________________
Containers mailing list
Containers@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
Re: [ckrm-tech] [PATCH 7/7] containers (V7): Container interface to nsproxy subsystem [message #18100 is a reply to message #18074] Fri, 06 April 2007 12:59 Go to previous message
xemul is currently offline  xemul
Messages: 248
Registered: November 2005
Senior Member
Paul Menage wrote:
> On 4/5/07, Pavel Emelianov <xemul@sw.ru> wrote:
>>
>> Right now I do not. Calling container_init_eary() is OK from
>> my POV. What I do not like is that I have to reinitialize
>> container->create() callback.
> 
> I don't think you should need to do that. The way cpuset_create()
> handles it is for the root cpuset to be statically allocated, so the
> code looks like:
> 
>     if (!cont->parent) {
>         /* This is early initialization for the top container */
>         set_container_cs(cont, &top_cpuset);
>         top_cpuset.css.container = cont;
>         top_cpuset.mems_generation = cpuset_mems_generation++;
>         return 0;
>     }
> 
>        ... other normal code that allocates a cpuset ...
> 
> Mildly ugly, but it solves the problem.

Well, it's less ugly than resetting pointer but it's worse from
performance POV. See, we have an if (xxx) that is true only once
during system lifetime. This is not that good...

Anyway. When are you going to send your patches with containers
and what kernel will it be built upon? I'll try to prepare the RSS
patches soon after this.

> Paul
> 
_______________________________________________
Containers mailing list
Containers@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
Previous Topic: [PATCH 2.6.21-rc6] [netfilter] early_drop imrovement
Next Topic: network namespace website
Goto Forum:
  


Current Time: Tue Oct 07 22:19:47 GMT 2025

Total time taken to generate the page: 0.18645 seconds