netdev
[Top] [All Lists]

Re: [PATCH][IPv6] separation xfrm_lookup from ip6_dst_lookup

To: yoshfuji@xxxxxxxxxxxxxx
Subject: Re: [PATCH][IPv6] separation xfrm_lookup from ip6_dst_lookup
From: "David S. Miller" <davem@xxxxxxxxxx>
Date: Mon, 9 Aug 2004 16:35:20 -0700
Cc: kazunori@xxxxxxxxxxxx, herbert@xxxxxxxxxxxxxxxxxxx, netdev@xxxxxxxxxxx, usagi-core@xxxxxxxxxxxxxx, yoshfuji@xxxxxxxxxxxxxx
In-reply-to: <20040803.020015.44364045.yoshfuji@xxxxxxxxxxxxxx>
References: <20040730171205.114f22ba.kazunori@xxxxxxxxxxxx> <20040801195135.16734846.davem@xxxxxxxxxx> <20040803.020015.44364045.yoshfuji@xxxxxxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
On Tue, 03 Aug 2004 02:00:15 -0700 (PDT)
YOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@xxxxxxxxxxxxxx> wrote:

> In article <20040801195135.16734846.davem@xxxxxxxxxx> (at Sun, 1 Aug 2004 
> 19:51:35 -0700), "David S. Miller" <davem@xxxxxxxxxx> says:
> 
> > On Fri, 30 Jul 2004 17:12:05 +0900
> > Kazunori Miyazawa <kazunori@xxxxxxxxxxxx> wrote:
> > 
> > > I consider copying flowi(fl_rt) uses too much stack at the moment.
> > > I'll re-send the fixed patch again.
> > 
> > I agree, and let's defer this patch until we
> > resolve that.
> 
> Is the overhead for allocating memory okay?
> Or, do we allcoate some per-cpu memory while ipv6.o initalization phase?
> (check: lock? preemption?)
> Or, will we allocate fl (and fl_rt) per sock{} (ipv6_pinfo{})?
> (ditto.)
> 
> We have similar stack usage in other codes, and 
> I would fix them at the same time.

I think memory allocation will make it worse.

Instead, I would try to arrange order of events such that
single stack copy can be modified.  Something like:

        fl.foo = a;
        fl.bar = b;
        x = flow_lookup(&fl);

        fl.foo = a_2;
        y = other_lookup(&fl);

And I believe this is possible in most if not all of
these cases.


<Prev in Thread] Current Thread [Next in Thread>