From: Walker, Benjamin <benjamin.walker at intel.com>
To: spdk@lists.01.org
Subject: Re: [SPDK] Timer subsystem in SPDK application framework?
Date: Tue, 24 Jan 2017 16:14:17 +0000 [thread overview]
Message-ID: <1485274455.2822.40.camel@intel.com> (raw)
In-Reply-To: 0C60D704-9A21-472D-9917-12B6754C5258@gmail.com
[-- Attachment #1: Type: text/plain, Size: 1626 bytes --]
On Tue, 2017-01-24 at 00:31 -0800, Naoki Iwakami wrote:
> Hi there,
>
> I am using SPDK application framework (spdk_app_init() and so on),
> and struggling with figuring out the way to insert DPDK timer sub-
> system in the framework.
>
> According to the DPDK documentation, you have to call function
> rte_timer_manage() periodically in lcores main_loop() in order to
> make the timer sub-system functioning properly.
> Could anyone advice where where I can find the lcore main loop in the
> SPDK app framework, and what is the recommended way to insert the
> rte_timer_manage() function?
The SPDK app framework spawns one thread per core for each core in the
core mask provided in the initialization options (called reactor_mask).
Each thread then sits in a tight loop polling queues for incoming
events and executing pollers. The implementation is in
lib/event/reactor.c.
Our app framework implements its own timers, so you don't need to use
the DPDK timers. You can just call
/**
* \brief Register a poller on the given lcore.
*/
void spdk_poller_register(struct spdk_poller **ppoller,
spdk_poller_fn fn,
void *arg,
uint32_t lcore,
uint64_t period_microseconds);
and pass it a non-zero period.
If you really do need to use a DPDK timer, just register a poller using
the above function with a period of 0 and inside the spdk_poller_fn you
provide, call rte_timer_manage.
>
> Regards,
> -- Naoki
>
> _______________________________________________
> SPDK mailing list
> SPDK(a)lists.01.org
> https://lists.01.org/mailman/listinfo/spdk
[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 3274 bytes --]
next reply other threads:[~2017-01-24 16:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-24 16:14 Walker, Benjamin [this message]
-- strict thread matches above, loose matches on Subject: below --
2017-01-25 3:38 [SPDK] Timer subsystem in SPDK application framework? Naoki Iwakami
2017-01-24 8:31 Naoki Iwakami
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=1485274455.2822.40.camel@intel.com \
--to=spdk@lists.01.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.