[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <E1ILefm-00010m-00@gondolin.me.apana.org.au>
Date: Thu, 16 Aug 2007 20:41:58 +0800
From: Herbert Xu <herbert@...dor.apana.org.au>
To: dada1@...mosbay.com (Eric Dumazet)
Cc: netdev@...r.kernel.org
Subject: Re: [RFC] net/core/dst.c : Should'nt dst_run_gc() be more scalable and friendly ?
Eric Dumazet <dada1@...mosbay.com> 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.
Cheers,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
-
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