Re: Time sliced CFQ io scheduler

From: Andrea Arcangeli
Date: Tue Dec 07 2004 - 21:34:49 EST


On Tue, Dec 07, 2004 at 06:25:57PM -0800, Andrew Morton wrote:
> That's a missing hint in the direct-io code. This fixes it up:
>
> --- 25/fs/direct-io.c~a 2004-12-07 18:12:25.491602512 -0800
> +++ 25-akpm/fs/direct-io.c 2004-12-07 18:13:13.661279608 -0800
> @@ -1161,6 +1161,8 @@ __blockdev_direct_IO(int rw, struct kioc
> struct dio *dio;
> int reader_with_isem = (rw == READ && dio_lock_type == DIO_OWN_LOCKING);
>
> + current->flags |= PF_SYNCWRITE;
> +
> if (bdev)
> bdev_blkbits = blksize_bits(bdev_hardsect_size(bdev));
>
> @@ -1244,6 +1246,7 @@ __blockdev_direct_IO(int rw, struct kioc
> out:
> if (reader_with_isem)
> up(&inode->i_sem);
> + current->flags &= ~PF_SYNCWRITE;
> return retval;
> }
> EXPORT_SYMBOL(__blockdev_direct_IO);

that was fast ;) great, thanks!

> I don't think AS will ever meet the performance of CFQ or deadline for the

This is my expectation too, since for these apps write latency is almost
more important than read latency and writes are often sync.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/