diff options
| author | Andrew Morton <akpm@digeo.com> | 2003-04-08 21:30:24 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.transmeta.com> | 2003-04-08 21:30:24 -0700 |
| commit | 8e98702b845d48b79418c2eebf60badcb2ef22c0 (patch) | |
| tree | 56c81f414c5d0f2d2805b2e93a8eba4a8685e10f /include/linux | |
| parent | df921d4dac2bc2f1fd0d6d461710cefcc7d67769 (diff) | |
[PATCH] Replace the radix-tree rwlock with a spinlock
Spinlocks don't have a buslocked unlock and are faster.
On a P4, time to write a 4M file with 4M one-byte-write()s:
Before:
0.72s user 5.47s system 99% cpu 6.227 total
0.76s user 5.40s system 100% cpu 6.154 total
0.77s user 5.38s system 100% cpu 6.146 total
After:
1.09s user 4.92s system 99% cpu 6.014 total
0.74s user 5.28s system 99% cpu 6.023 total
1.03s user 4.97s system 100% cpu 5.991 total
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/fs.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index af3852b4281d..158edfbd69f1 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -313,7 +313,7 @@ struct backing_dev_info; struct address_space { struct inode *host; /* owner: inode, block_device */ struct radix_tree_root page_tree; /* radix tree of all pages */ - rwlock_t page_lock; /* and rwlock protecting it */ + spinlock_t page_lock; /* and rwlock protecting it */ struct list_head clean_pages; /* list of clean pages */ struct list_head dirty_pages; /* list of dirty pages */ struct list_head locked_pages; /* list of locked pages */ |
