Mark -
Yes, our implementation holds the mutex for every 4096KB of dump, which amounts to scanning half of million pages on the LRU list and 8GB of buffer pool dumped. We may adjust this amount up or down depending on what results we see.
Re. lines 109 and 117/118, indeed they don’t look correct, thanks. We’ll take care of this. This would only have impact in the case of I/O failure of the write.
The MySQL 5.6 implementation seems to acquire the buffer pool mutex for every buffer pool instance, save the dump info, release the mutex, write, repeat. So it seems effectively similar (modulo the different InnoDB and XtraDB mutexes…) to our fix with the difference of the mutex holding duration set to the buffer pool instance size instead of 8GB.
Tuning the number of buffer pools for Percona Server would of course do nothing for that 8GB constant, except for the instances that are sized to a non-multiple of 8GB.