[PATCH] core remove PageReserved
Nick Piggin authored

Remove PageReserved() calls from core code by tightening VM_RESERVED
handling in mm/ to cover PageReserved functionality.

PageReserved special casing is removed from get_page and put_page.

All setting and clearing of PageReserved is retained, and it is now flagged
in the page_alloc checks to help ensure we don't introduce any refcount
based freeing of Reserved pages.

MAP_PRIVATE, PROT_WRITE of VM_RESERVED regions is tentatively being
deprecated.  We never completely handled it correctly anyway, and is be
reintroduced in future if required (Hugh has a proof of concept).

Once PageReserved() calls are removed from kernel/power/swsusp.c, and all
arch/ and driver code, the Set and Clear calls, and the PG_reserved bit can
be trivially removed.

Last real user of PageReserved is swsusp, which uses PageReserved to
determine whether a struct page points to valid memory or not.  This still
needs to be addressed (a generic page_is_ram() should work).

A last caveat: the ZERO_PAGE is now refcounted and managed with rmap (and
thus mapcounted and count towards shared rss).  These writes to the struct
page could cause excessive cacheline bouncing on big systems.  There are a
number of ways this could be addressed if it is an issue.
Signed-off-by: default avatarNick Piggin <npiggin@suse.de>

Refcount bug fix for filemap_xip.c
Signed-off-by: default avatarCarsten Otte <cotte@de.ibm.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
b5810039
Name Last commit Last update
..
9p [PATCH] v9fs: remove additional buffer allocation from v9fs_file_read and v9fs_file_write
adfs [ARM] fs/adfs/adfs.h: "extern inline" doesn't make sense
affs [PATCH] update filesystems for new delete_inode behavior
afs [PATCH] gfp_t: fs/*
autofs [PATCH] autofs: fix "busy inodes after umount..."
autofs4 [PATCH] Fix up symlink function pointers
befs befs: fix up missed follow_link declaration change
bfs [PATCH] bfs iget() abuses
cifs [PATCH] cifs: Add support for suspend
coda [PATCH] Driver Core: fix up all callers of class_device_create()
cramfs [PATCH] fs/cramfs/uncompress.c should #include <linux/cramfs_fs.h>
debugfs [PATCH] remove duplicate get_dentry functions in various places
devfs [PATCH] Fix up symlink function pointers
devpts [PATCH] Generic VFS fallback for security xattrs
efs Linux-2.6.12-rc2
exportfs Linux-2.6.12-rc2
ext2 [PATCH] Fix ext2_new_inode() failure paths
ext3 [PATCH] Fix ext3 warning for unused var
fat [PATCH] fat: fix adate
freevxfs [PATCH] fs: convert kcalloc to kzalloc
fuse [PATCH] fuse: check O_DIRECT
hfs [PATCH] gfp_t: fs/*
hfsplus [PATCH] gfp_t: fs/*
hostfs [PATCH] uml: remove empty hostfs_truncate method
hpfs [PATCH] update filesystems for new delete_inode behavior
hppfs
hugetlbfs
isofs
jbd
jffs
jffs2
jfs
lockd
minix
msdos
ncpfs
nfs
nfs_common
nfsd
nls
ntfs
openpromfs
partitions
proc
qnx4
ramfs
reiserfs
relayfs
romfs
smbfs
sysfs
sysv
udf
ufs
vfat
xfs
Kconfig
Kconfig.binfmt
Makefile
aio.c
attr.c
bad_inode.c
binfmt_aout.c
binfmt_elf.c
binfmt_elf_fdpic.c
binfmt_em86.c
binfmt_flat.c
binfmt_misc.c
binfmt_script.c
binfmt_som.c
bio.c
block_dev.c
buffer.c
char_dev.c
compat.c
compat_ioctl.c
dcache.c
dcookies.c
direct-io.c
dnotify.c
dquot.c
eventpoll.c
exec.c
fcntl.c
fifo.c
file.c
file_table.c
filesystems.c
fs-writeback.c
inode.c
inotify.c
ioctl.c
ioprio.c
libfs.c
locks.c
mbcache.c
mpage.c
namei.c
namespace.c
nfsctl.c
open.c
pipe.c
posix_acl.c
quota.c
quota_v1.c
quota_v2.c
read_write.c
readdir.c
select.c
seq_file.c
stat.c
super.c
xattr.c
xattr_acl.c