[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1354699462.20888.207.camel@localhost>
Date: Wed, 05 Dec 2012 10:24:22 +0100
From: Jesper Dangaard Brouer <brouer@...hat.com>
To: Eric Dumazet <eric.dumazet@...il.com>
Cc: "David S. Miller" <davem@...emloft.net>,
Florian Westphal <fw@...len.de>, netdev@...r.kernel.org,
Thomas Graf <tgraf@...g.ch>,
"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
Cong Wang <amwang@...hat.com>,
Herbert Xu <herbert@...dor.hengli.com.au>
Subject: Re: [net-next PATCH V3-evictor] net: frag evictor, avoid killing
warm frag queues
First of all, this patch contains a small bug (see below), which
resulted in me not testing the correct patch...
Second, this patch does NOT behave as I expected and claimed. Thus, my
conclusions, in my previous respond might be wrong!
The previous evictor patch of letting new fragments enter, worked
amazingly well. But I suspect, this might also be related to a
bug/problem in the evictor loop (which were being hidden by that patch).
My new *theory* is that the evictor loop, will be looping too much, if
it finds a fragment which is INET_FRAG_COMPLETE ... in that case, we
don't advance the LRU list, and thus will pickup the exact same
inet_frag_queue again in the loop... to get out of the loop we need
another CPU or packet to change the LRU list for us... I'll test that
theory... (its could also be CPUs fighting over the same LRU head
element that cause this) ... more to come...
On Tue, 2012-12-04 at 14:30 +0100, Jesper Dangaard Brouer wrote:
> diff --git a/net/ipv4/inet_fragment.c b/net/ipv4/inet_fragment.c
> index 4750d2b..d8bf59b 100644
> --- a/net/ipv4/inet_fragment.c
> +++ b/net/ipv4/inet_fragment.c
> @@ -178,6 +178,16 @@ int inet_frag_evictor(struct netns_frags *nf, struct inet_frags *f, bool force)
>
> q = list_first_entry(&nf->lru_list,
> struct inet_frag_queue, lru_list);
> +
> + /* When head of LRU is very new/warm, then the head is
> + * most likely the one with most fragments and the
> + * tail with least, thus drop tail
> + */
> + if (!force && q->creation_ts == (u32) jiffies) {
> + q = list_entry(&nf->lru_list.prev,
Remove the "&" in &nf->lru_list.prev
> + struct inet_frag_queue, lru_list);
> + }
> +
> atomic_inc(&q->refcnt);
> read_unlock(&f->lock);
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists