[ovs-dev] [v13 11/12] dpdk: Cache result of CPU ISA checks.

Flavio Leitner fbl at sysclose.org
Thu Jun 24 03:47:58 UTC 2021

On Thu, Jun 17, 2021 at 05:18:24PM +0100, Cian Ferriter wrote:
> From: Harry van Haaren <harry.van.haaren at intel.com>
> As a small optimization, this patch caches the result of a CPU ISA
> check from DPDK. Particularly in the case of running the DPCLS
> autovalidator (which repeatedly probes subtables) this reduces
> the amount of CPU ISA lookups from the DPDK level.
> By caching them at the OVS/dpdk.c level, the ISA checks remain
> runtime for the CPU where they are executed, but subsequent checks
> for the same ISA feature become much cheaper.
> Signed-off-by: Harry van Haaren <harry.van.haaren at intel.com>
> Co-authored-by: Cian Ferriter <cian.ferriter at intel.com>
> Signed-off-by: Cian Ferriter <cian.ferriter at intel.com>
> ---

The current approach uses a static int8_t per CPU flag.  Perhaps
using two static int8_t (one for DONE and another for AVAIL) and
then use a bit on them for each CPU flag would result in
allocating less static variables.

Anyways, 2 or 3 CPU flags make no relevant difference now.

Acked-by: Flavio Leitner <fbl at sysclose.org>

More information about the dev mailing list