mirror of
				https://git.proxmox.com/git/mirror_zfs
				synced 2025-11-04 01:41:27 +00:00 
			
		
		
		
	Fix for "Reduce latency effects of non-interactive I/O"
It was found that setting min_active tunables for non-interactive I/Os makes them stuck. It is caused by zfs_vdev_nia_delay, that can never be reached if we never issue any I/Os due to min_active set to zero. Fix this by issuing at least one non-interactive I/O at a time when there are no interactive I/Os. When there are interactive I/Os, zero min_active allows to completely block any non-interactive I/O. It may min_active starvation in some scenarios, but who we are to deny foot shooting? Reviewed-by: George Melikov <mail@gmelikov.ru> Reviewed-by: Ryan Moeller <ryan@iXsystems.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Alexander Motin <mav@FreeBSD.org> Closes #11261
This commit is contained in:
		
							parent
							
								
									9109b89cd7
								
							
						
					
					
						commit
						dcf7044522
					
				@ -380,21 +380,21 @@ vdev_queue_class_max_active(spa_t *spa, vdev_queue_t *vq, zio_priority_t p)
 | 
			
		||||
			return (MIN(vq->vq_nia_credit,
 | 
			
		||||
			    zfs_vdev_scrub_min_active));
 | 
			
		||||
		} else if (vq->vq_nia_credit < zfs_vdev_nia_delay)
 | 
			
		||||
			return (zfs_vdev_scrub_min_active);
 | 
			
		||||
			return (MAX(1, zfs_vdev_scrub_min_active));
 | 
			
		||||
		return (zfs_vdev_scrub_max_active);
 | 
			
		||||
	case ZIO_PRIORITY_REMOVAL:
 | 
			
		||||
		if (vq->vq_ia_active > 0) {
 | 
			
		||||
			return (MIN(vq->vq_nia_credit,
 | 
			
		||||
			    zfs_vdev_removal_min_active));
 | 
			
		||||
		} else if (vq->vq_nia_credit < zfs_vdev_nia_delay)
 | 
			
		||||
			return (zfs_vdev_removal_min_active);
 | 
			
		||||
			return (MAX(1, zfs_vdev_removal_min_active));
 | 
			
		||||
		return (zfs_vdev_removal_max_active);
 | 
			
		||||
	case ZIO_PRIORITY_INITIALIZING:
 | 
			
		||||
		if (vq->vq_ia_active > 0) {
 | 
			
		||||
			return (MIN(vq->vq_nia_credit,
 | 
			
		||||
			    zfs_vdev_initializing_min_active));
 | 
			
		||||
		} else if (vq->vq_nia_credit < zfs_vdev_nia_delay)
 | 
			
		||||
			return (zfs_vdev_initializing_min_active);
 | 
			
		||||
			return (MAX(1, zfs_vdev_initializing_min_active));
 | 
			
		||||
		return (zfs_vdev_initializing_max_active);
 | 
			
		||||
	case ZIO_PRIORITY_TRIM:
 | 
			
		||||
		return (zfs_vdev_trim_max_active);
 | 
			
		||||
@ -403,7 +403,7 @@ vdev_queue_class_max_active(spa_t *spa, vdev_queue_t *vq, zio_priority_t p)
 | 
			
		||||
			return (MIN(vq->vq_nia_credit,
 | 
			
		||||
			    zfs_vdev_rebuild_min_active));
 | 
			
		||||
		} else if (vq->vq_nia_credit < zfs_vdev_nia_delay)
 | 
			
		||||
			return (zfs_vdev_rebuild_min_active);
 | 
			
		||||
			return (MAX(1, zfs_vdev_rebuild_min_active));
 | 
			
		||||
		return (zfs_vdev_rebuild_max_active);
 | 
			
		||||
	default:
 | 
			
		||||
		panic("invalid priority %u", p);
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user