Re: [PATCH v4 01/10] sched: Provide sparsemask, a reduced contention bitmap
From: Tim Chen
Date: Thu Jan 31 2019 - 14:18:59 EST
On 12/6/18 1:28 PM, Steve Sistare wrote:
> Provide struct sparsemask and functions to manipulate it. A sparsemask is
> a sparse bitmap. It reduces cache contention vs the usual bitmap when many
> threads concurrently set, clear, and visit elements, by reducing the number
> of significant bits per cacheline. For each cacheline chunk of the mask,
> only the first K bits of the first word are used, and the remaining bits
> are ignored, where K is a creation time parameter. Thus a sparsemask that
> can represent a set of N elements is approximately (N/K * CACHELINE) bytes
> in size.
>
> This type is simpler and more efficient than the struct sbitmap used by
> block drivers.
>
> Signed-off-by: Steve Sistare <steven.sistare@xxxxxxxxxx>
Steve,
We did a test of this patch set with an OLTP benchmark using Oracle database
on a 2 socket SKX platform with 2 X 28 cores. The patchset boosted the
performance by 3.5%.
The percentage of cpu idle time is lowered by 5%,
with user time increased by 4% and kernel time increased by 1%,
indicating a better cpu utilization overall.
The performance looks encouraging.
Thanks.
Tim