sched: Provide sparsemask, a reduced contention bitmap
maillist inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I8PIYZ CVE: NA Reference: https://lore.kernel.org/lkml/1541767840-93588-2-git-send-email-steven.sistare@oracle.com/ --------------------------- 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@oracle.com> Signed-off-by:
Cheng Yu <serein.chengyu@huawei.com>
Loading
Please sign in to comment