diff options
author | Christoph Hellwig <hch@infradead.org> | 2011-12-18 21:00:09 +0100 |
---|---|---|
committer | Ben Myers <bpm@sgi.com> | 2012-01-17 22:06:45 +0100 |
commit | 474fce067521a40dbacc722e8ba119e81c2d31bf (patch) | |
tree | fd923aa42a5304182e8a8c64ca5d130f9afef286 /mm/memory_hotplug.c | |
parent | xfs: make i_flags an unsigned long (diff) | |
download | linux-474fce067521a40dbacc722e8ba119e81c2d31bf.tar.xz linux-474fce067521a40dbacc722e8ba119e81c2d31bf.zip |
xfs: replace i_flock with a sleeping bitlock
We almost never block on i_flock, the exception is synchronous inode
flushing. Instead of bloating the inode with a 16/24-byte completion
that we abuse as a semaphore just implement it as a bitlock that uses
a bit waitqueue for the rare sleeping path. This primarily is a
tradeoff between a much smaller inode and a faster non-blocking
path vs faster wakeups, and we are much better off with the former.
A small downside is that we will lose lockdep checking for i_flock, but
given that it's always taken inside the ilock that should be acceptable.
Note that for example the inode writeback locking is implemented in a
very similar way.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Alex Elder <aelder@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
Diffstat (limited to 'mm/memory_hotplug.c')
0 files changed, 0 insertions, 0 deletions