[Devel] Re: [PATCH net-2.6.26 2/6][NETNS][SOCK]: Introduce per-net inuse counters.

2008-03-27 Thread Eric Dumazet
Pavel Emelyanov a écrit : This is probably the most controversial part of the set. The counters are stored in a per-cpu array on a struct net. To index in this array the prot->inuse is declared as int and used. Numbers (indices) to protos are generated with the appropriate enum. I though abo

[Devel] Re: [PATCH net-2.6.26 2/6][NETNS][SOCK]: Introduce per-net inuse counters.

2008-03-29 Thread Eric Dumazet
Pavel Emelyanov a écrit : Eric Dumazet wrote: Pavel Emelyanov a écrit : This is probably the most controversial part of the set. The counters are stored in a per-cpu array on a struct net. To index in this array the prot->inuse is declared as int and used. Numbers (indices)

[Devel] Re: [RFC] kernel/pid.c pid allocation wierdness

2007-03-16 Thread Eric Dumazet
On Friday 16 March 2007 11:57, Pavel Emelianov wrote: > Oleg Nesterov wrote: > > On 03/14, Eric W. Biederman wrote: > >> Pavel Emelianov <[EMAIL PROTECTED]> writes: > >>> Hi. > >>> > >>> I'm looking at how alloc_pid() works and can't understand > >>> one (simple/stupid) thing. > >>> > >>> It first

[Devel] Re: [PATCH 2.6.21-rc6] [netfilter] early_drop imrovement

2007-04-06 Thread Eric Dumazet
On Fri, 06 Apr 2007 12:00:29 +0400 Vasily Averin <[EMAIL PROTECTED]> wrote: > When the number of conntracks is reached ip_conntrack_max limit, early_drop() > is > called and tries to free one of already used conntracks in one of the hash > buckets. If it does not find any conntracks that may be f

[Devel] Re: [PATCH nf-2.6.22] [netfilter] early_drop imrovement

2007-04-07 Thread Eric Dumazet
Vasily Averin a e'crit : When the number of conntracks is reached nf_conntrack_max limit, early_drop() is called and tries to free one of already used conntracks in one of the hash buckets. If it does not find any conntracks that may be freed, it leads to transmission errors. However it is not fa

[Devel] Re: [PATCH] Show slab memory usage on OOM and SysRq-M

2007-04-17 Thread Eric Dumazet
On Tue, 17 Apr 2007 16:22:48 +0300 "Pekka Enberg" <[EMAIL PROTECTED]> wrote: > Hi, > > On 4/17/07, Pavel Emelianov <[EMAIL PROTECTED]> wrote: > > +static unsigned long get_cache_size(struct kmem_cache *cachep) > > +{ > > + unsigned long slabs; > > + struct kmem_list3 *l3; > > +

[Devel] Re: [BRIDGE] Unaligned access on IA64 when comparing ethernet addresses

2007-04-17 Thread Eric Dumazet
David Miller a écrit : From: Stephen Hemminger <[EMAIL PROTECTED]> Date: Tue, 17 Apr 2007 13:37:23 -0700 The previous patch relied on the bridge id being aligned by the compiler (which happens as a side effect). So please use this instead. compare_ether_addr() implicitly requires that the addr

[Devel] Re: [PATCH] Show slab memory usage on OOM and SysRq-M

2007-04-18 Thread Eric Dumazet
On Wed, 18 Apr 2007 09:17:19 +0300 (EEST) Pekka J Enberg <[EMAIL PROTECTED]> wrote: > On Tue, 17 Apr 2007, Eric Dumazet wrote: > > This nr_pages should be in struct kmem_list3, not in struct kmem_cache, > > or else you defeat NUMA optimizations if touching a field

[Devel] Re: [BRIDGE] Unaligned access on IA64 when comparing ethernet addresses

2007-04-19 Thread Eric Dumazet
to [EMAIL PROTECTED] > More majordomo info at http://vger.kernel.org/majordomo-info.html > -- Eric Dumazet <[EMAIL PROTECTED]> ___ Devel mailing list Devel@openvz.org https://openvz.org/mailman/listinfo/devel

[Devel] Re: [BRIDGE] Unaligned access on IA64 when comparing ethernet addresses

2007-04-19 Thread Eric Dumazet
David Miller a écrit : From: Eric Dumazet <[EMAIL PROTECTED]> Date: Thu, 19 Apr 2007 16:14:23 +0200 On Wed, 18 Apr 2007 13:04:22 -0700 (PDT) David Miller <[EMAIL PROTECTED]> wrote: Although I don't think gcc does anything fancy since we don't use memcmp(). It's a

[Devel] Re: [PATCH netdev] "wrong timeout value" in sk_wait_data()

2007-05-23 Thread Eric Dumazet
Vasily Averin a écrit : sys_setsockopt() do not check properly timeout values for SO_RCVTIMEO/SO_SNDTIMEO, for example it's possible to set negative timeout values. POSIX do not defines behaviour for sys_setsockopt in case negative timeouts, but requires that setsockopt() shall fail with -EDOM if

[Devel] Re: [PATCH 03/16] net: Basic network namespace infrastructure.

2007-09-09 Thread Eric Dumazet
Eric W. Biederman a écrit : This is the basic infrastructure needed to support network namespaces. This infrastructure is: - Registration functions to support initializing per network namespace data when a network namespaces is created or destroyed. - struct net. The network namespace data s

[Devel] Re: [PATCH 0/5] Make nicer CONFIG_NET_NS=n case code

2007-10-31 Thread Eric Dumazet
On Wed, 31 Oct 2007 22:19:43 +0300 Pavel Emelyanov <[EMAIL PROTECTED]> wrote: > Currently we have the NET_NS config option, but the only change it > makes is just return ERR_PTR(-EINVAL) inside the cloning call thus > introducing a bunch of a dead code and making the reference counting > unneeded

[Devel] Re: [PATCH 0/5] Make nicer CONFIG_NET_NS=n case code

2007-10-31 Thread Eric Dumazet
Eric W. Biederman a écrit : Eric Dumazet <[EMAIL PROTECTED]> writes: Definitly wanted here. Thank you. One more refcounting on each socket creation/deletion was expensive. Really? Have you actually measured that? If the overhead is measurable and expensive we may want to look at p

[Devel] Re: [PATCH 0/5] Make nicer CONFIG_NET_NS=n case code

2007-10-31 Thread Eric Dumazet
Eric W. Biederman a écrit : Eric Dumazet <[EMAIL PROTECTED]> writes: Eric W. Biederman a écrit : Eric Dumazet <[EMAIL PROTECTED]> writes: Definitly wanted here. Thank you. One more refcounting on each socket creation/deletion was expensive. Really? Have you actually measur

[Devel] Re: [PATCH 1/2][INET] Fix potential kfree on vmalloc-ed area of request_sock_queue

2007-11-14 Thread Eric Dumazet
On Wed, 14 Nov 2007 21:08:29 +0300 Pavel Emelyanov <[EMAIL PROTECTED]> wrote: > The request_sock_queue's listen_opt is either vmalloc-ed or > kmalloc-ed depending on the number of table entries. Thus it > is expected to be handled properly on free, which is done in > the reqsk_queue_destroy(). >

[Devel] Re: [PATCH 1/2][INET] (resend) Fix potential kfree on vmalloc-ed area of request_sock_queue

2007-11-15 Thread Eric Dumazet
oks too big to be inline. > > As David also noticed, this is an error recovery path only, > so no locking is required and the lopt is known to be not NULL. > > Signed-off-by: Pavel Emelyanov <[EMAIL PROTECTED]> > Acked-by: Er

[Devel] Re: [PATCH net-2.6.25 1/3] Uninline the __inet_hash function

2007-12-19 Thread Eric Dumazet
Pavel Emelyanov a écrit : This one is used in quite many places in the networking code and seems to big to be inline. After the patch net/ipv4/build-in.o loses 725 bytes: add/remove: 1/0 grow/shrink: 0/5 up/down: 374/-1099 (-725) function old new delta _

[Devel] Re: [PATCH net-2.6.25 1/3] Uninline the __inet_hash function

2007-12-19 Thread Eric Dumazet
Pavel Emelyanov a écrit : Eric Dumazet wrote: Pavel Emelyanov a écrit : This one is used in quite many places in the networking code and seems to big to be inline. After the patch net/ipv4/build-in.o loses 725 bytes: add/remove: 1/0 grow/shrink: 0/5 up/down: 374/-1099 (-725) function

[Devel] Re: [PATCH net-2.6.25 1/3] Uninline the __inet_hash function

2007-12-19 Thread Eric Dumazet
Pavel Emelyanov a écrit : Eric Dumazet wrote: Pavel Emelyanov a écrit : Eric Dumazet wrote: If you un-inline this (good idea), I am not sure we still need listen_possible argument. It was usefull only to help compiler to zap dead code (since it was known at compile time), now it only adds

[Devel] Re: [PATCH 4/5] Add loopback checkpoint support

2010-03-30 Thread Eric Dumazet
Le mardi 16 février 2010 à 08:03 -0800, Dan Smith a écrit : > Adds a small ndo_checkpoint() handler for loopback devices to write the > name and addresses like other interfaces. > > Signed-off-by: Dan Smith > --- > drivers/net/loopback.c | 41 ++--- > 1 file

[Devel] Re: [PATCH 7/8] net: Allow setting the network namespace by fd

2010-09-23 Thread Eric Dumazet
Le jeudi 23 septembre 2010 à 01:51 -0700, Eric W. Biederman a écrit : > Take advantage of the new abstraction and allow network devices > to be placed in any network namespace that we have a fd to talk > about. > > Signed-off-by: Eric W. Biederman > --- > include/linux/if_link.h |1 + >

[Devel] Re: [PATCH v5 6/8] tcp buffer limitation: per-cgroup limit

2011-10-04 Thread Eric Dumazet
Le mardi 04 octobre 2011 à 16:17 +0400, Glauber Costa a écrit : > This patch uses the "tcp_max_mem" field of the kmem_cgroup to > effectively control the amount of kernel memory pinned by a cgroup. > > We have to make sure that none of the memory pressure thresholds > specified in the namespace ar

[Devel] Re: [PATCH v5 6/8] tcp buffer limitation: per-cgroup limit

2011-10-05 Thread Eric Dumazet
Le mercredi 05 octobre 2011 à 12:08 +0400, Glauber Costa a écrit : > On 10/04/2011 04:48 PM, Eric Dumazet wrote: > > 2) Could you add const qualifiers when possible to your pointers ? > > Well, I'll go over the patches again and see where I can add them. > Any spe

[Devel] Re: [PATCH v9 0/9] Request for inclusion: per-cgroup tcp memory pressure controls

2011-12-13 Thread Eric Dumazet
build error if CONFIG_CGROUPS=n Reported-by: Christoph Paasch Signed-off-by: Eric Dumazet --- include/net/sock.h |2 ++ 1 file changed, 2 insertions(+) diff --git a/include/net/sock.h b/include/net/sock.h index 18ecc99..6fe0dae 100644 --- a/include/net/sock.h +++ b/include/net/sock.h @@

[Devel] Re: [PATCH] tun: don't hold network namespace by tun sockets

2012-03-11 Thread Eric Dumazet
Le dimanche 11 mars 2012 à 19:21 +0400, Stanislav Kinsbursky a écrit : > TUN was designed to destroy it's socket on network namesapce shutdown. But > this > will never happen for persistent device, because it's socket holds network > namespace. > This patch removes of holding network namespace by

[Devel] Re: [RFC PATCH] posix timers: allocate timer id per task

2012-10-15 Thread Eric Dumazet
On Mon, 2012-10-15 at 20:17 +0400, Stanislav Kinsbursky wrote: > This patch is required CRIU project (www.criu.org). > To migrate processes with posix timers we have to make sure, that we can > restore posix timer with proper id. > Currently, this is not true, because timer ids are allocated global

[Devel] Re: [RFC PATCH v2] posix timers: allocate timer id per task

2012-10-17 Thread Eric Dumazet
On Wed, 2012-10-17 at 17:18 +0400, Stanislav Kinsbursky wrote: > +static int hash(struct signal_struct *sig, unsigned int nr) > +{ > + int hash = hash_ptr(sig, POSIX_TIMERS_HASH_BITS); > + return hash ^ hash_32(nr, POSIX_TIMERS_HASH_BITS); > +} > + This is quite expensive on 64 bit arches

[Devel] Re: [RFC PATCH v2] posix timers: allocate timer id per task

2012-10-17 Thread Eric Dumazet
On Wed, 2012-10-17 at 17:18 +0400, Stanislav Kinsbursky wrote: > +static int posix_timer_add(struct k_itimer *timer) > +{ > + struct signal_struct *sig = current->signal; > + int next_free_id = sig->posix_timer_id; > + struct hlist_head *head; > + int ret = -ENOENT; > + > + do

[Devel] Re: [PATCH v3] posix timers: allocate timer id per process

2012-10-18 Thread Eric Dumazet
On Thu, 2012-10-18 at 11:49 +0400, Stanislav Kinsbursky wrote: > + > +static struct k_itimer *__posix_timers_find(struct hlist_head *head, struct > signal_struct *sig, timer_t id) This line is too long Please use scripts/checkpatch.pl Other than that, your patch seems fine to me Thanks ___

[Devel] Re: [PATCH v4] posix timers: allocate timer id per process

2012-10-19 Thread Eric Dumazet
On Fri, 2012-10-19 at 11:50 +0400, Stanislav Kinsbursky wrote: > v4: > 1) a couple of coding style fixes (lines over 80 characters) > > v3: > 1) hash calculation simlified to improve perfomance. > > v2: > 1) Hash table become RCU-friendly. Hash table search now done under RCU lock > protection.

[Devel] Re: [PATCH v4] posix timers: allocate timer id per process

2012-10-19 Thread Eric Dumazet
On Fri, 2012-10-19 at 13:38 +0400, Stanislav Kinsbursky wrote: > 19.10.2012 11:56, Eric Dumazet пишет: > > I wonder if some applications relied on our idr, assuming they would get > > low values for their timer id. > > (We could imagine some applications use a table in

[Devel] Re: [PATCH v5] posix timers: allocate timer id per process

2012-10-23 Thread Eric Dumazet
id = timer_create(...); > timer_delete(id); > } > > Signed-off-by: Stanislav Kinsbursky > > --- SGTM Signed-off-by: Eric Dumazet Thanks ! ___ Devel mailing list Devel@openvz.org https://openvz.org/mailman/listinfo/devel

[Devel] Re: [PATCH v5] posix timers: allocate timer id per process

2012-10-23 Thread Eric Dumazet
On Tue, 2012-10-23 at 23:47 +0200, Thomas Gleixner wrote: > Not so good to me. > > > Signed-off-by: Eric Dumazet > > And that should be either an Acked-by or a Reviewed-by. You can't sign > off on patches which have not been submitted or transported by you.

[Devel] Re: [PATCH v5] posix timers: allocate timer id per process

2012-10-23 Thread Eric Dumazet
On Wed, 2012-10-24 at 00:33 +0200, Thomas Gleixner wrote: > On Tue, 23 Oct 2012, Eric Dumazet wrote: > > > On Tue, 2012-10-23 at 23:47 +0200, Thomas Gleixner wrote: > > > > > Not so good to me. > > > > > > > Signed-off-by: Eric Dumazet > &g