From: Jens Axboe <axboe@suse.de>
To: Nathan Scott <nathans@sgi.com>
Cc: Linux Kernel <linux-kernel@vger.kernel.org>,
kenneth.w.chen@intel.com, Andrew Morton <akpm@osdl.org>,
thornber@redhat.com, linux-xfs@oss.sgi.com
Subject: Re: [PATCH] backing dev unplugging
Date: Thu, 11 Mar 2004 08:05:26 +0100 [thread overview]
Message-ID: <20040311070526.GD6955@suse.de> (raw)
In-Reply-To: <20040310222247.GA713@frodo>
On Thu, Mar 11 2004, Nathan Scott wrote:
> Hi Jens,
>
> On Wed, Mar 10, 2004 at 01:45:07PM +0100, Jens Axboe wrote:
> > ...[snip]...
> > diff -ur -X /home/axboe/cdrom/exclude /opt/kernel/linux-2.6.4-rc2-mm1/fs/xfs/linux/xfs_buf.c linux-2.6.4-rc2-mm1-plug/fs/xfs/linux/xfs_buf.c
> > --- /opt/kernel/linux-2.6.4-rc2-mm1/fs/xfs/linux/xfs_buf.c 2004-03-09 13:08:30.000000000 +0100
> > +++ linux-2.6.4-rc2-mm1-plug/fs/xfs/linux/xfs_buf.c 2004-03-10 13:13:49.000000000 +0100
> > @@ -1013,7 +1013,7 @@
> > {
> > PB_TRACE(pb, "lock", 0);
> > if (atomic_read(&pb->pb_io_remaining))
> > - blk_run_queues();
> > + blk_run_address_space(pb->pb_target->pbr_mapping);
> > down(&pb->pb_sema);
> > PB_SET_OWNER(pb);
> > PB_TRACE(pb, "locked", 0);
> > @@ -1109,7 +1109,7 @@
> > if (atomic_read(&pb->pb_pin_count) == 0)
> > break;
> > if (atomic_read(&pb->pb_io_remaining))
> > - blk_run_queues();
> > + blk_run_address_space(pb->pb_target->pbr_mapping);
> > schedule();
> > }
> > remove_wait_queue(&pb->pb_waiters, &wait);
> > @@ -1407,7 +1407,7 @@
> > if (pb->pb_flags & PBF_RUN_QUEUES) {
> > pb->pb_flags &= ~PBF_RUN_QUEUES;
> > if (atomic_read(&pb->pb_io_remaining) > 1)
> > - blk_run_queues();
> > + blk_run_address_space(pb->pb_target->pbr_mapping);
> > }
> > }
> >
> > @@ -1471,7 +1471,7 @@
> > {
> > PB_TRACE(pb, "iowait", 0);
> > if (atomic_read(&pb->pb_io_remaining))
> > - blk_run_queues();
> > + blk_run_address_space(pb->pb_target->pbr_mapping);
> > down(&pb->pb_iodonesema);
> > PB_TRACE(pb, "iowaited", (long)pb->pb_error);
> > return pb->pb_error;
> > @@ -1617,7 +1617,6 @@
> > pagebuf_daemon(
> > void *data)
> > {
> > - int count;
> > page_buf_t *pb;
> > struct list_head *curr, *next, tmp;
> >
> > @@ -1640,7 +1639,6 @@
> >
> > spin_lock(&pbd_delwrite_lock);
> >
> > - count = 0;
> > list_for_each_safe(curr, next, &pbd_delwrite_queue) {
> > pb = list_entry(curr, page_buf_t, pb_list);
> >
> > @@ -1657,7 +1655,7 @@
> > pb->pb_flags &= ~PBF_DELWRI;
> > pb->pb_flags |= PBF_WRITE;
> > list_move(&pb->pb_list, &tmp);
> > - count++;
> > + blk_run_address_space(pb->pb_target->pbr_mapping);
> > }
>
> This moves the blk_run_address_space to before we submit the
> I/O (this bit of code is moving buffers off the delwri queue
> onto a temporary queue, buffers on the temporary queue are
> then submitted a little further down) - I suspect we need to
> move this new blk_run_address_space call down into the temp
> list processing, just after pagebuf_iostrategy.
I'm not surprised, the XFS 'conversion' was done quickly and is expected
to be half-assed :)
Thanks a lot for taking a look at this.
> > }
> >
> > @@ -1671,8 +1669,6 @@
> >
> > if (as_list_len > 0)
> > purge_addresses();
> > - if (count)
> > - blk_run_queues();
> >
> > force_flush = 0;
> > } while (pagebuf_daemon_active);
> > @@ -1734,13 +1730,11 @@
> > pagebuf_lock(pb);
> > pagebuf_iostrategy(pb);
> > if (++flush_cnt > 32) {
> > - blk_run_queues();
> > + blk_run_address_space(pb->pb_target->pbr_mapping);
> > flush_cnt = 0;
> > }
> > }
> >
> > - blk_run_queues();
> > -
> > while (!list_empty(&tmp)) {
> > pb = list_entry(tmp.next, page_buf_t, pb_list);
> >
>
> For this second one, we probably just want to ditch the flush_cnt
> there (this change is doing blk_run_address_space on every 32nd
> buffer target, and not the intervening ones). We will be doing a
> bunch more blk_run_address_space calls than we probably need to,
> not sure if thats going to become an issue or not, let me prod
> some of the other XFS folks for more insight there...
If any of you could send me a replacement xfs_buf bit, I'd much
appreciate it.
--
Jens Axboe
next prev parent reply other threads:[~2004-03-11 7:05 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-10 12:45 [PATCH] backing dev unplugging Jens Axboe
2004-03-10 19:55 ` Andrew Morton
2004-03-10 20:03 ` Kenneth Chen
2004-03-10 20:20 ` Jens Axboe
2004-03-10 20:45 ` Jesse Barnes
2004-03-10 20:49 ` Jens Axboe
[not found] ` <20040310205237.GK15087@suse.de>
2004-03-10 21:01 ` Jesse Barnes
2004-03-10 21:02 ` Jens Axboe
2004-03-10 21:35 ` Jesse Barnes
2004-03-10 23:54 ` Andrew Morton
2004-03-11 0:03 ` David Mosberger
2004-03-11 6:30 ` Jesse Barnes
2004-03-10 20:17 ` Jens Axboe
2004-03-15 5:53 ` Kenneth Chen
2004-03-10 20:14 ` Jeff Garzik
2004-03-10 20:19 ` Jens Axboe
2004-03-10 21:00 ` Andrew Morton
2004-03-10 21:02 ` Jens Axboe
2004-03-10 21:40 ` Miquel van Smoorenburg
2004-03-10 23:05 ` Andrew Morton
2004-03-11 0:05 ` Miquel van Smoorenburg
2004-03-11 0:17 ` Andrew Morton
2004-03-11 6:43 ` Jens Axboe
2004-03-10 22:22 ` Nathan Scott
2004-03-10 23:32 ` Steve Lord
2004-03-11 7:05 ` Jens Axboe [this message]
2004-03-11 9:14 ` Joe Thornber
2004-03-11 9:16 ` Jens Axboe
2004-03-11 12:17 ` Christophe Saout
2004-03-11 12:22 ` Jens Axboe
2004-03-11 13:11 ` Christophe Saout
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040311070526.GD6955@suse.de \
--to=axboe@suse.de \
--cc=akpm@osdl.org \
--cc=kenneth.w.chen@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-xfs@oss.sgi.com \
--cc=nathans@sgi.com \
--cc=thornber@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.