All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Osterlund <petero2@telia.com>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: 2.6.9-rc1-mm3
Date: 05 Sep 2004 10:59:27 +0200	[thread overview]
Message-ID: <m3brglay6o.fsf@telia.com> (raw)
In-Reply-To: <20040903093727.5810bb7d.akpm@osdl.org>

[-- Attachment #1: Type: text/plain, Size: 3921 bytes --]

Andrew Morton <akpm@osdl.org> writes:

> Peter Osterlund <petero2@telia.com> wrote:
> >
> > One problem that does remain though, is that when dumping huge amounts
> >  of data to a CD or DVD disc (so that you get memory pressure), the
> >  effective writing speed of other block devices (like IDE hard disks)
> >  is reduced to the same speed as the packet device.
> > 
> >  I have posted a patch that fixes this problem by limiting the amount
> >  of writeback data in the packet driver, but unfortunately it makes the
> >  effective writing speed of the packet device suffer a lot. The proper
> >  fix is probably to improve the filesystem and/or VM code to start I/O
> >  operations in sequential order a lot more often than it currently
> >  does.
> 
> If you decrease /proc/sys/vm/dirty_ratio and dirty_background_ratio to much
> smaller levels, does that fix things up? 

No, it seems to slow the packet device down without improving the hard
disk speed.

I wrote a patch that logs what I/O operations are received by the
packet driver. For my test case, which does

        time cp -av /testdata /udf ; time sync

where /testdata contains 120MB of data in 29 files, the I/O pattern
looks like this:

    10:06:03   421 - 1905
    10:06:03   1906 - 2482
    10:06:03   4255 - 6031
    10:06:03   6032 - 6320
    10:06:03   8514 - 10277
    10:06:03   10278 - 10566
    10:06:03   13773 - 15821
    10:06:03   16520 - 18568
    10:06:03   19021 - 21068
    10:06:03   21069 - 23117
    10:06:03   23208 - 24869
    10:06:03   24870 - 25286
    10:06:03   27120 - 28714
    10:06:03   28715 - 29195
    10:06:03   30307 - 32355
    10:06:03   32732 - 34704
    10:06:03   34705 - 34801
    10:06:03   36905 - 38953
    10:06:03   39390 - 41283
    10:06:03   41284 - 41444
    10:06:03   43663 - 45008
    10:06:03   45009 - 45713
    10:06:03   46719 - 48678
    10:06:03   48679 - 48775
    10:06:03   51004 - 53052
    10:06:03   53497 - 55545
    10:06:03   2482 - 4254
    10:06:03   55581 - 55869
    10:06:03   6320 - 8368
    10:06:03   57527 - 59529
    10:06:03   10566 - 10630
    10:06:03   59530 - 61578
    10:06:03   15821 - 16466
    10:06:03   16474 - 16519
    10:06:03   18568 - 19020
    10:06:03   23117 - 23207
    10:06:03   25286 - 26118
    10:06:03   29195 - 30306
    10:06:03   32355 - 32731
    10:06:03   34801 - 35377
    10:06:03   38953 - 39389
    10:06:03   41444 - 43076
    10:06:03   45713 - 46718
    10:06:03   48775 - 49831
    10:06:03   53052 - 53496
    10:06:03   55545 - 55579
    10:06:03   55869 - 57469
    10:06:03   8368 - 8513
    10:06:03   10630 - 12550
    10:06:03   61578 - 62086
    10:06:03   26118 - 27119
    10:06:03   35377 - 35921
    10:06:03   43076 - 43662
    10:06:04   49831 - 51003
    10:06:04   57469 - 57526
    10:06:04   12550 - 12806
    10:06:04   35921 - 36904
    10:06:04   12806 - 13772
    10:06:04   273 - 278
    10:06:04   417 - 418
    10:06:04   419 - 421
    10:06:04   1905 - 1906
    10:06:04   4254 - 4255
    10:06:04   6031 - 6032
    10:06:04   8513 - 8514
    10:06:04   10277 - 10278
    10:06:04   13772 - 13773
    10:06:04   16519 - 16520
    10:06:04   19020 - 19021
    10:06:04   21068 - 21069
    10:06:04   23207 - 23208
    10:06:04   24869 - 24870
    10:06:04   27119 - 27120
    10:06:04   28714 - 28715
    10:06:04   30306 - 30307
    10:06:04   32731 - 32732
    10:06:04   34704 - 34705
    10:06:04   36904 - 36905
    10:06:04   39389 - 39390
    10:06:04   41283 - 41284
    10:06:04   43662 - 43663
    10:06:04   45008 - 45009
    10:06:04   46718 - 46719
    10:06:04   48678 - 48679
    10:06:04   51003 - 51004
    10:06:04   53496 - 53497
    10:06:04   55579 - 55581
    10:06:04   57526 - 57527
    10:06:31   59529 - 59530
    10:06:31   273 - 274

See attachment for a graph of this data. The X axis corresponds to the
I/O submission order and the Y axis corresponds to the sector numbers.


[-- Attachment #2: IO_pattern.png --]
[-- Type: image/png, Size: 5503 bytes --]

[-- Attachment #3: Type: text/plain, Size: 1426 bytes --]


diff -puN drivers/block/pktcdvd.c~packet-io-log drivers/block/pktcdvd.c
--- linux/drivers/block/pktcdvd.c~packet-io-log	2004-09-05 10:35:24.697900200 +0200
+++ linux-petero/drivers/block/pktcdvd.c	2004-09-05 10:35:24.701899592 +0200
@@ -896,6 +896,27 @@ static inline void pkt_set_state(struct 
 	pkt->state = state;
 }
 
+static void pkt_io_log(struct bio *bio)
+{
+	static sector_t start, stop;
+	typedef unsigned long long ull;
+
+	if (bio) {
+		if (stop == bio->bi_sector) {
+			stop = stop + bio_sectors(bio);
+		} else {
+			if (start != stop)
+				printk("pkt: %lld - %lld\n", (ull)(start >> 2), (ull)(stop >> 2));
+			start = bio->bi_sector;
+			stop = start + bio_sectors(bio);
+		}
+	} else {
+		if (start != stop)
+			printk("pkt: %lld - %lld\n", (ull)(start >> 2), (ull)(stop >> 2));
+		start = stop = 0;
+	}
+}
+
 /*
  * Scan the work queue to see if we can start a new packet.
  * returns non-zero if any work was done.
@@ -949,6 +970,8 @@ try_next_bio:
 	spin_unlock(&pd->lock);
 	if (!bio) {
 		VPRINTK("handle_queue: no bio\n");
+		if (list_empty(&pd->cdrw.pkt_active_list))
+			pkt_io_log(NULL);
 		return 0;
 	}
 
@@ -2197,6 +2220,8 @@ static int pkt_make_request(request_queu
 		}
 	}
 
+	pkt_io_log(bio);
+
 	/*
 	 * If we find a matching packet in state WAITING or READ_WAIT, we can
 	 * just append this bio to that packet.
_

-- 
Peter Osterlund - petero2@telia.com
http://w1.894.telia.com/~u89404340

  reply	other threads:[~2004-09-05  8:59 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-03  8:48 2.6.9-rc1-mm3 Andrew Morton
2004-09-03  7:43 ` [PATCH] 2.6.9-rc1-mm3 i8042 compilation Bernhard Rosenkraenzer
2004-09-03  9:47   ` Andrew Morton
2004-09-03  9:20 ` 2.6.9-rc1-mm3 Russell King
2004-09-03  9:42 ` 2.6.9-rc1-mm3 Christoph Hellwig
2004-09-03 12:15   ` 2.6.9-rc1-mm3 Zwane Mwaikambo
2004-09-03 12:25     ` 2.6.9-rc1-mm3 Christoph Hellwig
2004-09-03 12:48     ` 2.6.9-rc1-mm3 Zwane Mwaikambo
2004-09-06 12:55       ` [PATCH 2.6.9-rc1-mm3] [m32r] Change from EXPORT_SYMBOL_NOVERS to EXPORT_SYMBOL Hirokazu Takata
2004-09-06 13:11         ` Sam Ravnborg
2004-09-06 13:55           ` Russell King
2004-09-06 13:52       ` EXPORT_SYMBOL_NOVERS (was: Re: 2.6.9-rc1-mm3) Geert Uytterhoeven
2004-09-06 15:30         ` Zwane Mwaikambo
2004-09-06 19:09           ` [PATCH 0/4] " Geert Uytterhoeven
2004-09-08 14:18             ` Zwane Mwaikambo
2004-09-06 19:09           ` [PATCH 1/4] " Geert Uytterhoeven
2004-09-06 19:09           ` [PATCH 2/4] " Geert Uytterhoeven
2004-09-06 19:10           ` [PATCH 3/4] " Geert Uytterhoeven
2004-09-06 19:10           ` [PATCH 4/4] " Geert Uytterhoeven
2004-09-03  9:54 ` 2.6.9-rc1-mm3 Christoph Hellwig
2004-09-06 12:40   ` [PATCH 2.6.9-rc1-mm3] [m32r] Modify sys_ipc() to remove useless iBCS2 support code Hirokazu Takata
2004-09-06 17:03     ` Christoph Hellwig
2004-09-06 21:02     ` Andrew Morton
2004-09-06 21:08       ` Christoph Hellwig
2004-09-07  8:02     ` Arnd Bergmann
2004-09-03  9:57 ` 2.6.9-rc1-mm3 Christoph Hellwig
2004-09-03 11:08 ` 2.6.9-rc1-mm3 Hirokazu Takata
2004-09-03 12:08 ` 2.6.9-rc1-mm3 Zwane Mwaikambo
2004-09-03 15:15 ` 2.6.9-rc1-mm3 Norberto Bensa
2004-09-03 16:27   ` 2.6.9-rc1-mm3 Andrew Morton
2004-09-03 17:20     ` 2.6.9-rc1-mm3 Norberto Bensa
2004-09-05 19:59       ` 2.6.9-rc1-mm3 Norberto Bensa
2004-09-05 22:32         ` 2.6.9-rc1-mm3 Andrew Morton
2004-09-05 22:42           ` 2.6.9-rc1-mm3 Nathan Scott
2004-09-03 15:59 ` 2.6.9-rc1-mm3 Peter Osterlund
2004-09-03 16:37   ` 2.6.9-rc1-mm3 Andrew Morton
2004-09-05  8:59     ` Peter Osterlund [this message]
2004-09-03 17:23 ` 2.6.9-rc1-mm3 William Lee Irwin III
2004-09-03 17:51   ` 2.6.9-rc1-mm3 Paulo Marques
2004-09-03 18:02     ` 2.6.9-rc1-mm3 William Lee Irwin III
2004-09-05 22:33       ` 2.6.9-rc1-mm3 Paulo Marques
2004-09-07 10:54         ` 2.6.9-rc1-mm3 Paulo Marques
2004-09-03 17:56 ` 2.6.9-rc1-mm3 Andre Eisenbach
2004-09-03 18:12   ` 2.6.9-rc1-mm3 William Lee Irwin III
2004-09-03 18:19     ` 2.6.9-rc1-mm3 Andre Eisenbach
2004-09-03 20:33   ` 2.6.9-rc1-mm3 Andrew Morton
2004-09-03 21:15     ` 2.6.9-rc1-mm3 Andre Eisenbach
2004-09-03 17:57 ` 2.6.9-rc1-mm3 (compile stats) John Cherry
2004-09-03 21:53 ` 2.6.9-rc1-mm3 William Lee Irwin III
2004-09-03 22:25 ` 2.6.9-rc1-mm3 William Lee Irwin III
2004-09-04 10:21 ` [patch] 2.6.9-rc1-mm3: char/riscom8.c doesn't compile Adrian Bunk
2004-09-04 17:52 ` [patch] 2.6.9-rc1-mm3: cdrom/cdu31a.c " Adrian Bunk
2004-09-08 22:29 ` 2.6.9-rc1-mm3 Dominik Karall

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=m3brglay6o.fsf@telia.com \
    --to=petero2@telia.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    /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.