[Devel] [PATCH 2/2] mm: incorrect direct io error handling (v6)

2007-03-11 Thread Dmitriy Monakhov
I realy don't want to be annoying by sending this patcheset over and over again, i just want the issue to be solved. If anyone think this solution is realy cappy, please comment what exectly is bad. Thank you. Changes: - patch was split in two patches. - comments added. I think now it is clear

[Devel] [PATCH 1/2] mm: move common segment checks to separate helper function (v6)

2007-03-11 Thread Dmitriy Monakhov
I realy don't want to be annoying by sending this patcheset over and over again. If anyone think this patch is realy cappy, please comment what exectly is bad. Thank you. Changes: - patch was split in two patches. - comments added. I think now it is clearly describe things. - make generic_s

[Devel] Re: [PATCH] ext3: dirindex error pointer issues (b)

2007-03-11 Thread Dmitriy Monakhov
Dmitriy Monakhov <[EMAIL PROTECTED]> writes: > - ext3_dx_find_entry() exit with out setting proper error pointer > - do_split() exit with out setting proper error pointer >it is realy painful because many callers contain folowing code: >de = do_split(handle,dir, &bh, frame, &hinf

[Devel] Re: [RFC][PATCH 1/7] Resource counters

2007-03-11 Thread Herbert Poetzl
On Sun, Mar 11, 2007 at 01:00:15PM -0600, Eric W. Biederman wrote: > Herbert Poetzl <[EMAIL PROTECTED]> writes: > > > > > Linux-VServer does the accounting with atomic counters, > > so that works quite fine, just do the checks at the > > beginning of whatever resource allocation and the > > accoun

[Devel] Re: [RFC][PATCH 2/7] RSS controller core

2007-03-11 Thread Herbert Poetzl
On Sun, Mar 11, 2007 at 04:51:11AM -0800, Andrew Morton wrote: > > On Sun, 11 Mar 2007 15:26:41 +0300 Kirill Korotaev <[EMAIL PROTECTED]> > > wrote: > > Andrew Morton wrote: > > > On Tue, 06 Mar 2007 17:55:29 +0300 > > > Pavel Emelianov <[EMAIL PROTECTED]> wrote: > > > > > > > > >>+struct rss_co

[Devel] Re: [RFC][PATCH 2/7] RSS controller core

2007-03-11 Thread Herbert Poetzl
On Sun, Mar 11, 2007 at 06:04:28PM +0300, Pavel Emelianov wrote: > Herbert Poetzl wrote: > > On Sun, Mar 11, 2007 at 12:08:16PM +0300, Pavel Emelianov wrote: > >> Herbert Poetzl wrote: > >>> On Tue, Mar 06, 2007 at 02:00:36PM -0800, Andrew Morton wrote: > On Tue, 06 Mar 2007 17:55:29 +0300 > >

[Devel] Re: [RFC][PATCH 1/6] Add struct pid_nr

2007-03-11 Thread Eric W. Biederman
"Serge E. Hallyn" <[EMAIL PROTECTED]> writes: >> A better way to put this is that we already have a lock that attach_pid >> and detach_pid use. So we don't need another one for what should be >> a very rare case. > > I think we'd at least need rcu if we supported unshare. We might. >> I don't t

[Devel] Re: [ckrm-tech] [PATCH 0/2] resource control file system - aka containers on top of nsproxy!

2007-03-11 Thread Paul Jackson
Sam, responding to Herbert: > > from my personal PoV the following would be fine: > > > > spaces (for the various 'spaces') > >... > > container (for resource accounting/limits) > >... > > I like these a lot ... Hmmm ... ok ... Let me see if I understand this. We have actors, known as

[Devel] Re: [RFC][PATCH 1/6] Add struct pid_nr

2007-03-11 Thread Serge E. Hallyn
Quoting Eric W. Biederman ([EMAIL PROTECTED]): > "Serge E. Hallyn" <[EMAIL PROTECTED]> writes: > > >> > +int attach_pid_nr(struct pid *pid, struct pid_nr *pid_nr) > >> > +{ > >> > +spin_lock(&pid->lock); > >> > +hlist_add_head_rcu(&pid_nr->node, &pid->pid_nrs); > >> > +spin

[Devel] Re: [ckrm-tech] [PATCH 1/7] containers (V7): Generic container system abstracted from cpusets code

2007-03-11 Thread Paul Jackson
vatsa wrote: > Yes, that way only the hierarchy hosting cpusets takes the hit of > double-locking. cpuset_subsys->create/destroy can take this additional lock > inside cpuset.c. The primary reason for the cpuset double locking, as I recall, was because cpusets needs to access cpusets inside the m

[Devel] Re: [RFC] ns containers (v2): namespace entering

2007-03-11 Thread Eric W. Biederman
Herbert Poetzl <[EMAIL PROTECTED]> writes: > > sorry for the late answer, I almost missed that one ... > > yes, that sounds like an acceptable alternative, but > it might give some interesting issues with references > to devices ... for example: > > you mount a filesystem inside a namespace, so t

[Devel] Re: [RFC][PATCH 2/7] RSS controller core

2007-03-11 Thread Eric W. Biederman
Andrew Morton <[EMAIL PROTECTED]> writes: > Yep. Straightforward machine partitioning. An attractive thing is that it > 100% reuses existing page reclaim, unaltered. And misses every resource sharing opportunity in sight. Except for filtering the which pages are eligible for reclaim an RSS lim

[Devel] Re: [RFC][PATCH 4/7] RSS accounting hooks over the code

2007-03-11 Thread Eric W. Biederman
Pavel Emelianov <[EMAIL PROTECTED]> writes: > Pages are charged to their first touchers which are > determined using pages' mapcount manipulations in > rmap calls. NAK pages should be charged to every rss group whose mm_struct they are mapped into. Eric __

[Devel] Re: [RFC][PATCH 3/7] Data structures changes for RSS accounting

2007-03-11 Thread Eric W. Biederman
Pavel Emelianov <[EMAIL PROTECTED]> writes: > Adds needed pointers to mm_struct and page struct, > places hooks to core code for mm_struct initialization > and hooks in container_init_early() to preinitialize > RSS accounting subsystem. An extra pointer in struct page is unlikely to fly. Both bec

[Devel] Re: [RFC][PATCH 1/7] Resource counters

2007-03-11 Thread Eric W. Biederman
Herbert Poetzl <[EMAIL PROTECTED]> writes: > > Linux-VServer does the accounting with atomic counters, > so that works quite fine, just do the checks at the > beginning of whatever resource allocation and the > accounting once the resource is acquired ... Atomic operations versus locks is only a

[Devel] Re: [RFC][PATCH 2/7] RSS controller core

2007-03-11 Thread Balbir Singh
On 3/11/07, Andrew Morton <[EMAIL PROTECTED]> wrote: > On Sun, 11 Mar 2007 15:26:41 +0300 Kirill Korotaev <[EMAIL PROTECTED]> wrote: > Andrew Morton wrote: > > On Tue, 06 Mar 2007 17:55:29 +0300 > > Pavel Emelianov <[EMAIL PROTECTED]> wrote: > > > > > >>+struct rss_container { > >>+ struct res_

[Devel] Re: [RFC][PATCH 4/6] Initialize struct pid_nr for swapper

2007-03-11 Thread Eric W. Biederman
[EMAIL PROTECTED] writes: > From: Sukadev Bhattiprolu <[EMAIL PROTECTED]> > Subject: [RFC][PATCH 4/6] Initialize struct pid_nr for swapper. > > Statically initialize a struct pid_nr for the swapper process. I see the sense in this bit but where does this come up? That is can we get away without h

[Devel] Re: [RFC][PATCH 4/6] Initialize struct pid_nr for swapper

2007-03-11 Thread Eric W. Biederman
Herbert Poetzl <[EMAIL PROTECTED]> writes: > okay, then please lets make sure that this actually > works, because I think it might solve most of the > lightweight guest issues the suggested pid spaces > would introduce ... > > I tried that some time back, but the procfs really > provides _a lot_ o

[Devel] Re: [RFC][PATCH 1/6] Add struct pid_nr

2007-03-11 Thread Eric W. Biederman
"Serge E. Hallyn" <[EMAIL PROTECTED]> writes: >> > +int attach_pid_nr(struct pid *pid, struct pid_nr *pid_nr) >> > +{ >> > + spin_lock(&pid->lock); >> > + hlist_add_head_rcu(&pid_nr->node, &pid->pid_nrs); >> > + spin_unlock(&pid->lock); >> >> struct pid doesn't have a lock member. >> >> We sh

[Devel] Re: [RFC][PATCH 5/6] Define helper functions to unshare pid namespace

2007-03-11 Thread Eric W. Biederman
"Serge E. Hallyn" <[EMAIL PROTECTED]> writes: > If we don't do that, then the session and pgrp leaders need to get > pulled into the new namespace. > > Previous versions did that, and eventually we want to support that > again, but for now to keep the rfc patches simpler this seemed the > better

[Devel] Re: [RFC][PATCH 3/5] Use pid namespace from struct pid_nrs list

2007-03-11 Thread Eric W. Biederman
"Serge E. Hallyn" <[EMAIL PROTECTED]> writes: > Quoting Eric W. Biederman ([EMAIL PROTECTED]): >> [EMAIL PROTECTED] writes: >> >> > From: Sukadev Bhattiprolu <[EMAIL PROTECTED]> >> > Subject: [RFC][PATCH 3/5] Use pid namespace from struct pid_nrs list >> > >> > Stop using task->nsproxy->pid_ns.

[Devel] Re: Pid namespace patchsets review

2007-03-11 Thread Eric W. Biederman
"Serge E. Hallyn" <[EMAIL PROTECTED]> writes: > If we're going to put the resource stuff in, then I agree let's rename. > If we stick to this being a namespace proxy (my preference) then calling > it nsproxy is more accurate. Sounds like a reasonable criteria. > (I can't keep up with that thread

[Devel] Re: [PATCH 1/2] rcfs core patch

2007-03-11 Thread Kirill Korotaev
Herbert, > sorry, I'm not in the lucky position that I get payed > for sending patches to LKML, so I have to think twice > before I invest time in coding up extra patches ... > > i.e. you will have to live with my comments for now looks like you have no better argurments then that... >>Looks lik

[Devel] Re: [PATCH 1/2] rcfs core patch

2007-03-11 Thread Serge E. Hallyn
Quoting Herbert Poetzl ([EMAIL PROTECTED]): > On Fri, Mar 09, 2007 at 11:27:07PM +0530, Srivatsa Vaddagiri wrote: > > On Fri, Mar 09, 2007 at 01:38:19AM +0100, Herbert Poetzl wrote: > > > > 2) you allow a task to selectively reshare namespaces/subsystems with > > > >another task, i.e. you can u

Re: [Devel] VPS CPU stats

2007-03-11 Thread Kirill Korotaev
Here was a thread related to this: http://forum.openvz.org/index.php?t=tree&th=479&mid=2771&&rev=&reveal= Thanks, Kirill Shuveb Hussain wrote: > Hi, > > Is there a way to obtain the current CPU utilization for a particular VPS? > How do I figure out CPU utilization: > 1. utilization with refere

[Devel] Re: [RFC][PATCH 1/6] Add struct pid_nr

2007-03-11 Thread Serge E. Hallyn
Quoting Eric W. Biederman ([EMAIL PROTECTED]): > [EMAIL PROTECTED] writes: > > > From: Cedric Le Goater <[EMAIL PROTECTED]> > > Subject: [RFC][PATCH 1/6] Add struct pid_nr > > > > Define struct pid_nr and some helper functions that will be used in > > subsequent patches. > > > > Changelog: > >

[Devel] Re: [RFC][PATCH 2/7] RSS controller core

2007-03-11 Thread Pavel Emelianov
Herbert Poetzl wrote: > On Sun, Mar 11, 2007 at 12:08:16PM +0300, Pavel Emelianov wrote: >> Herbert Poetzl wrote: >>> On Tue, Mar 06, 2007 at 02:00:36PM -0800, Andrew Morton wrote: On Tue, 06 Mar 2007 17:55:29 +0300 Pavel Emelianov <[EMAIL PROTECTED]> wrote: > +struct rss_contain

[Devel] Re: [RFC][PATCH 4/6] Initialize struct pid_nr for swapper

2007-03-11 Thread Herbert Poetzl
On Sun, Mar 11, 2007 at 05:27:59AM -0600, Eric W. Biederman wrote: > Herbert Poetzl <[EMAIL PROTECTED]> writes: > > > On Fri, Mar 09, 2007 at 07:59:24PM -0800, [EMAIL PROTECTED] wrote: > >> > >> From: Sukadev Bhattiprolu <[EMAIL PROTECTED]> > >> Subject: [RFC][PATCH 4/6] Initialize struct pid_nr

[Devel] Re: [RFC][PATCH 2/7] RSS controller core

2007-03-11 Thread Herbert Poetzl
On Sun, Mar 11, 2007 at 12:08:16PM +0300, Pavel Emelianov wrote: > Herbert Poetzl wrote: >> On Tue, Mar 06, 2007 at 02:00:36PM -0800, Andrew Morton wrote: >>> On Tue, 06 Mar 2007 17:55:29 +0300 >>> Pavel Emelianov <[EMAIL PROTECTED]> wrote: >>> +struct rss_container { + struct res_counte

[Devel] Re: Pid namespace patchsets review

2007-03-11 Thread Herbert Poetzl
On Sat, Mar 10, 2007 at 06:57:13PM -0700, Eric W. Biederman wrote: > Herbert Poetzl <[EMAIL PROTECTED]> writes: > > > IMHO not the best idea, mainly because both OpenVZ > > and Linux-VServer will end up either duplicating > > the pid code or using the incomplete (broken) version > > which probabl

[Devel] Re: Pid namespace patchsets review

2007-03-11 Thread Serge E. Hallyn
Quoting Eric W. Biederman ([EMAIL PROTECTED]): > > It is good to see these patches are starting to come together. > > Be patient a good review is going to take me a little bit. > > A couple of immediate things I see that would be nice to address before > we aim at merging these patches upstream.

[Devel] Re: [RFC][PATCH 5/6] Define helper functions to unshare pid namespace

2007-03-11 Thread Serge E. Hallyn
Quoting Eric W. Biederman ([EMAIL PROTECTED]): > [EMAIL PROTECTED] writes: > > > From: Sukadev Bhattiprolu <[EMAIL PROTECTED]> > > Subject: [RFC][PATCH 5/6] Define helper functions to unshare pid namespace > > > > Define clone_pid_ns() and unshare_pid_ns() functions that will be > > used in the ne

[Devel] Re: [RFC][PATCH 3/5] Use pid namespace from struct pid_nrs list

2007-03-11 Thread Serge E. Hallyn
Quoting Eric W. Biederman ([EMAIL PROTECTED]): > [EMAIL PROTECTED] writes: > > > From: Sukadev Bhattiprolu <[EMAIL PROTECTED]> > > Subject: [RFC][PATCH 3/5] Use pid namespace from struct pid_nrs list > > > > Stop using task->nsproxy->pid_ns. Use pid_namespace from pid->pid_nrs > > list instead. >

[Devel] Re: [RFC][PATCH 2/7] RSS controller core

2007-03-11 Thread Andrew Morton
> On Sun, 11 Mar 2007 15:26:41 +0300 Kirill Korotaev <[EMAIL PROTECTED]> wrote: > Andrew Morton wrote: > > On Tue, 06 Mar 2007 17:55:29 +0300 > > Pavel Emelianov <[EMAIL PROTECTED]> wrote: > > > > > >>+struct rss_container { > >>+ struct res_counter res; > >>+ struct list_head page_list; > >>

[Devel] Re: [RFC][PATCH 3/5] Use pid namespace from struct pid_nrs list

2007-03-11 Thread Eric W. Biederman
[EMAIL PROTECTED] writes: > From: Sukadev Bhattiprolu <[EMAIL PROTECTED]> > Subject: [RFC][PATCH 3/5] Use pid namespace from struct pid_nrs list > > Stop using task->nsproxy->pid_ns. Use pid_namespace from pid->pid_nrs > list instead. > > To simplify error handling, this patch moves processing of

[Devel] Re: [RFC][PATCH 2/7] RSS controller core

2007-03-11 Thread Kirill Korotaev
Andrew Morton wrote: > On Tue, 06 Mar 2007 17:55:29 +0300 > Pavel Emelianov <[EMAIL PROTECTED]> wrote: > > >>+struct rss_container { >>+ struct res_counter res; >>+ struct list_head page_list; >>+ struct container_subsys_state css; >>+}; >>+ >>+struct page_container { >>+ struct p

[Devel] Re: [RFC][PATCH 6/6]: Enable unsharing pid namespace.

2007-03-11 Thread Eric W. Biederman
[EMAIL PROTECTED] writes: > From: Cedric Le Goater <[EMAIL PROTECTED]> > Subject: [RFC][PATCH 6/6]: Enable unsharing pid namespace. > > Enable unsharing of pid namespace - i.e allow creating and using > a new pid namespace and attaching multiple struct pid_nrs per > process, one for each namespace

[Devel] Re: [RFC][PATCH 5/6] Define helper functions to unshare pid namespace

2007-03-11 Thread Eric W. Biederman
[EMAIL PROTECTED] writes: > From: Sukadev Bhattiprolu <[EMAIL PROTECTED]> > Subject: [RFC][PATCH 5/6] Define helper functions to unshare pid namespace > > Define clone_pid_ns() and unshare_pid_ns() functions that will be > used in the next patch to unshare pid namespace. > > Changelog: > -

[Devel] Re: [RFC][PATCH 3/6] pid namespace : use struct pid_nr

2007-03-11 Thread Eric W. Biederman
[EMAIL PROTECTED] writes: > From: Cedric Le Goater <[EMAIL PROTECTED]> > Subject: [RFC][PATCH 3/6] pid namespace : use struct pid_nr > > Allocate and attach a struct pid nr to the struct pid. When freeing the > pid, free the attached struct pid nrs. > > Changelog: > - [Serge Hallyn's comment

[Devel] Re: [RFC][PATCH 1/6] Add struct pid_nr

2007-03-11 Thread Eric W. Biederman
[EMAIL PROTECTED] writes: > From: Cedric Le Goater <[EMAIL PROTECTED]> > Subject: [RFC][PATCH 1/6] Add struct pid_nr > > Define struct pid_nr and some helper functions that will be used in > subsequent patches. > > Changelog: > - [Serge Hallyn comment]: Remove (!pid_nr) check in free_pid_nr(

[Devel] Re: [RFC][PATCH 4/6] Initialize struct pid_nr for swapper

2007-03-11 Thread Eric W. Biederman
Herbert Poetzl <[EMAIL PROTECTED]> writes: > On Fri, Mar 09, 2007 at 07:59:24PM -0800, [EMAIL PROTECTED] wrote: >> >> From: Sukadev Bhattiprolu <[EMAIL PROTECTED]> >> Subject: [RFC][PATCH 4/6] Initialize struct pid_nr for swapper. >> >> Statically initialize a struct pid_nr for the swapper proce

[Devel] Re: [RFC][PATCH 0/6] Allow unsharing pid namespace

2007-03-11 Thread Eric W. Biederman
[EMAIL PROTECTED] writes: > From: Sukadev Bhattiprolu <[EMAIL PROTECTED]> > Subject: [RFC][PATCH 0/6] Allow unsharing pid namespace. > > This patchset defines a struct pid_nr and uses this to allow > processes to unshare their pid namespace. > > struct pid_nr will hold [pid value, namespace] pair

[Devel] Re: [RFC][PATCH 2/7] RSS controller core

2007-03-11 Thread Pavel Emelianov
Herbert Poetzl wrote: > On Tue, Mar 06, 2007 at 02:00:36PM -0800, Andrew Morton wrote: >> On Tue, 06 Mar 2007 17:55:29 +0300 >> Pavel Emelianov <[EMAIL PROTECTED]> wrote: >> >>> +struct rss_container { >>> + struct res_counter res; >>> + struct list_head page_list; >>> + struct container_subs

[Devel] Re: [RFC][PATCH 1/7] Resource counters

2007-03-11 Thread Pavel Emelianov
Herbert Poetzl wrote: > On Wed, Mar 07, 2007 at 10:19:05AM +0300, Pavel Emelianov wrote: >> Balbir Singh wrote: >>> Pavel Emelianov wrote: Introduce generic structures and routines for resource accounting. Each resource accounting container is supposed to aggregate it, cont

[Devel] Re: [RFC][PATCH 5/7] Per-container OOM killer and page reclamation

2007-03-11 Thread Pavel Emelianov
Balbir Singh wrote: > Hi, Pavel, > > Please find my patch to add LRU behaviour to your latest RSS controller. Thanks for participation and additional testing :) I'll include this into next generation of patches. > Balbir Singh > Linux Technology Center > IBM, ISTL > > > ---

[Devel] Re: [RFC][PATCH 6/7] Account for the number of tasks within container

2007-03-11 Thread Pavel Emelianov
Paul Menage wrote: > On 3/6/07, Pavel Emelianov <[EMAIL PROTECTED]> wrote: >> The idea is: >> >> Task may be "the entity that allocates the resources" and "the >> entity that is a resource allocated". >> >> When task is the first entity it may move across containers >> (that is implemented in your