[PATCH] Time sliced CFQ #3

From: Jens Axboe
Date: Mon Dec 06 2004 - 08:29:52 EST


On Mon, Dec 06 2004, Prakash K. Cheemplavam wrote:
> Jens Axboe schrieb:
> >On Mon, Dec 06 2004, Prakash K. Cheemplavam wrote:
> >
> >>Hi,
> >>
> >>this one crapped out on me, while having heavy disk activity. (updating
> >>gentoo portage tree - rebuilding metadata of it). Unfortunately I
> >>couldn't save the oops, as I had no hd access anymore and X would freeze
> >>a little later...(and I don't want to risk my data a second time...)
> >
> >
> >Did you save anything at all? Just the function of the EIP would be
> >better than nothing.
>
> Nope, sorry. I hoped it would be in the logs, but it seems as new cfq
> went havoc, hd access went dead. And I was a bit too nervous about my
> data so that I didn't write it down by hand...

It is really rare for the io scheduler to cause serious data screwups,
thankfully. Often what will happen is that it will crash, but with
everything written fine up to that point. So it's similar to a power
loss, but the drive should get it's cache out on its own.

> >Well hard to say anything qualified without an oops :/
> >
> >I'll try with PREEMPT here.
>
> If you are not able to reproduce, I will try it again on a spare
> partition... Should access to zip drive stil be possible if hd's
> io-scheduler is dead?

Depends on where it died, really. But the chances are probably slim.

If you feel like giving it another go, I've uploaded a new patch here:

http://www.kernel.org/pub/linux/kernel/people/axboe/patches/v2.6/2.6.10-rc3/cfq-time-slices-6.gz

Changes:

- Increase async_rq slice significantly (from 8 to 128)

- Fix accounting bug that prevented non-fs requests from working
correctly. Things like cdrecord and cdda rippers would hang.

- Add logic to check whether a given process is potentially runnable or
not. We don't arm the slice idle timer if the process has exited or is
not either running or about to be running.

- TCQ fix: don't idle drive until last request comes in.

- Fix a stall with exiting task holding the active queue. This should
fix Helges problems, I hope.

- Restore ->nr_requests on io scheduler switch

- Kill ->pid from io_context, this seems to have been added with 'as'
but never used by anyone.


--
Jens Axboe

-
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/