public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrea Arcangeli <andrea@suse.de>
To: "Stephen C. Tweedie" <sct@redhat.com>,
	Linus Torvalds <torvalds@transmeta.com>
Cc: linux-kernel@vger.kernel.org, kiobuf-io-devel@lists.sourceforge.net
Subject: RAWIO-5 and O_DIRECT-3 updates
Date: Tue, 24 Apr 2001 08:56:00 +0200	[thread overview]
Message-ID: <20010424085600.A784@athlon.random> (raw)

I fixed a new bug pointed out by Andrew and discussed on the kiobuf list
(thanks Andrew!) (lock_kiovec was not handling correctly a failed trylockpage
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 rawio 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 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

             reply	other threads:[~2001-04-24  6:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-04-24  6:56 Andrea Arcangeli [this message]
2001-04-26  2:58 ` RAWIO-6 update [was Re: RAWIO-5 and O_DIRECT-3 updates] Andrea Arcangeli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20010424085600.A784@athlon.random \
    --to=andrea@suse.de \
    --cc=kiobuf-io-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sct@redhat.com \
    --cc=torvalds@transmeta.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox