linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCHSET] block: fix PIO cache coherency bug, take 2
@ 2006-06-04  3:41 Tejun Heo
  2006-06-04  3:41 ` [PATCH 1/5] arm: implement flush_kernel_dcache_page() Tejun Heo
                   ` (5 more replies)
  0 siblings, 6 replies; 27+ messages in thread
From: Tejun Heo @ 2006-06-04  3:41 UTC (permalink / raw)
  To: Jens Axboe, James Bottomley, Dave Miller, bzolnier, james.steward,
	jgarzik, mattjreimer, Guennadi Liakhovetski, rmk, lkml, linux-ide,
	linux-scsi, htejun

Hello, all.

Here's another round of block PIO cache coherency fix patchset.  The
previous try[1] was rejected because flush_dcache_page() was excessive
and couldn't be called from irq context.  A new cachetlb interface has
been introduced - flush_kernel_dcache_page(), which is only
responsible for flushing the kernel mapping and safe to call from irq
context.  The function is implemented only for parisc.  This patchset
adds implementation for arm.

blk kmap wrappers have been dropped and calls to
flush_kernel_dcache_page() have been directly added.  Because
flush_kernel_dcache_page() hasn't been implemented on many
architectures, converting to such wrappers breaks cache coherency for
such architectures.  kmap should be updated after all archtectures
with aliasing caches implement flush_kernel_dcache_page().

Russell, can you please verify arm's flush_kernel_dcache_page()?  I
tried to implement flush_anon_page() too but didn't know what to do
with anon_vma object.  It seems that a call to
__cpuc_flush_user_range() should do the job but it requires
vma->vm_flags to see whether it's an executable page.  To access vma
from anon mapped page, page->mapping:anon_vma->lock should be grabbed
and probably the first vma on the list can be used, which is kind of
complex.  I think the options here are...

* adding vma argument to flush_anon_page()
* always flush for the worst vm_flags

I have only compile tested.  Please verify this fixes the coherency
problem on arm.

Jens, if everyone is happy with this, can you push this patchset
through blk tree?  As this change only adds calls to
flush_kernel_dcache_page() which is currently implement only on parisc
and arm, I think including this fix into 2.6.17 shouldn't cause too
much trouble.

Thanks.

--
tejun

[1] http://article.gmane.org/gmane.linux.kernel/367509



^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2006-06-06 11:00 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-04  3:41 [PATCHSET] block: fix PIO cache coherency bug, take 2 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
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).