All of lore.kernel.org
 help / color / mirror / Atom feed
From: ebiederm@xmission.com (Eric W. Biederman)
To: vatsa@in.ibm.com
Cc: menage@google.com, sam@vilain.net, akpm@linux-foundation.org,
	pj@sgi.com, dev@sw.ru, xemul@sw.ru, serue@us.ibm.com,
	containers@lists.osdl.org, winget@google.com,
	ckrm-tech@lists.sourceforge.net, linux-kernel@vger.kernel.org,
	Balbir Singh <balbir@in.ibm.com>
Subject: Re: [PATCH 1/2] rcfs core patch
Date: Wed, 07 Mar 2007 20:12:00 -0700	[thread overview]
Message-ID: <m1slcg8m4f.fsf@ebiederm.dsl.xmission.com> (raw)
In-Reply-To: <20070301134528.GL15509@in.ibm.com> (Srivatsa Vaddagiri's message of "Thu, 1 Mar 2007 19:15:28 +0530")

Srivatsa Vaddagiri <vatsa@in.ibm.com> writes:

> Heavily based on Paul Menage's (inturn cpuset) work. The big difference
> is that the patch uses task->nsproxy to group tasks for resource control
> purpose (instead of task->containers).
>
> The patch retains the same user interface as Paul Menage's patches. In
> particular, you can have multiple hierarchies, each hierarchy giving a 
> different composition/view of task-groups.
>
> (Ideally this patch should have been split into 2 or 3 sub-patches, but
> will do that on a subsequent version post)

After looking at the discussion that happened immediately after this was
posted this feels like the right general direction to get the different
parties talking to each other.  I'm not convinced about the whole idea
yet but this looks like a step in a useful direction.

I have a big request.

Please next time this kind of patch is posted add a description of
what is happening and why.  I have yet to see people explain why
this is a good idea.  Why the current semantics were chosen.

The review is still largely happening at the why level but no
one is addressing that yet.  So please can we have a why.

I have a question?  What does rcfs look like if we start with
the code that is in the kernel?  That is start with namespaces
and nsproxy and just build a filesystem to display/manipulate them?
With the code built so it will support adding resource controllers
when they are ready?

> Signed-off-by : Srivatsa Vaddagiri <vatsa@in.ibm.com>
> Signed-off-by : Paul Menage <menage@google.com>
>
>
> ---
>
>  linux-2.6.20-vatsa/include/linux/init_task.h |    4 
>  linux-2.6.20-vatsa/include/linux/nsproxy.h   |    5 
>  linux-2.6.20-vatsa/init/Kconfig              |   22 
>  linux-2.6.20-vatsa/init/main.c               |    1 
>  linux-2.6.20-vatsa/kernel/Makefile           |    1 
>
>
> ---
>

> diff -puN include/linux/nsproxy.h~rcfs include/linux/nsproxy.h
> --- linux-2.6.20/include/linux/nsproxy.h~rcfs 2007-03-01 14:20:47.000000000
> +0530
> +++ linux-2.6.20-vatsa/include/linux/nsproxy.h 2007-03-01 14:20:47.000000000
> +0530
> @@ -28,6 +28,10 @@ struct nsproxy {
We probably want to rename this struct task_proxy....
And then we can rename most of the users things like:
dup_task_proxy, clone_task_proxy, get_task_proxy, free_task_proxy,
put_task_proxy, exit_task_proxy, init_task_proxy....

>  	struct ipc_namespace *ipc_ns;
>  	struct mnt_namespace *mnt_ns;
>  	struct pid_namespace *pid_ns;
> +#ifdef CONFIG_RCFS
> +	struct list_head list;

This extra list of nsproxy's is unneeded and a performance problem the
way it is used.  In general we want to talk about the individual resource
controllers not the nsproxy.

> +	void *ctlr_data[CONFIG_MAX_RC_SUBSYS];

I still don't understand why these pointers are so abstract,
and why we need an array lookup into them?


> +#endif
>  };
>  extern struct nsproxy init_nsproxy;
>  
> @@ -35,6 +39,12 @@ struct nsproxy *dup_namespaces(struct ns
>  int copy_namespaces(int flags, struct task_struct *tsk);
>  void get_task_namespaces(struct task_struct *tsk);
>  void free_nsproxy(struct nsproxy *ns);
> +#ifdef CONFIG_RCFS
> +struct nsproxy *find_nsproxy(struct nsproxy *ns);
> +int namespaces_init(void);
> +#else
> +static inline int namespaces_init(void) { return 0;}
> +#endif
>  
>  static inline void put_nsproxy(struct nsproxy *ns)
>  {
> diff -puN /dev/null include/linux/rcfs.h
> --- /dev/null	2006-02-25 03:06:56.000000000 +0530
> +++ linux-2.6.20-vatsa/include/linux/rcfs.h 2007-03-01 14:20:47.000000000 +0530
> @@ -0,0 +1,72 @@
> +#ifndef _LINUX_RCFS_H
> +#define _LINUX_RCFS_H
> +
> +#ifdef CONFIG_RCFS
> +
> +/* struct cftype:
> + *
> + * The files in the container filesystem mostly have a very simple read/write
> + * handling, some common function will take care of it. Nevertheless some cases
> + * (read tasks) are special and therefore I define this structure for every
> + * kind of file.

I'm still inclined to think this should be part of /proc, instead of a purely
separate fs.  But I might be missing something.

Eric

  parent reply	other threads:[~2007-03-08  3:13 UTC|newest]

Thread overview: 125+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-01 13:35 [PATCH 0/2] resource control file system - aka containers on top of nsproxy! Srivatsa Vaddagiri
2007-03-01 13:45 ` [PATCH 1/2] rcfs core patch Srivatsa Vaddagiri
2007-03-01 16:31   ` Serge E. Hallyn
2007-03-01 16:46     ` Srivatsa Vaddagiri
2007-03-02  5:06   ` [ckrm-tech] " Balbir Singh
2007-03-03  9:38     ` Srivatsa Vaddagiri
2007-03-08  3:12   ` Eric W. Biederman [this message]
2007-03-08  9:10     ` Paul Menage
2007-03-09  0:38       ` Herbert Poetzl
2007-03-09  9:07         ` Kirill Korotaev
2007-03-09 13:29           ` Herbert Poetzl
2007-03-09 17:57         ` Srivatsa Vaddagiri
2007-03-10  1:19           ` Herbert Poetzl
2007-03-11 16:36             ` Serge E. Hallyn
2007-03-12 23:16               ` Herbert Poetzl
2007-03-08 10:13     ` Srivatsa Vaddagiri
2007-03-09  0:48       ` Herbert Poetzl
2007-03-09  2:35         ` Paul Jackson
2007-03-09  9:23         ` Kirill Korotaev
2007-03-09  9:38           ` Paul Jackson
2007-03-09 13:21           ` Herbert Poetzl
2007-03-11 17:09             ` Kirill Korotaev
2007-03-12 23:00               ` Herbert Poetzl
2007-03-13  8:28                 ` Kirill Korotaev
2007-03-13 13:55                   ` Herbert Poetzl
2007-03-13 14:11                     ` [ckrm-tech] " Srivatsa Vaddagiri
2007-03-13 15:52                       ` Herbert Poetzl
2007-03-09 18:14         ` Srivatsa Vaddagiri
2007-03-09 19:25           ` Paul Jackson
2007-03-10  1:00             ` Herbert Poetzl
2007-03-10  1:31               ` Paul Jackson
2007-03-10  0:56           ` Herbert Poetzl
2007-03-09 16:16       ` Serge E. Hallyn
2007-03-01 13:50 ` [PATCH 2/2] cpu_accounting controller Srivatsa Vaddagiri
2007-03-01 19:39 ` [PATCH 0/2] resource control file system - aka containers on top of nsproxy! Paul Jackson
2007-03-02 15:45   ` Kirill Korotaev
2007-03-02 16:52     ` Andrew Morton
2007-03-02 17:25       ` Kirill Korotaev
2007-03-03 17:45     ` Herbert Poetzl
2007-03-03 21:22       ` Paul Jackson
2007-03-05 17:47         ` Srivatsa Vaddagiri
2007-03-03  9:36   ` Srivatsa Vaddagiri
2007-03-03 10:21     ` Paul Jackson
2007-03-05 17:02       ` Srivatsa Vaddagiri
2007-03-03 17:32     ` Herbert Poetzl
2007-03-05 17:34       ` [ckrm-tech] " Srivatsa Vaddagiri
2007-03-05 18:39         ` Herbert Poetzl
2007-03-06 10:39           ` Srivatsa Vaddagiri
2007-03-06 13:28             ` Herbert Poetzl
2007-03-06 16:21               ` Srivatsa Vaddagiri
2007-03-07  2:32 ` Paul Menage
2007-03-07 17:30   ` Srivatsa Vaddagiri
2007-03-07 17:29     ` Paul Menage
2007-03-07 17:52       ` [ckrm-tech] " Srivatsa Vaddagiri
2007-03-07 17:32     ` Srivatsa Vaddagiri
2007-03-07 17:43     ` Serge E. Hallyn
2007-03-07 17:46       ` Paul Menage
2007-03-07 23:16         ` Eric W. Biederman
2007-03-08 11:39           ` Srivatsa Vaddagiri
2007-03-07 18:00       ` Srivatsa Vaddagiri
2007-03-07 20:58         ` Serge E. Hallyn
2007-03-07 21:20           ` Paul Menage
2007-03-07 21:59             ` Serge E. Hallyn
2007-03-07 22:13               ` Dave Hansen
2007-03-07 23:13                 ` Eric W. Biederman
2007-03-12 14:11               ` [ckrm-tech] " Srivatsa Vaddagiri
2007-03-07 22:32             ` Eric W. Biederman
2007-03-07 23:18               ` Paul Menage
2007-03-08  0:35                 ` Sam Vilain
2007-03-08  0:42                   ` Paul Menage
2007-03-08  0:53                     ` Sam Vilain
2007-03-08  0:58                       ` [ckrm-tech] " Paul Menage
2007-03-08  1:32                         ` Eric W. Biederman
2007-03-08  1:35                           ` Paul Menage
2007-03-08  2:25                             ` Eric W. Biederman
2007-03-09  0:56                             ` Herbert Poetzl
2007-03-09  0:53                           ` Herbert Poetzl
2007-03-09 18:19                             ` Srivatsa Vaddagiri
2007-03-09 19:36                               ` Paul Jackson
2007-03-09 21:52                               ` Herbert Poetzl
2007-03-09 22:06                                 ` Paul Jackson
2007-03-12 14:01                                   ` Srivatsa Vaddagiri
2007-03-12 15:15                                     ` Srivatsa Vaddagiri
2007-03-12 20:26                                     ` Paul Jackson
2007-03-09  4:30                           ` Paul Jackson
2007-03-08  2:47                         ` Sam Vilain
2007-03-08  2:57                           ` Paul Menage
2007-03-08  3:32                             ` Sam Vilain
2007-03-08  6:10                               ` Matt Helsley
2007-03-08  6:44                                 ` Eric W. Biederman
2007-03-09  1:06                                   ` Herbert Poetzl
2007-03-10  9:06                                     ` Sam Vilain
2007-03-11 21:15                                       ` Paul Jackson
2007-03-12  9:35                                         ` Sam Vilain
2007-03-12 10:00                                         ` Paul Menage
2007-03-12 23:21                                           ` Herbert Poetzl
2007-03-13  2:25                                             ` Paul Menage
2007-03-13 15:57                                               ` Herbert Poetzl
2007-03-09  4:37                                 ` Paul Jackson
2007-03-08  6:32                               ` Eric W. Biederman
2007-03-08  9:10                               ` Paul Menage
2007-03-09 16:50                                 ` Serge E. Hallyn
2007-03-22 14:08                                   ` Srivatsa Vaddagiri
2007-03-22 14:39                                     ` Serge E. Hallyn
2007-03-22 14:56                                       ` Srivatsa Vaddagiri
2007-03-09  4:27                       ` Paul Jackson
2007-03-10  8:52                         ` Sam Vilain
2007-03-10  9:11                           ` Paul Jackson
2007-03-09 16:34             ` Srivatsa Vaddagiri
2007-03-09 16:41               ` [ckrm-tech] " Srivatsa Vaddagiri
2007-03-09 22:09               ` Paul Menage
2007-03-10  2:02                 ` Srivatsa Vaddagiri
2007-03-10  3:19                   ` [ckrm-tech] " Srivatsa Vaddagiri
2007-03-12 15:07                 ` Srivatsa Vaddagiri
2007-03-12 15:56                   ` Serge E. Hallyn
2007-03-12 16:20                     ` Srivatsa Vaddagiri
2007-03-12 17:25                       ` Serge E. Hallyn
2007-03-12 21:15                       ` Sam Vilain
2007-03-12 23:31                       ` Herbert Poetzl
2007-03-13  2:22                         ` Srivatsa Vaddagiri
2007-03-08  0:50     ` Sam Vilain
2007-03-08 11:30       ` Srivatsa Vaddagiri
2007-03-09  1:16         ` Herbert Poetzl
2007-03-09 18:41           ` Srivatsa Vaddagiri
2007-03-10  2:03             ` Herbert Poetzl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m1slcg8m4f.fsf@ebiederm.dsl.xmission.com \
    --to=ebiederm@xmission.com \
    --cc=akpm@linux-foundation.org \
    --cc=balbir@in.ibm.com \
    --cc=ckrm-tech@lists.sourceforge.net \
    --cc=containers@lists.osdl.org \
    --cc=dev@sw.ru \
    --cc=linux-kernel@vger.kernel.org \
    --cc=menage@google.com \
    --cc=pj@sgi.com \
    --cc=sam@vilain.net \
    --cc=serue@us.ibm.com \
    --cc=vatsa@in.ibm.com \
    --cc=winget@google.com \
    --cc=xemul@sw.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.