[Devel] Re: [RFCv2][PATCH] flexible array implementation

2009-07-22 Thread Li Zefan
12:34, Dave Hansen wrote: On Wed, 2009-07-22 at 11:25 +0800, Li Zefan wrote: +/** + * flex_array_put - copy data into the array at @element_nr + * @src: address of data to copy into the array + * @element_nr:index of the position in which to insert + * the new element.

[Devel] Re: BUG in tty_open when using containers and ptrace

2009-07-22 Thread Sukadev Bhattiprolu
Grzegorz Nosek [r...@localdomain.pl] wrote: | Hi, | | On sob, lip 18, 2009 at 01:52:44 -0700, Sukadev Bhattiprolu wrote: | virsh --connect lxc:/// start lxc-vm2 | | Is that what you mean by just run :-) ? | If so, I have to first resolve my unrelated problem with libvirtd+lxc. | |

[Devel] Re: [RFCv2][PATCH] flexible array implementation

2009-07-22 Thread Amerigo Wang
On Tue, Jul 21, 2009 at 03:00:17PM -0700, Dave Hansen wrote: Changes from v1: - to vs too typo - added __check_part_and_nr() and gave it a warning - fixed off-by-one check on __nr_part_ptrs() - addedFLEX_ARRAY_INIT() macro - some kerneldoc comments about the capacity with various sized objects

[Devel] Re: [PATCH 3/9] blkio-cgroup-v9: The new page_cgroup framework

2009-07-22 Thread Ryo Tsuruta
KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com wrote: Index: linux-2.6.31-rc3/include/linux/page_cgroup.h === --- linux-2.6.31-rc3.orig/include/linux/page_cgroup.h +++ linux-2.6.31-rc3/include/linux/page_cgroup.h

[Devel] Re: [PATCH 3/9] blkio-cgroup-v9: The new page_cgroup framework

2009-07-22 Thread KAMEZAWA Hiroyuki
On Wed, 22 Jul 2009 17:28:43 +0900 (JST) Ryo Tsuruta r...@valinux.co.jp wrote: But, following is more straightforward. (and what you do is not different from this.) == struct page { . #ifdef CONFIG_BLOCKIO_CGROUP void *blockio_cgroup; #endif } == This increases

[Devel] Re: [PATCH 3/9] blkio-cgroup-v9: The new page_cgroup framework

2009-07-22 Thread KAMEZAWA Hiroyuki
On Wed, 22 Jul 2009 14:07:22 +0530 Balbir Singh bal...@linux.vnet.ibm.com wrote: * Ryo Tsuruta r...@valinux.co.jp [2009-07-22 17:28:43]: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com wrote: Index: linux-2.6.31-rc3/include/linux/page_cgroup.h

[Devel] Re: [PATCH 3/9] blkio-cgroup-v9: The new page_cgroup framework

2009-07-22 Thread Ryo Tsuruta
KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com wrote: On Wed, 22 Jul 2009 17:28:43 +0900 (JST) Ryo Tsuruta r...@valinux.co.jp wrote: But, following is more straightforward. (and what you do is not different from this.) == struct page { . #ifdef CONFIG_BLOCKIO_CGROUP

[Devel] Re: [PATCH 7/9] blkio-cgroup-v9: Page tracking hooks

2009-07-22 Thread Ryo Tsuruta
KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com wrote: On Tue, 21 Jul 2009 23:23:16 +0900 (JST) Ryo Tsuruta r...@valinux.co.jp wrote: This patch contains several hooks that let the blkio-cgroup framework to know which blkio-cgroup is the owner of a page before starting I/O against the

[Devel] Re: [PATCH 0/36] checkpoint/restart: opened files of generic, non-extX filesystems

2009-07-22 Thread Oren Laadan
These look good to me. Acked-by: Oren Laadan or...@cs.columbia.edu Matt Helsley wrote: These patches extend the use of the generic file checkpoint operation to non-extX filesystems which have lseek operations that ensure we can save and restore the files for later use. Note that this does

[Devel] Re: [RFCv2][PATCH] flexible array implementation

2009-07-22 Thread Dave Hansen
On Wed, 2009-07-22 at 15:09 +0800, Amerigo Wang wrote: On Tue, Jul 21, 2009 at 03:00:17PM -0700, Dave Hansen wrote: +static inline int __nr_part_ptrs(void) How about __nr_ptrs_in_part()? That would be fine except it is the number of part pointers in the base. I guess you're proving that I

[Devel] Re: [PATCH 1/1] veth: don't free priv-status until dev-destructor (v2)

2009-07-22 Thread Serge E. Hallyn
Quoting Stephen Hemminger (shemmin...@vyatta.com): On Wed, 15 Jul 2009 08:50:12 -0700 (PDT) David Miller da...@davemloft.net wrote: From: Serge E. Hallyn se...@us.ibm.com Date: Fri, 26 Jun 2009 11:24:18 -0500 I haven't been able to reproduce the original oops though (been trying

[Devel] Re: [RFC v17][PATCH 52/60] c/r: support semaphore sysv-ipc

2009-07-22 Thread Cyrill Gorcunov
[Oren Laadan - Wed, Jul 22, 2009 at 06:00:14AM -0400] ... | +static struct sem *restore_sem_array(struct ckpt_ctx *ctx, int nsems) | +{ | + struct sem *sma; | + int i, ret; | + | + sma = kmalloc(nsems * sizeof(*sma), GFP_KERNEL); Forgot to if (!sma) return

[Devel] Re: [RFC v17][PATCH 22/60] c/r: external checkpoint of a task other than ourself

2009-07-22 Thread Serge E. Hallyn
Quoting Oren Laadan (or...@librato.com): Now we can do external checkpoint, i.e. act on another task. ... long do_checkpoint(struct ckpt_ctx *ctx, pid_t pid) { long ret; + ret = init_checkpoint_ctx(ctx, pid); + if (ret 0) + return ret; + + if

[Devel] [RFC][PATCH] flexible array implementation v3

2009-07-22 Thread Dave Hansen
Changes from v2: - renamed some of the index functions - added preallocation function - added flex_array_free_parts() for use with statically allocated bases - killed append() function Changes from v1: - to vs too typo - added __check_part_and_nr() and gave it a warning - fixed off-by-one

[Devel] Re: [RFCv2][PATCH] flexible array implementation

2009-07-22 Thread Matt Helsley
On Tue, Jul 21, 2009 at 03:00:17PM -0700, Dave Hansen wrote: Changes from v1: - to vs too typo - added __check_part_and_nr() and gave it a warning - fixed off-by-one check on __nr_part_ptrs() - addedFLEX_ARRAY_INIT() macro - some kerneldoc comments about the capacity with various

[Devel] [PATCH 0/4] CGroup: Support for named and empty hierarchies

2009-07-22 Thread Paul Menage
The following series implements support for named cgroup hierarchies, and for cgroup hierarchies that have no bound subsystems. This is a subset of the patch series that I sent out as an RFC earlier in the month; I'm not pushing the additional support for multiply-bound hierarchies at this point.

[Devel] [PATCH 1/4] Support named cgroups hierarchies

2009-07-22 Thread Paul Menage
Support named cgroups hierarchies To simplify referring to cgroup hierarchies in mount statements, and to allow disambiguation in the presence of empty hierarchies and multiply-bindable subsystems this patch adds support for naming a new cgroup hierarchy via the name= mount option A pre-existing

[Devel] [PATCH 2/4] Move the cgroup debug subsys into cgroup.c to access internal state

2009-07-22 Thread Paul Menage
Move the cgroup debug subsys into cgroup.c to access internal state While it's architecturally clean to have the cgroup debug subsystem be completely independent of the cgroups framework, it limits its usefulness for debugging the contents of internal data structures. Move the debug subsystem

[Devel] [PATCH 3/4] Add a back-pointer from struct cg_cgroup_link to struct cgroup

2009-07-22 Thread Paul Menage
Add a back-pointer from struct cg_cgroup_link to struct cgroup Currently the cgroups code makes the assumption that the subsystem pointers in a struct css_set uniquely identify the hierarchy-cgroup mappings associated with the css_set; and there's no way to directly identify the associated set of

[Devel] [PATCH 4/4] Allow cgroup hierarchies to be created with no bound subsystems

2009-07-22 Thread Paul Menage
Allow cgroup hierarchies to be created with no bound subsystems This patch removes the restriction that a cgroup hierarchy must have at least one bound subsystem. The mount option none is treated as an explicit request for no bound subsystems. A hierarchy with no subsystems can be useful for

[Devel] Re: [RFCv2][PATCH] flexible array implementation

2009-07-22 Thread Mike Waychison
Dave Hansen wrote: Changes from v1: - to vs too typo - added __check_part_and_nr() and gave it a warning - fixed off-by-one check on __nr_part_ptrs() - addedFLEX_ARRAY_INIT() macro - some kerneldoc comments about the capacity with various sized objects - comments to note lack of locking

[Devel] [PATCH][user-cr]: Fix typo in -lpthread

2009-07-22 Thread Sukadev Bhattiprolu
From 55cb828036ff604fc9cdf686b51afb35247c8f57 Mon Sep 17 00:00:00 2001 From: Sukadev Bhattiprolu s...@suka.(none) Date: Wed, 22 Jul 2009 13:22:38 -0700 Subject: [PATCH] Fix typo in -lpthread Signed-off-by: Sukadev Bhattiprolu suka...@us.ibm.com --- Makefile |2 +- 1 files changed, 1

[Devel] Add Checkpoint/Restart support for UNIX sockets

2009-07-22 Thread Dan Smith
This is the latest version of my patch set enabling c/r for sockets. I chose to send only the UNIX patch and supporting changes to concentrate on that as the INET patch will need more work. This set introduces three c/r-specific helper routines (patches 1-3), a more general sock_bind() helper to

[Devel] [PATCH 4/5] Add a common sock_bind() helper to unify the security hook

2009-07-22 Thread Dan Smith
This moves the meat out of the bind() syscall into a helper function that performs security_socket_bind() and then sock-ops-bind(). This allows a unification of this behavior between the syscall and the pending socket restart logic. Signed-off-by: Dan Smith da...@us.ibm.com ---

[Devel] [PATCH 2/5] Add an errno validation function

2009-07-22 Thread Dan Smith
Signed-off-by: Dan Smith da...@us.ibm.com --- include/linux/checkpoint.h |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/include/linux/checkpoint.h b/include/linux/checkpoint.h index 2e9772e..93efa10 100644 --- a/include/linux/checkpoint.h +++

[Devel] [PATCH 3/5] Add a ckpt_read_string() function to allow reading of a variable-length (but length-capped) string from the checkpoint stream.

2009-07-22 Thread Dan Smith
Signed-off-by: Dan Smith da...@us.ibm.com --- checkpoint/restart.c | 35 +++ include/linux/checkpoint.h |1 + 2 files changed, 36 insertions(+), 0 deletions(-) diff --git a/checkpoint/restart.c b/checkpoint/restart.c index 5cbe491..06fe47e 100644 ---

[Devel] [PATCH 5/5] c/r: Add AF_UNIX support (v6)

2009-07-22 Thread Dan Smith
This patch adds basic checkpoint/restart support for AF_UNIX sockets. It has been tested with a single and multiple processes, and with data inflight at the time of checkpoint. It supports socketpair()s, path-based, and abstract sockets. Changes in v6: - Moved the socket addresses to the

[Devel] Re: [RFCv2][PATCH] flexible array implementation

2009-07-22 Thread Benjamin Blum
Does the array automatically grow if you give it more elements than you tell it it can have? How about a resize() function that can be used to either grow or shrink the array? ___ Containers mailing list contain...@lists.linux-foundation.org

[Devel] Re: [RFCv2][PATCH] flexible array implementation

2009-07-22 Thread Dave Hansen
On Wed, 2009-07-22 at 13:57 -0700, Benjamin Blum wrote: Does the array automatically grow if you give it more elements than you tell it it can have? The only limits it has or enforces are the structural and architectural ones dictated by the layout. How about a resize() function that can be

[Devel] Re: [RFCv2][PATCH] flexible array implementation

2009-07-22 Thread Dave Hansen
On Wed, 2009-07-22 at 15:55 -0400, Mike Waychison wrote: +#define FLEX_ARRAY_INIT(size, total) {{{\ + .element_size = (size), \ + .nr_elements = 0, \ +}}} + It's not clear how this guy is used. It will initialize a flex_array, but how is somebody

[Devel] Re: [RFCv2][PATCH] flexible array implementation

2009-07-22 Thread Dave Hansen
On Wed, 2009-07-22 at 11:30 -0700, Matt Helsley wrote: +static int __check_part_and_nr(struct flex_array *fa, +int part_nr, int element_nr) +{ + if (part_nr = __nr_part_ptrs() || + element_nr fa-nr_elements) { + WARN(1, bad flexible

[Devel] Re: BUG in tty_open when using containers and ptrace

2009-07-22 Thread Grzegorz Nosek
On wto, lip 21, 2009 at 11:41:20 -0700, Sukadev Bhattiprolu wrote: I set CONFIG_SLUB_DEBUG=y CONFIG_SLUB=y CONFIG_SLUB_DEBUG_ON=y # CONFIG_SLUB_STATS is not set and tried 2.6.29, 2.6.31-rc3 and linux-mmotm from July 13, but have not been able to repro either on an

[Devel] Re: [RFCv2][PATCH] flexible array implementation

2009-07-22 Thread Benjamin Blum
On Wed, Jul 22, 2009 at 2:51 PM, Dave Hansend...@linux.vnet.ibm.com wrote: On Wed, 2009-07-22 at 13:57 -0700, Benjamin Blum wrote: Does the array automatically grow if you give it more elements than you tell it it can have? The only limits it has or enforces are the structural and

[Devel] Re: [PATCH 7/9] blkio-cgroup-v9: Page tracking hooks

2009-07-22 Thread KAMEZAWA Hiroyuki
On Wed, 22 Jul 2009 18:40:55 +0900 (JST) Ryo Tsuruta r...@valinux.co.jp wrote: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com wrote: On Tue, 21 Jul 2009 23:23:16 +0900 (JST) Ryo Tsuruta r...@valinux.co.jp wrote: This patch contains several hooks that let the blkio-cgroup framework to

[Devel] Re: [PATCH][user-cr]: Fix typo in -lpthread

2009-07-22 Thread Sukadev Bhattiprolu
Oren Laadan [or...@librato.com] wrote: | -mktree:CFLAGS += -D__REENTRANT -pthreads | +mktree:CFLAGS += -D__REENTRANT -lpthread | | Hmmm .. I actually meant '-pthread' which is a gcc option. Ok. I get unrecognized option '-pthreads' on x86 for following gcc versions - gcc

[Devel] Re: [RFC][PATCH] flexible array implementation v3

2009-07-22 Thread KAMEZAWA Hiroyuki
On Wed, 22 Jul 2009 10:53:45 -0700 Dave Hansen d...@linux.vnet.ibm.com wrote: Changes from v2: - renamed some of the index functions - added preallocation function - added flex_array_free_parts() for use with statically allocated bases - killed append() function Changes from v1: -

[Devel] Re: BUG in tty_open when using containers and ptrace

2009-07-22 Thread H. Peter Anvin
On 07/22/2009 06:27 PM, Sukadev Bhattiprolu wrote: | | Immediate crash. I tried 2.6.18-something (Debian etch kernel) that I | had lying around on the VM. The result: Interesting. Attaching test program and Ccing Peter Anvin for any insights. | idr_remove called for id=0 which is not

[Devel] Re: [RFC v17][PATCH 10/60] c/r: make file_pos_read/write() public

2009-07-22 Thread KAMEZAWA Hiroyuki
a nitpick. On Wed, 22 Jul 2009 05:59:32 -0400 Oren Laadan or...@librato.com wrote: These two are used in the next patch when calling vfs_read/write() +static inline loff_t file_pos_read(struct file *file) +{ + return file-f_pos; +} + +static inline void file_pos_write(struct file

[Devel] Re: [RFCv2][PATCH] flexible array implementation

2009-07-22 Thread H. Peter Anvin
On 07/21/2009 03:00 PM, Dave Hansen wrote: Here's an alternative. I think it's what Andrew was suggesting here: http://lkml.org/lkml/2009/7/2/518 I call it a flexible array. It does all of its work in PAGE_SIZE bits, so never does an order0 allocation. The base level has

[Devel] [cr][git]linux-cr branch, ckpt-v17-dev, updated. v2.6.27-rc5-46167-g45c1135

2009-07-22 Thread orenl
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project linux-cr. The branch, ckpt-v17-dev has been updated via 45c11355ac16ceec2d8067ff1b3e3486fbfbce0a (commit) via

[Devel] Re: [RFC v17][PATCH 52/60] c/r: support semaphore sysv-ipc

2009-07-22 Thread Oren Laadan
Cyrill Gorcunov wrote: [Oren Laadan - Wed, Jul 22, 2009 at 06:00:14AM -0400] ... | +static struct sem *restore_sem_array(struct ckpt_ctx *ctx, int nsems) | +{ | + struct sem *sma; | + int i, ret; | + | + sma = kmalloc(nsems * sizeof(*sma), GFP_KERNEL); Forgot to if

[Devel] Re: [PATCH 0/4] CGroup: Support for named and empty hierarchies

2009-07-22 Thread KAMEZAWA Hiroyuki
On Wed, 22 Jul 2009 12:50:24 -0700 Paul Menage men...@google.com wrote: The following series implements support for named cgroup hierarchies, and for cgroup hierarchies that have no bound subsystems. This is a subset of the patch series that I sent out as an RFC earlier in the month; I'm

[Devel] Re: [PATCH 0/4] CGroup: Support for named and empty hierarchies

2009-07-22 Thread Paul Menage
On Wed, Jul 22, 2009 at 10:13 PM, KAMEZAWA Hiroyukikamezawa.hir...@jp.fujitsu.com wrote: Thank you. I'd like to look into procps package to allow  #ps -lf -cgroup=//yyy or  #top -cgroup=/xxx/yyy Wouldn't it be less invasive to change procps so that doing ps pid1 pid2 ... only

[Devel] Re: [RFCv2][PATCH] flexible array implementation

2009-07-22 Thread Dave Hansen
On Wed, 2009-07-22 at 16:20 -0700, Benjamin Blum wrote: How about a resize() function that can be used to either grow or shrink the array? I think growing is out of the question. It has a fixed maximum size already. As for shrinking, there's probably a use case for when something

[Devel] Re: [PATCH 0/4] CGroup: Support for named and empty hierarchies

2009-07-22 Thread KAMEZAWA Hiroyuki
On Wed, 22 Jul 2009 22:37:53 -0700 Paul Menage men...@google.com wrote: On Wed, Jul 22, 2009 at 10:13 PM, KAMEZAWA Hiroyukikamezawa.hir...@jp.fujitsu.com wrote: Thank you. I'd like to look into procps package to allow  #ps -lf -cgroup=//yyy or  #top -cgroup=/xxx/yyy