bdev_nvme: shorten poller period for mdns

We may need to process multiple events to get all of
the events associated with a newly published service,
so a 1 second poller is actually a bit too long since
we will only get one event per poll iteration.  Shorten
it to 100ms instead.

It doesn't appear there is any easy way to use the avahi
API to help with this, maybe we could have some context
variable used to detect if an event was processed or not,
and call avahi_simple_poll_iterate() multiple times if
necessary.  This might be something worth investigating
in the future.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ifea7a99dc8b8b501392e29276b20528a873b1ae1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16327
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Boris Glimcher <Boris.Glimcher@emc.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
Jim Harris 2023-01-17 16:22:16 +00:00 committed by Tomasz Zawadzki
parent 537929e1d4
commit 10f90ccd7b

View File

@ -440,7 +440,7 @@ start_mdns_discovery_poller(void *arg)
assert(arg); assert(arg);
TAILQ_INSERT_TAIL(&g_mdns_discovery_ctxs, ctx, tailq); TAILQ_INSERT_TAIL(&g_mdns_discovery_ctxs, ctx, tailq);
ctx->poller = SPDK_POLLER_REGISTER(bdev_nvme_avahi_iterate, ctx, 1000 * 1000); ctx->poller = SPDK_POLLER_REGISTER(bdev_nvme_avahi_iterate, ctx, 100 * 1000);
} }
int int