On Thu, 16 Aug 2007 20:41:58 +0800
Herbert Xu <[EMAIL PROTECTED]> wrote:

> Eric Dumazet <[EMAIL PROTECTED]> wrote:
> >
> > I am wondering how to really solve the problem. Could a workqueue be used 
> > here instead of a timer ?
> 
> I think so.
> 
> A mutex would separate the GC and dst_ifdown.  You'd take the
> spin lock in the GC only to replace the garbage list with NULL.
> You then drop the lock to process it.  Once it's done you take
> the lock again and join it with whatever that's been added in
> the mean time.  This is easy because you should already have
> the tail after the GC process.

Thanks Herbert

Yes, I already did this (with the current softirq based timer model),
 but how can dst_dev_event() do its work, since the GC is using 
a private list. (In my patch, time to GC process XXX.000 entries is about XX 
seconds.)

We would have to change dst_dev_event() to :
- Signal to GC it has to stop as soon as possible.
- Wait for GC be stoped (busy wait I suspect we cannot sleep in dst_dev_event() 
? )
, giving us a full garbage_list.
- Process the whole list.
- Restart GC

-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to