linux_old1/fs/hpfs
Mikulas Patocka 1c0b8a7a62 hpfs: optimize quad buffer loading
HPFS needs to load 4 consecutive 512-byte sectors when accessing the
directory nodes or bitmaps.  We can't switch to 2048-byte block size
because files are allocated in the units of 512-byte sectors.

Previously, the driver would allocate a 2048-byte area using kmalloc,
copy the data from four buffers to this area and eventually copy them
back if they were modified.

In the current implementation of the buffer cache, buffers are allocated
in the pagecache.  That means that 4 consecutive 512-byte buffers are
stored in consecutive areas in the kernel address space.  So, we don't
need to allocate extra memory and copy the content of the buffers there.

This patch optimizes the code to avoid copying the buffers.  It checks
if the four buffers are stored in contiguous memory - if they are not,
it falls back to allocating a 2048-byte area and copying data there.

Signed-off-by: Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-02-02 16:24:07 -08:00
..
Kconfig HPFS: Make HPFS compile on preempt and SMP 2011-05-09 09:04:23 -07:00
Makefile
alloc.c hpfs: remember free space 2014-02-02 16:24:07 -08:00
anode.c hpfs: convert to use leXX_add_cpu() 2012-10-06 03:05:08 +09:00
buffer.c hpfs: optimize quad buffer loading 2014-02-02 16:24:07 -08:00
dentry.c Don't pass inode to ->d_hash() and ->d_compare() 2013-06-29 12:57:36 +04:00
dir.c [readdir] convert hpfs 2013-06-29 12:56:51 +04:00
dnode.c hpfs: convert to use leXX_add_cpu() 2012-10-06 03:05:08 +09:00
ea.c hpfs: get rid of bitfields in struct fnode 2012-05-29 23:28:37 -04:00
file.c truncate: drop 'oldsize' truncate_pagecache() parameter 2013-09-12 15:38:02 -07:00
hpfs.h hpfs: assorted endianness annotations 2012-05-29 23:28:39 -04:00
hpfs_fn.h hpfs: remember free space 2014-02-02 16:24:07 -08:00
inode.c Merge branch 'master' into for-next 2013-01-29 10:48:30 +01:00
map.c hpfs: implement prefetch to improve performance 2013-07-04 11:22:46 -07:00
name.c HPFS: Remove CR/LF conversion option 2011-05-09 09:04:23 -07:00
namei.c locks: break delegations on any attribute modification 2013-11-09 00:16:44 -05:00
super.c hpfs: remember free space 2014-02-02 16:24:07 -08:00