summaryrefslogtreecommitdiffstats
path: root/fs/cramfs
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2009-06-24 02:05:18 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2009-06-24 08:15:25 -0400
commitc63e09ecccb50f930e899d7005edc5411ee86d4f (patch)
treeaafa5169cde98a2bb8327fcc948c76dba0746322 /fs/cramfs
parent7e325d3a6b117c7288bfc0755410e9d9d2b71326 (diff)
downloadkernel-crypto-c63e09ecccb50f930e899d7005edc5411ee86d4f.tar.gz
kernel-crypto-c63e09ecccb50f930e899d7005edc5411ee86d4f.tar.xz
kernel-crypto-c63e09ecccb50f930e899d7005edc5411ee86d4f.zip
Make allocation of anon devices cheaper
Standard trick - add a new variable (start) such that for each n < start n is known to be busy. Allocation can skip checking everything in [0..start) and if it returns n, we can set start to n + 1. Freeing below start sets start to what we'd just freed. Of course, it still sucks if we do something like free 0 allocate allocate in a loop - still O(n^2) time. However, on saner loads it improves the things a lot and the entire thing is not worth the trouble of switching to something with better worst-case behaviour. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/cramfs')
0 files changed, 0 insertions, 0 deletions