From: Christoph Lameter <clameter@sgi.com>
To: akpm@linux-foundation.org
Cc: linux-kernel@vger.kernel.org, Jens Axboe <jens.axboe@oracle.com>
Subject: Define CONFIG_BOUNCE to avoid useless inclusion of bounce buffer logic.
Date: Mon, 21 May 2007 21:03:40 -0700 (PDT) [thread overview]
Message-ID: <Pine.LNX.4.64.0705212100420.24947@schroedinger.engr.sgi.com> (raw)
The bounce buffer logic is included on systems that do not need it.
If a system does not have zones like ZONE_DMA and ZONE_HIGHMEM that
can lead to the use of bounce buffers then there is no need to reserve
memory pools etc etc. This is true f.e. for SGI Altix.
Also nicifies the Makefile and gets rid of the tricky "and" there.
Signed-off-by: Christoph Lameter <clameter@sgi.com>
---
include/linux/blkdev.h | 2 +-
mm/Kconfig | 4 ++++
mm/Makefile | 4 +---
3 files changed, 6 insertions(+), 4 deletions(-)
Index: linux-2.6/include/linux/blkdev.h
===================================================================
--- linux-2.6.orig/include/linux/blkdev.h 2007-05-18 15:29:43.000000000 -0700
+++ linux-2.6/include/linux/blkdev.h 2007-05-18 15:32:48.000000000 -0700
@@ -607,7 +607,7 @@ extern unsigned long blk_max_low_pfn, bl
#define BLK_BOUNCE_ANY ((u64)blk_max_pfn << PAGE_SHIFT)
#define BLK_BOUNCE_ISA (ISA_DMA_THRESHOLD)
-#ifdef CONFIG_MMU
+#ifdef CONFIG_BOUNCE
extern int init_emergency_isa_pool(void);
extern void blk_queue_bounce(request_queue_t *q, struct bio **bio);
#else
Index: linux-2.6/mm/Kconfig
===================================================================
--- linux-2.6.orig/mm/Kconfig 2007-05-18 15:31:18.000000000 -0700
+++ linux-2.6/mm/Kconfig 2007-05-18 15:38:25.000000000 -0700
@@ -163,6 +163,10 @@ config ZONE_DMA_FLAG
default "0" if !ZONE_DMA
default "1"
+config BOUNCE
+ def_bool y
+ depends on BLOCK && MMU && (ZONE_DMA || HIGHMEM)
+
config NR_QUICK
int
depends on QUICKLIST
Index: linux-2.6/mm/Makefile
===================================================================
--- linux-2.6.orig/mm/Makefile 2007-05-18 15:27:57.000000000 -0700
+++ linux-2.6/mm/Makefile 2007-05-18 15:33:17.000000000 -0700
@@ -13,9 +13,7 @@ obj-y := bootmem.o filemap.o mempool.o
prio_tree.o util.o mmzone.o vmstat.o backing-dev.o \
$(mmu-y)
-ifeq ($(CONFIG_MMU)$(CONFIG_BLOCK),yy)
-obj-y += bounce.o
-endif
+obj-$(CONFIG_BOUNCE) += bounce.o
obj-$(CONFIG_SWAP) += page_io.o swap_state.o swapfile.o thrash.o
obj-$(CONFIG_HUGETLBFS) += hugetlb.o
obj-$(CONFIG_NUMA) += mempolicy.o
next reply other threads:[~2007-05-22 4:03 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-22 4:03 Christoph Lameter [this message]
2007-05-22 4:39 ` KAMEZAWA Hiroyuki
2007-05-22 5:27 ` Christoph Lameter
2007-05-23 14:07 ` Russell King
2007-05-23 17:15 ` Christoph Lameter
2007-05-23 22:58 ` Russell King
2007-05-23 23:07 ` Christoph Lameter
2007-05-24 7:50 ` Russell King
2007-05-24 3:47 ` Paul Mackerras
2007-05-24 4:03 ` Christoph Lameter
2007-06-03 22:24 ` Russell King
2007-05-24 9:57 ` Alan Cox
2007-05-22 7:08 ` 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=Pine.LNX.4.64.0705212100420.24947@schroedinger.engr.sgi.com \
--to=clameter@sgi.com \
--cc=akpm@linux-foundation.org \
--cc=jens.axboe@oracle.com \
--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®