mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@SteelEye.com>
To: Russell King <rmk+lkml@arm.linux.org.uk>
Cc: Tejun Heo <htejun@gmail.com>, Jens Axboe <axboe@suse.de>,
	Dave Miller <davem@redhat.com>,
	bzolnier@gmail.com, james.steward@dynamicratings.com,
	jgarzik@pobox.com, mattjreimer@gmail.com,
	Guennadi Liakhovetski <g.liakhovetski@gmx.de>,
	lkml <linux-kernel@vger.kernel.org>,
	linux-ide@vger.kernel.org, linux-scsi@vger.kernel.org
Subject: Re: [PATCHSET] block: fix PIO cache coherency bug, take 2
Date: Mon, 05 Jun 2006 10:24:44 -0500	[thread overview]
Message-ID: <1149521085.3489.24.camel@mulgrave.il.steeleye.com> (raw)
In-Reply-To: <20060605144456.GA26666@flint.arm.linux.org.uk>

On Mon, 2006-06-05 at 15:44 +0100, Russell King wrote:
> Hence I find your comment "There are two cases where devices kmap a
> user page into kernel space and then proceed to read from or write to
> it" to be misleading - at the exact point in time that the device
> driver is manipulating the data in that page, it is not a user page.

zero copy doesn't quite follow that ownership model.  We don't really do
anything to block user access to the page while I/O is underway (the
only time we actually do this is the nopage stuff)  if the user wants do
do something stupid like write to a page they've asked us to read data
into, the resulting coherency cockup is their lookout, and which data
actually ends up in the page undefined.  So, both the user and the
kernel mappings exist on the page while it's undergoing kmap and
modification.

However, regardless of whether it's mapped into user space or not, even
if it were later going to be mapped at a non-congruent user address, the
kernel mappings have to be flushed to make the data written via them
visible to the user (and, for a VIPT cache, they have to be flushed
before the mapping is torn down otherwise we might not have the PTE to
flush them via ...)

James



  reply	other threads:[~2006-06-05 15:26 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-04  3:41 Tejun Heo
2006-06-04  3:41 ` [PATCH 1/5] arm: implement flush_kernel_dcache_page() Tejun Heo
2006-06-04  3:49   ` [PATCH 1/5] (REPOST) " Tejun Heo
2006-06-04  6:45   ` [PATCH 1/5] " David Miller
2006-06-04  6:53     ` Tejun Heo
2006-06-04  7:04       ` David Miller
2006-06-04  3:41 ` [PATCH 2/5] ide: add cpu cache flushes after kmapping and modifying a page Tejun Heo
2006-06-04  8:17   ` Christoph Hellwig
2006-06-04  9:09     ` Tejun Heo
2006-06-04  3:41 ` [PATCH 3/5] libata: " Tejun Heo
2006-06-04  3:41 ` [PATCH 5/5] md: " Tejun Heo
2006-06-04  3:41 ` [PATCH 4/5] SCSI: " Tejun Heo
2006-06-04  8:20   ` Christoph Hellwig
2006-06-04  9:13     ` Tejun Heo
2006-06-04 20:24       ` Guennadi Liakhovetski
2006-06-04 20:44 ` [PATCHSET] block: fix PIO cache coherency bug, take 2 Russell King
2006-06-04 22:23   ` Russell King
2006-06-05 14:27     ` James Bottomley
2006-06-05 14:44       ` Russell King
2006-06-05 15:24         ` James Bottomley [this message]
2006-06-05 15:34           ` Russell King
2006-06-05 15:47             ` James Bottomley
2006-06-05 15:48               ` Russell King
2006-06-05 16:16                 ` James Bottomley
2006-06-05 16:37                   ` Russell King
2006-06-05 13:43   ` James Bottomley
2006-06-06 11:00     ` Miklos Szeredi

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=1149521085.3489.24.camel@mulgrave.il.steeleye.com \
    --to=james.bottomley@steeleye.com \
    --cc=axboe@suse.de \
    --cc=bzolnier@gmail.com \
    --cc=davem@redhat.com \
    --cc=g.liakhovetski@gmx.de \
    --cc=htejun@gmail.com \
    --cc=james.steward@dynamicratings.com \
    --cc=jgarzik@pobox.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=mattjreimer@gmail.com \
    --cc=rmk+lkml@arm.linux.org.uk \
    /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

all inboxes | Powered by JetHome®