2005-04-17 06:20:36 +08:00
|
|
|
#
|
|
|
|
# Makefile for the linux memory manager.
|
|
|
|
#
|
|
|
|
|
|
|
|
mmu-y := nommu.o
|
|
|
|
mmu-$(CONFIG_MMU) := fremap.o highmem.o madvise.o memory.o mincore.o \
|
|
|
|
mlock.o mmap.o mprotect.o mremap.o msync.o rmap.o \
|
|
|
|
vmalloc.o
|
|
|
|
|
|
|
|
obj-y := bootmem.o filemap.o mempool.o oom_kill.o fadvise.o \
|
|
|
|
page_alloc.o page-writeback.o pdflush.o \
|
2006-01-08 17:01:45 +08:00
|
|
|
readahead.o swap.o truncate.o vmscan.o \
|
2006-10-20 14:28:16 +08:00
|
|
|
prio_tree.o util.o mmzone.o vmstat.o backing-dev.o \
|
|
|
|
$(mmu-y)
|
2005-04-17 06:20:36 +08:00
|
|
|
|
[PATCH] BLOCK: Make it possible to disable the block layer [try #6]
Make it possible to disable the block layer. Not all embedded devices require
it, some can make do with just JFFS2, NFS, ramfs, etc - none of which require
the block layer to be present.
This patch does the following:
(*) Introduces CONFIG_BLOCK to disable the block layer, buffering and blockdev
support.
(*) Adds dependencies on CONFIG_BLOCK to any configuration item that controls
an item that uses the block layer. This includes:
(*) Block I/O tracing.
(*) Disk partition code.
(*) All filesystems that are block based, eg: Ext3, ReiserFS, ISOFS.
(*) The SCSI layer. As far as I can tell, even SCSI chardevs use the
block layer to do scheduling. Some drivers that use SCSI facilities -
such as USB storage - end up disabled indirectly from this.
(*) Various block-based device drivers, such as IDE and the old CDROM
drivers.
(*) MTD blockdev handling and FTL.
(*) JFFS - which uses set_bdev_super(), something it could avoid doing by
taking a leaf out of JFFS2's book.
(*) Makes most of the contents of linux/blkdev.h, linux/buffer_head.h and
linux/elevator.h contingent on CONFIG_BLOCK being set. sector_div() is,
however, still used in places, and so is still available.
(*) Also made contingent are the contents of linux/mpage.h, linux/genhd.h and
parts of linux/fs.h.
(*) Makes a number of files in fs/ contingent on CONFIG_BLOCK.
(*) Makes mm/bounce.c (bounce buffering) contingent on CONFIG_BLOCK.
(*) set_page_dirty() doesn't call __set_page_dirty_buffers() if CONFIG_BLOCK
is not enabled.
(*) fs/no-block.c is created to hold out-of-line stubs and things that are
required when CONFIG_BLOCK is not set:
(*) Default blockdev file operations (to give error ENODEV on opening).
(*) Makes some /proc changes:
(*) /proc/devices does not list any blockdevs.
(*) /proc/diskstats and /proc/partitions are contingent on CONFIG_BLOCK.
(*) Makes some compat ioctl handling contingent on CONFIG_BLOCK.
(*) If CONFIG_BLOCK is not defined, makes sys_quotactl() return -ENODEV if
given command other than Q_SYNC or if a special device is specified.
(*) In init/do_mounts.c, no reference is made to the blockdev routines if
CONFIG_BLOCK is not defined. This does not prohibit NFS roots or JFFS2.
(*) The bdflush, ioprio_set and ioprio_get syscalls can now be absent (return
error ENOSYS by way of cond_syscall if so).
(*) The seclvl_bd_claim() and seclvl_bd_release() security calls do nothing if
CONFIG_BLOCK is not set, since they can't then happen.
Signed-Off-By: David Howells <dhowells@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2006-10-01 02:45:40 +08:00
|
|
|
ifeq ($(CONFIG_MMU)$(CONFIG_BLOCK),yy)
|
2006-08-30 02:06:00 +08:00
|
|
|
obj-y += bounce.o
|
|
|
|
endif
|
2005-04-17 06:20:36 +08:00
|
|
|
obj-$(CONFIG_SWAP) += page_io.o swap_state.o swapfile.o thrash.o
|
|
|
|
obj-$(CONFIG_HUGETLBFS) += hugetlb.o
|
|
|
|
obj-$(CONFIG_NUMA) += mempolicy.o
|
[PATCH] sparsemem memory model
Sparsemem abstracts the use of discontiguous mem_maps[]. This kind of
mem_map[] is needed by discontiguous memory machines (like in the old
CONFIG_DISCONTIGMEM case) as well as memory hotplug systems. Sparsemem
replaces DISCONTIGMEM when enabled, and it is hoped that it can eventually
become a complete replacement.
A significant advantage over DISCONTIGMEM is that it's completely separated
from CONFIG_NUMA. When producing this patch, it became apparent in that NUMA
and DISCONTIG are often confused.
Another advantage is that sparse doesn't require each NUMA node's ranges to be
contiguous. It can handle overlapping ranges between nodes with no problems,
where DISCONTIGMEM currently throws away that memory.
Sparsemem uses an array to provide different pfn_to_page() translations for
each SECTION_SIZE area of physical memory. This is what allows the mem_map[]
to be chopped up.
In order to do quick pfn_to_page() operations, the section number of the page
is encoded in page->flags. Part of the sparsemem infrastructure enables
sharing of these bits more dynamically (at compile-time) between the
page_zone() and sparsemem operations. However, on 32-bit architectures, the
number of bits is quite limited, and may require growing the size of the
page->flags type in certain conditions. Several things might force this to
occur: a decrease in the SECTION_SIZE (if you want to hotplug smaller areas of
memory), an increase in the physical address space, or an increase in the
number of used page->flags.
One thing to note is that, once sparsemem is present, the NUMA node
information no longer needs to be stored in the page->flags. It might provide
speed increases on certain platforms and will be stored there if there is
room. But, if out of room, an alternate (theoretically slower) mechanism is
used.
This patch introduces CONFIG_FLATMEM. It is used in almost all cases where
there used to be an #ifndef DISCONTIG, because SPARSEMEM and DISCONTIGMEM
often have to compile out the same areas of code.
Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Dave Hansen <haveblue@us.ibm.com>
Signed-off-by: Martin Bligh <mbligh@aracnet.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Yasunori Goto <y-goto@jp.fujitsu.com>
Signed-off-by: Bob Picco <bob.picco@hp.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-23 15:07:54 +08:00
|
|
|
obj-$(CONFIG_SPARSEMEM) += sparse.o
|
2005-04-17 06:20:36 +08:00
|
|
|
obj-$(CONFIG_SHMEM) += shmem.o
|
2006-09-29 17:01:35 +08:00
|
|
|
obj-$(CONFIG_TMPFS_POSIX_ACL) += shmem_acl.o
|
2005-04-17 06:20:36 +08:00
|
|
|
obj-$(CONFIG_TINY_SHMEM) += tiny-shmem.o
|
2006-01-08 17:01:45 +08:00
|
|
|
obj-$(CONFIG_SLOB) += slob.o
|
|
|
|
obj-$(CONFIG_SLAB) += slab.o
|
2007-05-07 05:49:36 +08:00
|
|
|
obj-$(CONFIG_SLUB) += slub.o
|
2005-10-30 09:16:54 +08:00
|
|
|
obj-$(CONFIG_MEMORY_HOTPLUG) += memory_hotplug.o
|
2005-06-24 13:05:25 +08:00
|
|
|
obj-$(CONFIG_FS_XIP) += filemap_xip.o
|
2006-03-22 16:09:12 +08:00
|
|
|
obj-$(CONFIG_MIGRATION) += migrate.o
|
2006-09-26 14:31:50 +08:00
|
|
|
obj-$(CONFIG_SMP) += allocpercpu.o
|
2007-05-07 05:49:50 +08:00
|
|
|
obj-$(CONFIG_QUICKLIST) += quicklist.o
|
|
|
|
|