Fix MMP write frequency for large pools

When a single pool contains more vdevs than the CONFIG_HZ for
for the kernel the mmp thread will not delay properly.  Switch
to using cv_timedwait_sig_hires() to handle higher resolution
delays.

This issue was reported on Arch Linux where HZ defaults to only
100 and this could be fairly easily reproduced with a reasonably
large pool.  Most distribution kernels set CONFIG_HZ=250 or
CONFIG_HZ=1000 and thus are unlikely to be impacted.

Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov>
Reviewed-by: Olaf Faaland <faaland1@llnl.gov>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #7205
Closes #7289
This commit is contained in:
Brian Behlendorf
2018-03-12 11:26:05 -07:00
committed by Tony Hutter
parent 267fd7b0f1
commit c30e716c81
2 changed files with 8 additions and 4 deletions
+5 -1
View File
@@ -54,10 +54,14 @@
#define MSEC2NSEC(m) ((hrtime_t)(m) * (NANOSEC / MILLISEC))
#endif
#ifndef NSEC2MSEC
#ifndef NSEC2MSEC
#define NSEC2MSEC(n) ((n) / (NANOSEC / MILLISEC))
#endif
#ifndef USEC2NSEC
#define USEC2NSEC(m) ((hrtime_t)(m) * (NANOSEC / MICROSEC))
#endif
#ifndef NSEC2SEC
#define NSEC2SEC(n) ((n) / (NANOSEC / SEC))
#endif