Re: [PATCH v2] Adding userspace_libaio_reap option

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2011-08-30 18:50, Dan Ehrenberg wrote:
> @@ -66,7 +107,16 @@ static int fio_libaio_getevents(struct thread_data *td, unsigned int min,
>  	int r, events = 0;
>  
>  	do {
> -		r = io_getevents(ld->aio_ctx, actual_min, max, ld->aio_events + events, t);
> +		if (td->o.userspace_libaio_reap == 1
> +		    && actual_min == 0
> +		    && ((struct aio_ring *)(ld->aio_ctx))->magic
> +				== AIO_RING_MAGIC) {
> +			r = user_io_getevents(ld->aio_ctx, max,
> +				ld->aio_events + events);
> +		} else {
> +			r = io_getevents(ld->aio_ctx, actual_min,
> +				max, ld->aio_events + events, t);
> +		}

One question here - why depend on actual_min == 0? The check is
practically free, would not hurt to do the user_io_getevents() first and
punt to io_getevents() afterwards if need be.

-- 
Jens Axboe

--
To unsubscribe from this list: send the line "unsubscribe fio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel]     [Linux SCSI]     [Linux IDE]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux