mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: corbet@lwn.net (Jonathan Corbet)
To: Gong Su <gongsu@cs.columbia.edu>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Linux 2.4.x block device driver question
Date: Mon, 02 Jun 2003 07:52:28 -0600	[thread overview]
Message-ID: <20030602135228.10819.qmail@eklektix.com> (raw)
In-Reply-To: Your message of "Sun, 01 Jun 2003 18:54:56 EDT." <5sukdv4jvcd417f7chvla92je3su1le1r8@4ax.com>

> I was trying to see how __make_request throttles a fast writing process
> from overrunning a slow device. So I took Alessandro Rubini's spull.c
> code from his device driver book (2nd edition)

Alessandro's...and that other guy's...:)

> dd if=/dev/zero of=/dev/pda bs=1024 count=1000000
> 
> What I expect is that the kernel will quickly stop dd after all 128 (64
> on machines with less than 32MB of ram) free request slots are taken.

As you noted, that didn't happen.  My guess is you ran out of memory.  The
requests you are generating will be, shall we say, easily merged in the
block subsystem.  So you have a bunch of requests in the device's queue,
but each one will have a long chain of buffer heads hanging off it.  You
may not have even managed to use up all the available request structures
before things came to a halt.  Try dropping the max_sectors[] count way
down, and things might work a little better.  After your fsck completes,
that is. 

jon

Jonathan Corbet
Executive editor, LWN.net
corbet@lwn.net

  reply	other threads:[~2003-06-02 13:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-01 22:54 Gong Su
2003-06-02 13:52 ` Jonathan Corbet [this message]
2003-06-02 17:23 Gong Su

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=20030602135228.10819.qmail@eklektix.com \
    --to=corbet@lwn.net \
    --cc=gongsu@cs.columbia.edu \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®