summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndrew Morton <akpm@digeo.com>2003-01-10 18:39:36 -0800
committerRichard Henderson <rth@are.twiddle.net>2003-01-10 18:39:36 -0800
commitd9be9136602e3decfd7a0375725a8eba1c5079ec (patch)
treed779526ac68a528c5102fcf9188f83ae49b63ef0 /include
parentb473e48bf88f8a8b4a34c9be9cd9e0e379520cf3 (diff)
[PATCH] turn i_shared_lock into a semaphore
i_shared_lock is held for a very long time during vmtruncate() and causes high scheduling latencies when truncating a file which is mmapped. I've seen 100 milliseconds. So turn it into a semaphore. It nests inside mmap_sem. This change is also needed by the shared pagetable patch, which needs to unshare pte's on the vmtruncate path - lots of pagetable pages need to be allocated and they are using __GFP_WAIT. The patch also makes unmap_vma() static.
Diffstat (limited to 'include')
-rw-r--r--include/linux/fs.h2
-rw-r--r--include/linux/mm.h1
2 files changed, 1 insertions, 2 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 821034d8745b..3d098c717fc1 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -319,7 +319,7 @@ struct address_space {
struct address_space_operations *a_ops; /* methods */
struct list_head i_mmap; /* list of private mappings */
struct list_head i_mmap_shared; /* list of private mappings */
- spinlock_t i_shared_lock; /* and spinlock protecting it */
+ struct semaphore i_shared_sem; /* and sem protecting it */
unsigned long dirtied_when; /* jiffies of first page dirtying */
int gfp_mask; /* how to allocate the pages */
struct backing_dev_info *backing_dev_info; /* device readahead, etc */
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 70177c796b12..554af98ab3b6 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -529,7 +529,6 @@ extern struct vm_area_struct * find_vma_prev(struct mm_struct * mm, unsigned lon
struct vm_area_struct **pprev);
extern int split_vma(struct mm_struct * mm, struct vm_area_struct * vma,
unsigned long addr, int new_below);
-extern void unmap_vma(struct mm_struct *mm, struct vm_area_struct *area);
/* Look up the first VMA which intersects the interval start_addr..end_addr-1,
NULL if none. Assume start_addr < end_addr. */