ftp://ftp.us.kernel.org/pub/linux/kernel/people/andrea/patches/v2.4/2.4.4pre6/rawio-5.bz2
Then I integrated a new feature in the O_DIRECT support to make possible to
set/unset from fcntl (I delayed that feature intentionally in the first release
because I thought it was low prio but Michael Susæg just asked for it to do I/O
at misaligned offsets sometime). The way I preferred to implement it is to left
the kiobuf allocated all the time, until we destroy the file structure in fput
(the kiobuf is huge thing, even more with my above rawio x2 boost patch that
handles 512k of atomic I/O with everything needed for the I/O just
preallocated, and we don't want to allocate/deallocate the whole thing every
time we switch in/out buffered mode). I'm also abusing the inode->i_sem in
fcntl to serialize the case of two tasks doing the fcntl(O_DIRECT) on two
filedescriptors pointing to the same file at the same time (kiobuf allocation
can sleep, it does even vmalloc...). Abusing it looks safe and we save the
memory of one semaphore per file structure this way. New patch is here:
ftp://ftp.us.kernel.org/pub/linux/kernel/people/andrea/patches/v2.4/2.4.4pre6/o_direct-3
As usual o_direct-3 has to be applied after rawio-5. rawio-5 is recommended for
integration into pre7 as it's not only a performance optimization but includes
strictly necessary fixes for race conditions, mm corruption etc..etc.. (again
credit for some of the stability fixes goes to SCT!)
Andrea
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/