Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Mar 2001 13:46:40 -0800 (PST)
From:      Gersh <gersh@sonn.com>
To:        freebsd-hackers@FreeBSD.ORG
Subject:   crash dump speed up patch.
Message-ID:  <Pine.BSF.4.21.0103271335580.3635-200000@tabby.sonn.com>

next in thread | raw e-mail | index | archive | help
  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.
  Send mail to mime@docserver.cac.washington.edu for more info.

--0-576564399-985729600=:3635
Content-Type: TEXT/PLAIN; charset=US-ASCII

Ive writen a quick patch for dev/ata/ata-disk.c:addump under
4.0-stable (03/26/01) which is considerbally faster.

I did dumps on a SMP system with 512 megs of ram.

Old:  201 seconds.
New:   59 seconds.

What I could gather from talking to people over irc/email about the
problem was that there was a DELAY(1000) in between each printf
to deal with problems with serial connections to the debugger.  The
soultion I came up with simply to display a smaller ammount of printf's
the output looks like this:

Dump in progress, percentage complete: 10 20 30 40 50 60 70 80 100.  Done.

The dump_stats() routine probally belongs in some kern/subr_whatever.c
and should probally be used in the other dump routines for da/ide etc.

Any thoughts or comments ?

--0-576564399-985729600=:3635
Content-Type: TEXT/PLAIN; charset=US-ASCII; name="ata-disk.c.patch"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.BSF.4.21.0103271346400.3635@tabby.sonn.com>
Content-Description: 
Content-Disposition: attachment; filename="ata-disk.c.patch"

LS0tIGF0YS1kaXNrLmMub3JpZwlUdWUgTWFyIDI3IDEwOjMxOjU5IDIwMDEN
CisrKyBhdGEtZGlzay5jCVR1ZSBNYXIgMjcgMTQ6Mzk6MjQgMjAwMQ0KQEAg
LTkxLDYgKzkxLDcgQEANCiBzdGF0aWMgc3RydWN0IGNkZXZzdyBmYWtld2Rk
aXNrX2NkZXZzdzsNCiANCiAvKiBwcm90b3R5cGVzICovDQoraW50IGR1bXBf
c3RhdHMoaW50LCBpbnQsIGludCAqKTsNCiBzdGF0aWMgdm9pZCBhZF90aW1l
b3V0KHN0c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KKwkJew0KKwkJICAgIHByaW50ZigiJWQgIiwgKnN0YXRlKTsNCisJ
CSAgICAqc3RhdGUgPSA5MDsgDQorCQl9DQorCSAgICBicmVhazsNCisNCisJ
ICAgIGNhc2UgOTA6DQorCQlpZiAoY291bnQgPT0gMTAwKQ0KKwkJew0KKwkJ
ICAgICpzdGF0ZSA9IDEwMDsgDQorCQkgICAgcHJpbnRmKCIlZC4gIERvbmUi
LCAqc3RhdGUpOw0KKwkJfQ0KKwkgICAgYnJlYWs7DQorDQorCSAgICBkZWZh
dWx0Og0KKwkgICAgYnJlYWs7DQorCX0NCisNCisJcmV0dXJuIDA7DQogfQ0K

--0-576564399-985729600=:3635--

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0103271335580.3635-200000>