From: Douglas Gilbert <dougg@torque.net>
To: Mark Lobo <ntdeveloper2002@yahoo.com>
Cc: linux-scsi@vger.kernel.org
Subject: Re: Disabling block layer
Date: Mon, 26 Mar 2007 17:23:08 -0400 [thread overview]
Message-ID: <460839BC.9020204@torque.net> (raw)
In-Reply-To: <656559.33072.qm@web63001.mail.re1.yahoo.com>
Mark Lobo wrote:
> Hello!
>
> I had a question about disabling the block layer for SCSI devices. We
> have an embedded device, and it runs 2.4.30. We need to be able to
> support a lot of SCSI devices (in the thousands) for our device, and we
> talk to the devices via SG. We are facing a memory allocation problem
> after discovering a few thousand devices. For every device, there
> seems to be a lot of memory allocated in the block layer. This memory
> includes cache memory (which IIRC is reclaimable by the kernel memory
> subsystem when it needs it) and also pages that are used for the
> alloc_pages pool.
>
>
>
> My questions were relating to disabling the block layer for the
> devices. We always talk direct passthrough to the storage(except the
> local hard disk), and do not need the block layer at all.
>
> 1. Is there a way to disable the block layer for specific devices?
>
> 2. If yes, how can that be done, and are there any gotchas associated with that?
Mark,
Tempting thought that: linux without a block layer.
I think you have no hope in the lk 2.4 series and
even less in the lk 2.6 series.
Now for some thoughts. If you don't need to mount any
SCSI disks, you could build a kernel with sd as a
module and remove/hide sd_mod.o . A more invasive method
would be to modify the sd driver so that it was no
longer interested in SCSI devices whose peripheral
device type was zero (i.e. disks).
On the sg driver side, if lots of sg file descriptors
are open to those thousands of SCSI devices, then
reducing the per fd SG_DEF_RESERVED_SIZE from 32 KB
may help. This could be reduced by editing
include/scsi/sg.h .
Doug Gilbert
next prev parent reply other threads:[~2007-03-26 21:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-26 19:59 Disabling block layer Mark Lobo
2007-03-26 21:23 ` Douglas Gilbert [this message]
2007-03-26 21:35 ` James Bottomley
2007-03-26 22:33 ` Jeremy Linton
2007-03-28 11:24 ` Jens Axboe
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=460839BC.9020204@torque.net \
--to=dougg@torque.net \
--cc=linux-scsi@vger.kernel.org \
--cc=ntdeveloper2002@yahoo.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.