public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@suse.de>
To: martin@dalecki.de
Cc: Stephen Lord <lord@sgi.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: A new ide warning message
Date: Fri, 2 Aug 2002 14:41:39 +0200	[thread overview]
Message-ID: <20020802124139.GR3010@suse.de> (raw)
In-Reply-To: <3D4A7BBE.90104@evision.ag>

On Fri, Aug 02 2002, Marcin Dalecki wrote:
> Uz.ytkownik Jens Axboe napisa?:
> 
> >>*/
> >>+	ch->max_segment_size = (1<<16) - 512;
> >>
> >>
> >>I would in esp. like to see the result of setting  ch->max_segment_size 
> >>= (1 << 15).
> >
> >
> >This might not be such a good idea, since the limit-bio-size etc stuff
> >isn't in yet, depending on _exactly_ how big the bio's xfs are building
> >are. If they are max 8 pages (I seem to recall so), then yeah the above
> >test would be nice to see. If they are bigger than 8 pages, then the
> >above would be a meaningless test.
> 
> Sure. I'm aware of this. And I haven't looked at the XFS code
> yet, so I can only guess about it.
> 
> What I can do myself is just pushing this limit even lower just to
> see at which point my own system (ext3) starts to turn tits up ...
> 
> >I'll hack up a rq_dump() function to slap in pcidma.c as well.
> 
> Yes that would be a "nice to have too".
> But it is a request for actual data as far as I can see.

Yeah it's a request for data, what else could it be? That's the only
place where we call blk_rq_map_sg().

Stephen, please provoke with this patch applied. I hope it works, it's
untested :-)

--- drivers/ide/pcidma.c~	2002-08-02 14:32:14.000000000 +0200
+++ drivers/ide/pcidma.c	2002-08-02 14:39:21.000000000 +0200
@@ -58,6 +58,24 @@
 	return ata_error(drive, rq, __FUNCTION__);
 }
 
+static void rq_dump(struct request *rq, int build_segments)
+{
+	struct bio_vec *bvec;
+	struct bio *bio;
+	int i = 0, ibio = 0;
+
+	printk("pcidma: build %d segments, supplied %d/%d, sectors %ld/%d\n", build_segments, rq->nr_phys_segments, rq->nr_hw_segments, rq->nr_sectors, rq->current_nr_sectors);
+
+	rq_for_each_bio(bio, rq) {
+		bio->bi_flags &= ~(1 << BIO_SEG_VALID);
+		printk("bio %d: phys %d, hw %d\n", ibio, bio_phys_segments(rq->q, bio), bio_hw_segments(rq->q, bio));
+		bio_for_each_segment(bvec, bio, i) {
+			printk("segment %d: phys %lu, size %u\n", i, bvec_to_phys(bvec), bvec->bv_len);
+		}
+		ibio++;
+	}
+}
+
 /*
  * FIXME: taskfiles should be a map of pages, not a long virt address... /jens
  * FIXME: I agree with Jens --mdcki!
@@ -107,7 +125,7 @@
 		nents = blk_rq_map_sg(&drive->queue, rq, ch->sg_table);
 
 		if (rq->q && nents > rq->nr_phys_segments)
-			printk("ide-dma: received %d phys segments, build %d\n", rq->nr_phys_segments, nents);
+			rq_dump(rq, nents);
 
 		if (rq_data_dir(rq) == READ)
 			ch->sg_dma_direction = PCI_DMA_FROMDEVICE;

-- 
Jens Axboe


  reply	other threads:[~2002-08-02 12:38 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-02 11:34 A new ide warning message Stephen Lord
2002-08-02 11:38 ` Marcin Dalecki
2002-08-02 11:53   ` Jens Axboe
2002-08-02 11:59     ` Jens Axboe
2002-08-02 13:47       ` Bartlomiej Zolnierkiewicz
2002-08-02 14:20         ` Jens Axboe
2002-08-02 16:01           ` Bartlomiej Zolnierkiewicz
2002-08-02 16:11             ` Jens Axboe
2002-08-03 18:41         ` Marcin Dalecki
2002-08-02 11:47 ` Jens Axboe
2002-08-02 11:48   ` Marcin Dalecki
2002-08-02 11:55     ` Jens Axboe
2002-08-02 12:05     ` Stephen Lord
2002-08-02 12:12       ` Marcin Dalecki
2002-08-02 12:30         ` Jens Axboe
2002-08-02 12:31           ` Marcin Dalecki
2002-08-02 12:41             ` Jens Axboe [this message]
2002-08-02 13:50               ` Steve Lord
2002-08-02 18:34                 ` Bartlomiej Zolnierkiewicz
  -- strict thread matches above, loose matches on Subject: below --
2002-08-03  3:28 Adam J. Richter
2002-08-03  3:32 Adam J. Richter

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=20020802124139.GR3010@suse.de \
    --to=axboe@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lord@sgi.com \
    --cc=martin@dalecki.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox