From: Eric Dumazet <dada1@cosmosbay.com>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: netdev@vger.kernel.org
Subject: Re: [RFC] net/core/dst.c : Should'nt dst_run_gc() be more scalable and friendly ?
Date: Thu, 16 Aug 2007 15:36:19 +0200 [thread overview]
Message-ID: <20070816153619.2c699e21.dada1@cosmosbay.com> (raw)
In-Reply-To: <E1ILefm-00010m-00@gondolin.me.apana.org.au>
On Thu, 16 Aug 2007 20:41:58 +0800
Herbert Xu <herbert@gondor.apana.org.au> wrote:
> Eric Dumazet <dada1@cosmosbay.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.
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
next prev parent reply other threads:[~2007-08-16 13:36 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-16 12:09 [RFC] net/core/dst.c : Should'nt dst_run_gc() be more scalable and friendly ? Eric Dumazet
2007-08-16 12:41 ` Herbert Xu
2007-08-16 13:36 ` Eric Dumazet [this message]
2007-08-16 13:59 ` Herbert Xu
2007-08-16 15:40 ` Eric Dumazet
2007-08-16 23:33 ` Herbert Xu
2007-08-17 8:10 ` Eric Dumazet
2007-08-17 8:15 ` Herbert Xu
2007-08-17 8:31 ` Eric Dumazet
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070816153619.2c699e21.dada1@cosmosbay.com \
--to=dada1@cosmosbay.com \
--cc=herbert@gondor.apana.org.au \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox