From: Jan Hudec <bulb@ucw.cz>
To: "Stephen C. Tweedie" <sct@redhat.com>
Cc: "Joseph A. Knapka" <jknapka@earthlink.net>,
Martin Maletinsky <maletinsky@scs.ch>,
linux-mm@kvack.org, kernelnewbies@nl.linux.org
Subject: Re: kiobuf interface / PG_locked flag
Date: Sun, 15 Sep 2002 17:54:41 +0200 [thread overview]
Message-ID: <20020915155441.GA3636@vagabond> (raw)
In-Reply-To: <20020913154541.E17450@redhat.com>
On Fri, Sep 13, 2002 at 03:45:41PM +0100, Stephen C. Tweedie wrote:
> Hi,
>
> On Fri, Sep 13, 2002 at 02:41:27PM +0200, Jan Hudec wrote:
>
> > Ref-counts protect from swapping out. But it's the PG_locked flag, that
> > protects from starting other IO. If you are writing, read must not
> > happen. If you are reading, nothing else at all must happen. So that's
> > the difference. map_use_kiobuf fault the pages in. lock_kiovec make
> > sure, that noone (else) is doing ANU IO on the pages.
>
> Depends on what semantics you want. There's nothing to stop a kiobuf
> from being modified in flight. All the app has to do is create a
> thread and modify the buffer from within that thread.
Well, if a multithread application writes to a buffer in one buffer
while doing IO in another, it's asking for trouble. But kernel must make
sure it does not start parallel IO on the same page, so the application
does not get garbage when it behaves correctly (btw, share read-write
mmap will probably get you in trouble anyway - or does kernel modify
PTEs on locking a page?).
-------------------------------------------------------------------------------
Jan 'Bulb' Hudec <bulb@ucw.cz>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/
prev parent reply other threads:[~2002-09-15 15:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-12 8:48 Martin Maletinsky
2002-09-12 15:24 ` Joseph A. Knapka
2002-09-12 15:33 ` Stephen C. Tweedie
2002-09-13 12:41 ` Jan Hudec
2002-09-13 14:45 ` Stephen C. Tweedie
2002-09-15 15:54 ` Jan Hudec [this message]
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=20020915155441.GA3636@vagabond \
--to=bulb@ucw.cz \
--cc=jknapka@earthlink.net \
--cc=kernelnewbies@nl.linux.org \
--cc=linux-mm@kvack.org \
--cc=maletinsky@scs.ch \
--cc=sct@redhat.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