From: Michel Machado <michel@digirati.com.br>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: "Wang, Yipeng1" <yipeng1.wang@intel.com>,
"Wiles, Keith" <keith.wiles@intel.com>,
"Fu, Qiaobin" <qiaobinf@bu.edu>,
"Richardson, Bruce" <bruce.richardson@intel.com>,
"De Lara Guarch, Pablo" <pablo.de.lara.guarch@intel.com>,
"dev@dpdk.org" <dev@dpdk.org>,
"Doucette, Cody, Joseph" <doucette@bu.edu>,
"Gobriel, Sameh" <sameh.gobriel@intel.com>,
"Tai, Charlie" <charlie.tai@intel.com>
Subject: Re: [dpdk-dev] [PATCH] hash table: add a bucket iterator function
Date: Tue, 7 Aug 2018 09:24:32 -0400 [thread overview]
Message-ID: <da94957d-4727-2873-e460-07dcb561e029@digirati.com.br> (raw)
In-Reply-To: <20180803082410.53078d0a@xeon-e3>
On 08/03/2018 11:24 AM, Stephen Hemminger wrote:
> Often for time based cleanup it is better to have a second linked list that is ordered
> by time value. Then the cleanup code can start at the oldest stop when it reaches
> the last item that could expire.
>
> That does mean having some form of lock and doing delete/insert on every usage.
>
> i.e
> spinlock(&timer_lock);
> TAILQ_REMOVE(&timer_list, entry, timer_list);
> entry->expiration = new time;
> TAILQ_INSERT_TAIL(&timer_list, entry, timer_list);
> spinunlock(&timer_unlock);
We'll try it. Thanks for the suggestion, Stephen.
[ ]'s
Michel Machado
next prev parent reply other threads:[~2018-08-07 13:24 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-28 17:48 Qiaobin Fu
2018-07-29 13:17 ` Wiles, Keith
[not found] ` <D2C4A16CA39F7F4E8E384D204491D7A66148250A@ORSMSX105.amr.corp.intel.com>
2018-07-31 6:09 ` Fu, Qiaobin
2018-07-31 14:57 ` Wiles, Keith
2018-07-31 15:32 ` Michel Machado
2018-08-01 1:40 ` Wang, Yipeng1
2018-08-01 12:57 ` Michel Machado
2018-08-03 15:24 ` Stephen Hemminger
2018-08-07 13:24 ` Michel Machado [this message]
-- strict thread matches above, loose matches on Subject: below --
2018-07-15 17:15 Qiaobin Fu
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=da94957d-4727-2873-e460-07dcb561e029@digirati.com.br \
--to=michel@digirati.com.br \
--cc=bruce.richardson@intel.com \
--cc=charlie.tai@intel.com \
--cc=dev@dpdk.org \
--cc=doucette@bu.edu \
--cc=keith.wiles@intel.com \
--cc=pablo.de.lara.guarch@intel.com \
--cc=qiaobinf@bu.edu \
--cc=sameh.gobriel@intel.com \
--cc=stephen@networkplumber.org \
--cc=yipeng1.wang@intel.com \
/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;
as well as URLs for NNTP newsgroup(s).