I fixed a new bug pointed out by Andrew and discussed on the kiobuf lis=
t
(thanks Andrew!) (lock_kiovec was not handling correctly a failed trylo=
ckpage
and could unlock pages locked by other people, not a big deal though as=
 such
function is never called in the whole pre6 and I'm wondering if it make=
 sense
at all to allow the pinned pages to be locked down in 2.4 [it certainly=
 is
still necessary in 2.2 for all the reads from disk]). However I didn't =
killed
that function just in case there's an useful use of it. New updated raw=
io patch
against vanilla 2.4.4pre6 is here:

        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 possibl=
e to
set/unset from fcntl (I delayed that feature intentionally in the first=
 release
because I thought it was low prio but Michael Sus=E6g 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 t=
wo
filedescriptors pointing to the same file at the same time (kiobuf allo=
cation
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 recomme=
nded for
integration into pre7 as it's not only a performance optimization but i=
ncludes
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 [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to