HomeFreeBSD

Fix preemptible warning in aggsum_add()

Description

Fix preemptible warning in aggsum_add()

In the new aggsum counters the CPU_SEQID macro should be surrounded by
kpreempt_disable)() and kpreempt_enable() calls to prevent a Linux
kernel BUG warning. The addsum_add() function use the cpuid to
minimize lock contention when selecting a bucket, after selection
the bucket is protected by a mutex and it is safe to reschedule the
process to a different processor at any time.

Reviewed-by: Matthew Thode <prometheanfire@gentoo.org>
Reviewed-by: Paul Dagnelie <pcd@delphix.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #7609
Closes #7610

Details

Provenance
Brian Behlendorf <behlendorf1@llnl.gov>Authored on Jun 7 2018, 10:55 PM
GitHub <noreply@github.com>Committed on Jun 7 2018, 10:55 PM
Parents
rG39042f97365c: Tunable directory for zfs runtime scripts
Branches
Unknown
Tags
Unknown

Event Timeline

GitHub <noreply@github.com> committed rG174bcd581d54: Fix preemptible warning in aggsum_add() (authored by Brian Behlendorf <behlendorf1@llnl.gov>).Jun 7 2018, 10:55 PM