diff options
| author | Hugh Dickins <hugh@veritas.com> | 2002-10-02 23:01:12 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.transmeta.com> | 2002-10-02 23:01:12 -0700 |
| commit | 2729b9afe1ce6308481e677ab06b0b6bfccff082 (patch) | |
| tree | 9a562b072d0388dedbceefd981e44b9cbbf2d2f4 /include/linux/shmem_fs.h | |
| parent | 03844e4b25f5993847fea8f2936eee540167cd41 (diff) | |
[PATCH] put shmem metadata in highmem
wli suffered OOMs because tmpfs was allocating GFP_USER, for its
metadata pages. This patch allocates them GFP_HIGHUSER (default
mapping->gfp_mask) and uses atomic kmaps to access (KM_USER0 for upper
levels, KM_USER1 for lowest level). shmem_unuse_inode and
shmem_truncate rewritten alike to avoid repeated maps and unmaps of the
same page: cr's truncate was much more elegant, but I couldn't quite
see how to convert it.
I do wonder whether this patch is a bloat too far for tmpfs, and even
non-highmem configs will be penalised by page_address overhead (perhaps
a further patch could get over that). There is an attractive
alternative (keep swp_entry_ts in the existing radix-tree, no metadata
pages at all), but we haven't worked out an unhacky interface to that.
For now at least, let's give tmpfs highmem metadata a spin.
Diffstat (limited to 'include/linux/shmem_fs.h')
| -rw-r--r-- | include/linux/shmem_fs.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/shmem_fs.h b/include/linux/shmem_fs.h index c7a4cdf6009a..dce3d7f9c252 100644 --- a/include/linux/shmem_fs.h +++ b/include/linux/shmem_fs.h @@ -13,7 +13,7 @@ struct shmem_inode_info { spinlock_t lock; unsigned long next_index; swp_entry_t i_direct[SHMEM_NR_DIRECT]; /* for the first blocks */ - void **i_indirect; /* indirect blocks */ + struct page *i_indirect; /* indirect blocks */ unsigned long alloced; /* data pages allocated to file */ unsigned long swapped; /* subtotal assigned to swap */ unsigned long flags; |
