From: Dan Aloni <da-x@monatomic.org>
To: Marcelo <marcelo.tosatti@cyclades.com>
Cc: Linux Kernel List <linux-kernel@vger.kernel.org>
Subject: [PATCH 2.4.x] prevent emulated SCSI hosts from wasting DMA memory
Date: Wed, 30 Nov 2005 19:15:20 +0200 [thread overview]
Message-ID: <20051130171520.GB15505@localdomain> (raw)
Emulated scsi hosts don't do DMA, so don't unnecessarily increase
the SCSI DMA pool.
Signed-off-by: Dan Aloni <da-x@monatomic.org>
---
commit 8f6409c7c270038ca4d154551e061f66a9580301
tree ab7fedd2e7dbaefe31c332fc487f45a005972571
parent a0837aece47b79a2bfd524e70e4f8a559c743c4c
author Dan Aloni <da-x@monatomic.org> Wed, 30 Nov 2005 18:14:11 +0200
committer Dan Aloni <da-x@monatomic.org> Wed, 30 Nov 2005 18:14:11 +0200
drivers/scsi/scsi_dma.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/drivers/scsi/scsi_dma.c b/drivers/scsi/scsi_dma.c
index 5594828..52737d6 100644
--- a/drivers/scsi/scsi_dma.c
+++ b/drivers/scsi/scsi_dma.c
@@ -231,10 +231,17 @@ void scsi_resize_dma_pool(void)
need_isa_bounce_buffers = 0;
if (scsi_devicelist)
- for (shpnt = scsi_hostlist; shpnt; shpnt = shpnt->next)
+ for (shpnt = scsi_hostlist; shpnt; shpnt = shpnt->next) {
+ if (shpnt->hostt->emulated)
+ continue;
+
new_dma_sectors += SECTORS_PER_PAGE; /* Increment for each host */
+ }
for (host = scsi_hostlist; host; host = host->next) {
+ if (host->hostt->emulated)
+ continue;
+
for (SDpnt = host->host_queue; SDpnt; SDpnt = SDpnt->next) {
/*
* sd and sr drivers allocate scatterlists.
--
Dan Aloni
da-x@monatomic.org, da-x@colinux.org, da-x@gmx.net
next reply other threads:[~2005-11-30 17:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-30 17:15 Dan Aloni [this message]
2005-11-30 19:33 ` Luke-Jr
2005-11-30 21:02 ` Dan Aloni
2005-12-01 11:36 ` Christoph Hellwig
2005-12-01 15:39 ` Dan Aloni
2005-12-21 18:17 ` Marcelo Tosatti
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=20051130171520.GB15505@localdomain \
--to=da-x@monatomic.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo.tosatti@cyclades.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 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®