The default is cpus – 1 (rather than cpus) to leave one core for running the non-worker threads. Tilera Linux has a feature called Zero Overhead Linux, which is an extension of isolcups where if only one thread or process is running on a ZOL core, then Linux will not interrupt that core, even for timer ticks. This reduces jitter and it helpful for high rate packet processing. For ZOL to work, one core is left in non-ZOL mode to run all the other management and Linux threads and processes.

Using ZOL mode also allows safely using spin locks instead of pthread mutex locks. This is a futher optimization not included in the initial changes to support the TILE architecture.

Regards,
-Ken

From: Eric Leblond [mailto:notifications@github.com]
Sent: Wednesday, June 26, 2013 4:27 AM
To: inliniac/suricata
Cc: Kenneth Steele
Subject: Re: [suricata] Initial Tile mPIPE support (#403)


In src/runmode-tile.c:

> +

> +    /* Available cpus */

> +    uint16_t ncpus = UtilCpuGetNumProcessorsOnline();

> +

> +    TimeModeSetLive();

> +

> +    unsigned int pipe_max = 1;

> +    if (ncpus > 1)

> +        pipe_max = ncpus - 1;

> +

> +    intmax_t pipelines;

> +

> +    if (ConfGetInt("mpipe.threads", &pipelines) == 1) {

> +        TileNumPipelines = pipelines;

> +    } else {

> +        TileNumPipelines = pipe_max;

Simple curiosity: Why default to number of cpus - 1 if the number of threads is not set ?

—
Reply to this email directly or view it on GitHub<https://github.com/inliniac/suricata/pull/403/files#r4886254>.