Re: [PATCH] per-backing dev unplugging #2

From: Nathan Scott
Date: Thu Mar 11 2004 - 17:48:14 EST


Hi Jens,

On Thu, Mar 11, 2004 at 09:36:19AM +0100, Jens Axboe wrote:
> Hi,
>
> Final version, unless something stupid pops up. Changes:
>
> - Adapt to 2.6.4-mm1
> - Cleaned up the dm bits, much nicer with the lockless unplugging
> (thanks Joe)
> - md and loop unplugging, stacked devices should unplug their targets.
> Otherwise they'll end up waiting for the unplug timer, which sucks.
> - XFS fixed up, I hope. XFS folks still encouraged to look at this,
> looks better this time around though (and works, I tested).

...[snip]

> diff -ur -X /home/axboe/cdrom/exclude /opt/kernel/linux-2.6.4-mm1/fs/xfs/linux/xfs_buf.c linux-2.6.4-mm1/fs/xfs/linux/xfs_buf.c
> --- /opt/kernel/linux-2.6.4-mm1/fs/xfs/linux/xfs_buf.c 2004-03-11 03:55:21.000000000 +0100
> +++ linux-2.6.4-mm1/fs/xfs/linux/xfs_buf.c 2004-03-11 09:07:12.706793571 +0100

...[snip]

> @@ -1689,7 +1685,6 @@
> page_buf_t *pb;
> struct list_head *curr, *next, tmp;
> int pincount = 0;
> - int flush_cnt = 0;
>
> pagebuf_runall_queues(pagebuf_dataio_workqueue);
> pagebuf_runall_queues(pagebuf_logio_workqueue);
> @@ -1733,14 +1728,8 @@
>
> pagebuf_lock(pb);
> pagebuf_iostrategy(pb);
> - if (++flush_cnt > 32) {
> - blk_run_queues();
> - flush_cnt = 0;
> - }
> }
>
> - blk_run_queues();
> -

Extrapolating out from Steve's last comment yesterday/day before,
this final blk_run_queues removal here should be replaced with:

+ if (flags & PBDF_WAIT)
+ blk_run_address_space(target->pbr_mapping);

and we XFS guys need to huddle some more and figure out whether the
magic number used earlier there (32) and the request starvation it
was preventing, is still an issue on 2.6.

cheers.

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