On Wed, 26 Sep 2007, Balbir Singh wrote:
Yes, I prefer 0 as well and had that in a series in the Lost World
of my earlier memory/RSS controller patches. I feel now that 0 is
a bit confusing, we don't use 0 to mean unlimited, unless we
treat the memory.limit_in_bytes value as boolean. 0 is
On Wed, 26 Sep 2007, KAMEZAWA Hiroyuki wrote:
#define RES_COUNTER_INIFINITY (~0ULL)
or some nice name
Why do we need this at all? We can simply push -1 there and be happy.
Hm, can this work now ?
==
echo -1 /cgroup/memory.limit_in_bytes
==
Or users have to do
On Tue, 25 Sep 2007, Paul Menage wrote:
If I echo -n 8191 memory.limit_in_bytes, I'm still only going to be able
to charge one page on my x86_64. And then my program's malloc(5000) is
going to fail, which leads to the inevitable head scratching.
This is a very unrealistic argument.
On Tue, 25 Sep 2007, Paul Menage wrote:
nit pick, should be memory.limit_in_bytes
Can we reconsider this? I do think that plain limit would enable you
to have a more consistent API across all resource counters users.
Why aren't limits expressed in kilobytes? All architectures have
On Tue, 25 Sep 2007, Paul Menage wrote:
If you're fine with rounding up to the nearest page, then what's the point
of exposing it as a number of bytes?? You'll never get a granularity
finer than a kilobyte.
API != implementation.
Having the limit expressed and configurable in bytes
On Tue, 25 Sep 2007, Paul Menage wrote:
It doesn't matter. When I cat my cgroup's memory.limit (or
memory.limit_in_bytes), I should see the total number of bytes that my
applications are allowed. That's not an unrealistic expectation of a
system that is expressly designed to control my
Add write_uint() helper method for cgroup subsystems
This helper is analagous to the read_uint() helper method for
reporting u64 values to userspace. It's designed to reduce the amount
of boilerplate requierd for creating new cgroup subsystems.
Signed-off-by: Paul Menage [EMAIL PROTECTED]
---
Comment fixed, to match the actual arguments.
Signed-off-by: Balaji Rao [EMAIL PROTECTED]
Signed-off-by: Paul Menage [EMAIL PROTECTED]
---
kernel/cgroup.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: container-2.6.23-rc8-mm1/kernel/cgroup.c
Simplify the memory controller and resource counter I/O routines
This patch strips out some I/O boilerplate from resource counters and
the memory controller. It also adds locking to the resource counter
reads and writes, and forbids writes to the root memory cgroup's limit
file.
One arguable
This is an experimental patch for drop pages in empty cgroup.
comments ?
==
An experimental patch.
Drop all pages in memcontrol cgroup if cgroup's task is empty.
Please type sync before try to drop. Unless sync, maybe -EBUSY will return.
Problem: not handle mlocked pages now.
Signed-off-by:
Christoph Lameter wrote:
On Tue, 25 Sep 2007, Pavel Emelyanov wrote:
+for_each_node_state(n, N_NORMAL_MEMORY) {
+struct kmem_cache_node *node;
+struct page *pg;
+
+node = get_node(s, n);
+
Christoph Lameter wrote:
On Tue, 25 Sep 2007, Pavel Emelyanov wrote:
@@ -28,6 +28,7 @@
#define SLAB_DESTROY_BY_RCU 0x0008UL/* Defer freeing slabs to RCU */
#define SLAB_MEM_SPREAD 0x0010UL/* Spread some memory
over cpuset */
#define SLAB_TRACE
KAMEZAWA Hiroyuki wrote:
On Wed, 26 Sep 2007 00:51:59 +0530
Balbir Singh [EMAIL PROTECTED] wrote:
David Rientjes wrote:
Yes, I prefer 0 as well and had that in a series in the Lost World
of my earlier memory/RSS controller patches. I feel now that 0 is
a bit confusing, we don't use 0 to
Pavel Emelyanov wrote:
KAMEZAWA Hiroyuki wrote:
On Wed, 26 Sep 2007 00:51:59 +0530
Balbir Singh [EMAIL PROTECTED] wrote:
David Rientjes wrote:
Yes, I prefer 0 as well and had that in a series in the Lost World
of my earlier memory/RSS controller patches. I feel now that 0 is
a bit
Balbir Singh wrote:
Pavel Emelyanov wrote:
KAMEZAWA Hiroyuki wrote:
On Wed, 26 Sep 2007 00:51:59 +0530
Balbir Singh [EMAIL PROTECTED] wrote:
David Rientjes wrote:
Yes, I prefer 0 as well and had that in a series in the Lost World
of my earlier memory/RSS controller patches. I feel now that
Hi, guys!
I've noticed that compiling out all the core related to
cloning and cleaning the new namespace saves us more than
a Kbyte (!) from the vmlinux.
add/remove: 19/0 grow/shrink: 6/6 up/down: 1532/-336 (1196)
function old new delta
copy_user_ns
Quoting Pavel Emelyanov ([EMAIL PROTECTED]):
Hi, guys!
I've noticed that compiling out all the core related to
cloning and cleaning the new namespace saves us more than
a Kbyte (!) from the vmlinux.
add/remove: 19/0 grow/shrink: 6/6 up/down: 1532/-336 (1196)
function
The nslock spinlock is not used in the kernel at all.
Remove it.
Signed-off-by: Pavel Emelyanov [EMAIL PROTECTED]
---
diff --git a/include/linux/init_task.h b/include/linux/init_task.h
index a3f2541..cae35b6 100644
--- a/include/linux/init_task.h
+++ b/include/linux/init_task.h
@@ -73,7 +73,6
Cedric Le Goater wrote:
Serge E. Hallyn wrote:
Quoting Pavel Emelyanov ([EMAIL PROTECTED]):
Hi, guys!
I've noticed that compiling out all the core related to
cloning and cleaning the new namespace saves us more than
a Kbyte (!) from the vmlinux.
add/remove: 19/0 grow/shrink: 6/6 up/down:
Cedric Le Goater wrote:
Cedric Le Goater wrote:
Serge E. Hallyn wrote:
Quoting Pavel Emelyanov ([EMAIL PROTECTED]):
Hi, guys!
I've noticed that compiling out all the core related to
cloning and cleaning the new namespace saves us more than
a Kbyte (!) from the vmlinux.
add/remove: 19/0
The blessed way for standard caches is to use it.
Besides, this may give this cache a better alignment.
Signed-off-by: Pavel Emelyanov [EMAIL PROTECTED]
---
diff --git a/kernel/nsproxy.c b/kernel/nsproxy.c
index ee68964..31351cc 100644
--- a/kernel/nsproxy.c
+++ b/kernel/nsproxy.c
@@ -222,8
Pavel Emelyanov wrote:
Cedric Le Goater wrote:
Cedric Le Goater wrote:
Serge E. Hallyn wrote:
Quoting Pavel Emelyanov ([EMAIL PROTECTED]):
Hi, guys!
I've noticed that compiling out all the core related to
cloning and cleaning the new namespace saves us more than
a Kbyte (!) from the
Quoting Pavel Emelyanov ([EMAIL PROTECTED]):
The nslock spinlock is not used in the kernel at all.
Remove it.
Signed-off-by: Pavel Emelyanov [EMAIL PROTECTED]
Acked-by: Serge Hallyn [EMAIL PROTECTED]
---
diff --git a/include/linux/init_task.h b/include/linux/init_task.h
index
Quoting Cedric Le Goater ([EMAIL PROTECTED]):
Cedric Le Goater wrote:
Serge E. Hallyn wrote:
Quoting Pavel Emelyanov ([EMAIL PROTECTED]):
Hi, guys!
I've noticed that compiling out all the core related to
cloning and cleaning the new namespace saves us more than
a Kbyte (!) from the
Pavel Emelyanov wrote:
The nslock spinlock is not used in the kernel at all.
it's also useless now that you have put some RCU rules around it.
right ?
C.
Remove it.
Signed-off-by: Pavel Emelyanov [EMAIL PROTECTED]
---
diff --git a/include/linux/init_task.h b/include/linux/init_task.h
Pavel Emelyanov wrote:
The blessed way for standard caches is to use it.
Besides, this may give this cache a better alignment.
Signed-off-by: Pavel Emelyanov [EMAIL PROTECTED]
yes of course. thanks.
Acked-by: Cedric Le Goater [EMAIL PROTECTED]
---
diff --git a/kernel/nsproxy.c
Quoting Pavel Emelyanov ([EMAIL PROTECTED]):
The blessed way for standard caches is to use it.
Besides, this may give this cache a better alignment.
Signed-off-by: Pavel Emelyanov [EMAIL PROTECTED]
Acked-by: Serge Hallyn [EMAIL PROTECTED]
---
diff --git a/kernel/nsproxy.c
Cedric Le Goater wrote:
Pavel Emelyanov wrote:
The nslock spinlock is not used in the kernel at all.
it's also useless now that you have put some RCU rules around it.
right ?
Exactly!
C.
Remove it.
Signed-off-by: Pavel Emelyanov [EMAIL PROTECTED]
---
diff --git
Pavel Emelyanov wrote:
Hi, guys!
I've noticed that compiling out all the core related to
cloning and cleaning the new namespace saves us more than
a Kbyte (!) from the vmlinux.
Sorry guys, this patch is a bit broken :P
CONFIG_NS_PID is used in kernel/pid.c while the real
option is
Pavel Emelyanov [EMAIL PROTECTED] writes:
+config NAMESPACES
+bool The namespaces support
+help
+ Provides the way to make tasks work with different objects using
+ the same id
+
+config NS_UTS
+bool Uname namespace
+depends on NAMESPACES
+help
+
Eric W. Biederman wrote:
Pavel Emelyanov [EMAIL PROTECTED] writes:
+config NAMESPACES
+ bool The namespaces support
+ help
+ Provides the way to make tasks work with different objects using
+ the same id
+
+config NS_UTS
+ bool Uname namespace
+ depends on NAMESPACES
On Wed, 2007-09-26 at 08:55 +0530, Balbir Singh wrote:
Badari Pulavarty wrote:
Hi,
I am playing with control groups on 2.6.23-rc8-mm1.
I am able to mount cgroup and create subgroups. I was able
to move some tasks into them. But, after killing tasks I am
not able to remove the
On Tue, 2007-09-25 at 07:30 -0600, Eric W. Biederman wrote:
Pavel Emelyanov [EMAIL PROTECTED] writes:
Oh! Can you provide us an example when after the migration some
device's major+minor pair change on the same device?
SCSI disks on a SAN. Network accessible block devices.
All kinds of
Quoting Pavel Emelyanov ([EMAIL PROTECTED]):
Eric W. Biederman wrote:
Pavel Emelyanov [EMAIL PROTECTED] writes:
+config NAMESPACES
+ bool The namespaces support
+ help
+ Provides the way to make tasks work with different objects using
+ the same id
+
+config NS_UTS
+
On Wed, 2007-09-26 at 18:14 +0900, KAMEZAWA Hiroyuki wrote:
This is an experimental patch for drop pages in empty cgroup.
comments ?
Hmm.. Patch doesn't seems to help :(
elm3b155:/dev/cgroup/xxx # cat memory.usage_in_bytes
65536
elm3b155:/dev/cgroup/xxx # sync
elm3b155:/dev/cgroup/xxx # sync
There were some questions like do I need this on my cellphone
in reply to different namespaces patches. Indeed, the namespaces
are not useful for most of the embedded systems, but the code
creating and releasing them weights a lot.
So I propose to add a config option which will help embedded
The option is called NAMESPACES. It can be selectable only
if EMBEDDED is chosen (this was Eric's requisition). When
the EMBEDDED is off namespaces will be on automatically.
One more option (NAMESPACES_EXPERIMENTAL) was added by
Serge's request to move there all the namespaces that are
not
Currently all the namespace management code is in the
kernel/utsname.c file, so just compile it out and make
stub in .h file.
The init namespace itself is in init/version.c and is
left in the kernel.
Signed-off-by: Pavel Emelyanov [EMAIL PROTECTED]
---
diff --git a/include/linux/utsname.h
Currently all the IPC namespace management code is in
ipc/util.c. I moved this code into ipc/namespace.c file
which is compiled out when needed.
The linux/ipc_namespace.h file is used to store the
prototypes of the functions in namespace.c and the stubs
for NAMESPACES=n case. This is done so,
We currently have a CONFIG_USER_NS option. Just rename it
into CONFIG_NAMESPACES_EXPERIMANTAL and move the init_user_ns
into user.c file to make the kernel compile and work without
the namespaces support.
Signed-off-by: Pavel Emelyanov [EMAIL PROTECTED]
---
diff --git
For the same reasons as with the IPC namespaces, all the
prototypes and stuns go to the pid_namespace.h file. The
namespace management code itself is moved to the
pid_namespace.c file.
The pid_namespace cache is created inside an initcall,
i.e. a bit later than the pid hash is initialized. This
On Wed, 26 Sep 2007 19:43:28 +0400 Pavel Emelyanov wrote:
The option is called NAMESPACES. It can be selectable only
if EMBEDDED is chosen (this was Eric's requisition). When
the EMBEDDED is off namespaces will be on automatically.
and when EMBEDDED is on, namespaces will be off
Quoting Pavel Emelyanov ([EMAIL PROTECTED]):
The option is called NAMESPACES. It can be selectable only
if EMBEDDED is chosen (this was Eric's requisition). When
the EMBEDDED is off namespaces will be on automatically.
One more option (NAMESPACES_EXPERIMENTAL) was added by
Serge's request
On 9/26/07, Badari Pulavarty [EMAIL PROTECTED] wrote:
BTW, how do I detach a pid from the cgroup ?
By attaching it to another group.
Paul
___
Containers mailing list
[EMAIL PROTECTED]
https://lists.linux-foundation.org/mailman/listinfo/containers
Quoting Serge E. Hallyn ([EMAIL PROTECTED]):
Quoting Pavel Emelyanov ([EMAIL PROTECTED]):
The option is called NAMESPACES. It can be selectable only
if EMBEDDED is chosen (this was Eric's requisition). When
the EMBEDDED is off namespaces will be on automatically.
One more option
On Wed, 26 Sep 2007, Pavel Emelyanov wrote:
Is it necessary to mark all the existing slabs with SLAB_DEBUG? Would it
Yup. Otherwise we can never receive a single event e.g. if we make
alloc/free in a loop, or similar, so that new slabs simply are not
created.
Right but on the other
On Wed, 26 Sep 2007, Pavel Emelyanov wrote:
True, but we mark the slubs as notifyable at runtime, after they
are merged. However, once someone decides to make his slab notifyable
from the very beginning this makes sense, thanks.
This also makes sense if a device driver later creates a new
Dave Hansen [EMAIL PROTECTED] writes:
On Tue, 2007-09-25 at 07:30 -0600, Eric W. Biederman wrote:
Pavel Emelyanov [EMAIL PROTECTED] writes:
Oh! Can you provide us an example when after the migration some
device's major+minor pair change on the same device?
SCSI disks on a SAN. Network
[EMAIL PROTECTED] writes:
The two first patches enable the arp and rtnetlink events.
They were working in previous version, so I don't know if
they were disabled for a particular reason but I re-enable
them again just in case ...
The third patch allows to consolidate the netlink
Daniel Lezcano [EMAIL PROTECTED] writes:
Denis Lunev spotted that using a reference to the network namespace
with the timewait sockets will be a waste of time because they
are pointless while we will remove the network stack at network
namespace exit.
The patches look close and look like
(sorry from the delay, been away :)
Eric W. Biederman wrote:
Serge E. Hallyn [EMAIL PROTECTED] writes:
Sorry, I was focusing on the virtual server needs.
devpts is it's own fs so I was fully expecting to make it mountable
multiple times so a container can have it's own /dev/pts/0. So
On Wed, 26 Sep 2007 08:46:20 -0700
Badari Pulavarty [EMAIL PROTECTED] wrote:
On Wed, 2007-09-26 at 18:14 +0900, KAMEZAWA Hiroyuki wrote:
This is an experimental patch for drop pages in empty cgroup.
comments ?
Hmm.. Patch doesn't seems to help :(
elm3b155:/dev/cgroup/xxx # cat
David Miller [EMAIL PROTECTED] writes:
I've put these patches into the just-rebased net-2.6.24 tree.
I made a minor modification to the second patch, the
out_free_netdev: code in loopback_init() ended like this:
out_free_netdev:
free_netdev(dev);
goto out;
return err;
When sysfs support is compiled out the kernel still keeps and maintains
the kobject tree. So it is not safe to skip our kobject reference counting or
to avoid becoming members of the kobject tree. It is safe to not add
the networking specific sysfs attributes.
This patch removes the sysfs
Currently we never call unregister_netdev for the loopback device so
it is impossible for us to reach inetdev_destroy with the loopback
device. So the test in inetdev_destroy is unnecessary.
Further when testing with my network namespace patches removing
unregistering the loopback device and
Now that multiple loopback devices are becoming possible it makes
the code a little cleaner and more maintainable to test if a deivice
is th a loopback device by testing dev-flags IFF_LOOPBACK instead
of dev == loopback_dev.
Signed-off-by: Eric W. Biederman [EMAIL PROTECTED]
---
This patch makes loopback_dev per network namespace. Adding
code to create a different loopback device for each network
namespace and adding the code to free a loopback device
when a network namespace exits.
This patch modifies all users the loopback_dev so they
access it as
On Wed, 26 Sep 2007 17:48:10 -0600
[EMAIL PROTECTED] (Eric W. Biederman) wrote:
When sysfs support is compiled out the kernel still keeps and maintains
the kobject tree. So it is not safe to skip our kobject reference counting
or
to avoid becoming members of the kobject tree. It is safe
Serge E. Hallyn [EMAIL PROTECTED] wrote:
| Quoting Serge E. Hallyn ([EMAIL PROTECTED]):
| Quoting Pavel Emelyanov ([EMAIL PROTECTED]):
| The option is called NAMESPACES. It can be selectable only
| if EMBEDDED is chosen (this was Eric's requisition). When
| the EMBEDDED is off namespaces
Denis V. Lunev [EMAIL PROTECTED] noticed that the locking rules
for the network namespace list are over complicated and broken.
In particular the current register_netdev_notifier currently
does not take any lock making the for_each_net iteration racy
with network namespace creation and
From: [EMAIL PROTECTED] (Eric W. Biederman)
Date: Wed, 26 Sep 2007 17:49:54 -0600
This patch allows you to create a new network namespace
using sys_clone, or sys_unshare.
As the network namespace is still experimental and under development
clone and unshare support is only made available
From: [EMAIL PROTECTED] (Eric W. Biederman)
Date: Wed, 26 Sep 2007 17:53:40 -0600
This patch add support for dynamically allocating the statistics counters
for the loopback device and adds appropriate device methods for allocating
and freeing the loopback device.
This completes support
From: [EMAIL PROTECTED] (Eric W. Biederman)
Date: Wed, 26 Sep 2007 17:55:29 -0600
Currently we never call unregister_netdev for the loopback device so
it is impossible for us to reach inetdev_destroy with the loopback
device. So the test in inetdev_destroy is unnecessary.
Further when
From: [EMAIL PROTECTED] (Eric W. Biederman)
Date: Wed, 26 Sep 2007 17:58:21 -0600
Now that multiple loopback devices are becoming possible it makes
the code a little cleaner and more maintainable to test if a deivice
is th a loopback device by testing dev-flags IFF_LOOPBACK instead
of dev
From: [EMAIL PROTECTED] (Eric W. Biederman)
Date: Wed, 26 Sep 2007 18:00:20 -0600
This patch makes loopback_dev per network namespace. Adding
code to create a different loopback device for each network
namespace and adding the code to free a loopback device
when a network namespace exits.
From: [EMAIL PROTECTED] (Eric W. Biederman)
Date: Wed, 26 Sep 2007 21:54:47 -0600
Denis V. Lunev [EMAIL PROTECTED] noticed that the locking rules
for the network namespace list are over complicated and broken.
In particular the current register_netdev_notifier currently
does not take any
66 matches
Mail list logo