Aw: Re: [PATCH] aio: fix D-cache aliasing issues

2013-11-18 Thread Helge Deller
> Hi Helge, > Could you provide me with the test case(s) you are running to > reproduce the problem? I could test this on aliasing D-cache on ARM > as well. Since kmap/kunmap do not flush in general on ARM, we > might need the explicit flushes here. Just google for aio-stress.c (e.g.

Re: [PATCH] aio: fix D-cache aliasing issues

2013-11-18 Thread Simon Baatz
Hi Helge, On Sun, Nov 17, 2013 at 10:23:08PM +0100, Helge Deller wrote: > On 11/16/2013 09:09 PM, Benjamin LaHaise wrote: > > On Sat, Nov 16, 2013 at 09:07:18PM +0100, Simon Baatz wrote: > >> On Fri, Nov 15, 2013 at 02:42:05PM -0800, James Bottomley wrote: > >>> On Fri, 2013-11-15 at 23:05 +0100,

Re: [PATCH] aio: fix D-cache aliasing issues

2013-11-18 Thread Simon Baatz
Hi Helge, On Sun, Nov 17, 2013 at 10:23:08PM +0100, Helge Deller wrote: On 11/16/2013 09:09 PM, Benjamin LaHaise wrote: On Sat, Nov 16, 2013 at 09:07:18PM +0100, Simon Baatz wrote: On Fri, Nov 15, 2013 at 02:42:05PM -0800, James Bottomley wrote: On Fri, 2013-11-15 at 23:05 +0100, Helge

Aw: Re: [PATCH] aio: fix D-cache aliasing issues

2013-11-18 Thread Helge Deller
Hi Helge, Could you provide me with the test case(s) you are running to reproduce the problem? I could test this on aliasing D-cache on ARM as well. Since kmap/kunmap do not flush in general on ARM, we might need the explicit flushes here. Just google for aio-stress.c (e.g.

Re: [PATCH] aio: fix D-cache aliasing issues

2013-11-17 Thread James Bottomley
On Sun, 2013-11-17 at 20:15 -0500, John David Anglin wrote: > On 17-Nov-13, at 7:52 PM, James Bottomley wrote: > > >> +void flush_user_dcache_page(struct page *page); > >> + > > > > The split into flush_kernel.. and flush_user.. is pointless. We > > have no > > use for a flush_user_.. API

Re: [PATCH] aio: fix D-cache aliasing issues

2013-11-17 Thread John David Anglin
On 17-Nov-13, at 7:52 PM, James Bottomley wrote: +void flush_user_dcache_page(struct page *page); + The split into flush_kernel.. and flush_user.. is pointless. We have no use for a flush_user_.. API because it's not part of the standard linux one. Plus it's going to confuse those who

Re: [PATCH] aio: fix D-cache aliasing issues

2013-11-17 Thread John David Anglin
On 17-Nov-13, at 6:47 PM, Helge Deller wrote: I only changed kunmap_parisc() to always call flush_kernel_dcache_page_addr(addr) - independend if we are on a PA8800/8900 CPU or not - which is what you proposed in your original mail. In which case the flushes in clear_user_page() and

Re: [PATCH] aio: fix D-cache aliasing issues

2013-11-17 Thread James Bottomley
On Mon, 2013-11-18 at 00:47 +0100, Helge Deller wrote: > * James Bottomley : > > On Sun, 2013-11-17 at 22:23 +0100, Helge Deller wrote: > > > On 11/16/2013 09:09 PM, Benjamin LaHaise wrote: > > > > On Sat, Nov 16, 2013 at 09:07:18PM +0100, Simon Baatz wrote: > > > >> On Fri, Nov 15, 2013 at

Re: [PATCH] aio: fix D-cache aliasing issues

2013-11-17 Thread Helge Deller
* James Bottomley : > On Sun, 2013-11-17 at 22:23 +0100, Helge Deller wrote: > > On 11/16/2013 09:09 PM, Benjamin LaHaise wrote: > > > On Sat, Nov 16, 2013 at 09:07:18PM +0100, Simon Baatz wrote: > > >> On Fri, Nov 15, 2013 at 02:42:05PM -0800, James Bottomley wrote: > > >>> On Fri, 2013-11-15 at

Re: [PATCH] aio: fix D-cache aliasing issues

2013-11-17 Thread James Bottomley
On Sun, 2013-11-17 at 22:23 +0100, Helge Deller wrote: > On 11/16/2013 09:09 PM, Benjamin LaHaise wrote: > > On Sat, Nov 16, 2013 at 09:07:18PM +0100, Simon Baatz wrote: > >> On Fri, Nov 15, 2013 at 02:42:05PM -0800, James Bottomley wrote: > >>> On Fri, 2013-11-15 at 23:05 +0100, Helge Deller

Re: [PATCH] aio: fix D-cache aliasing issues

2013-11-17 Thread Helge Deller
On 11/16/2013 09:09 PM, Benjamin LaHaise wrote: > On Sat, Nov 16, 2013 at 09:07:18PM +0100, Simon Baatz wrote: >> On Fri, Nov 15, 2013 at 02:42:05PM -0800, James Bottomley wrote: >>> On Fri, 2013-11-15 at 23:05 +0100, Helge Deller wrote: When a user page mapping is released via kunmap*()

Re: [PATCH] aio: fix D-cache aliasing issues

2013-11-17 Thread Helge Deller
On 11/16/2013 09:09 PM, Benjamin LaHaise wrote: On Sat, Nov 16, 2013 at 09:07:18PM +0100, Simon Baatz wrote: On Fri, Nov 15, 2013 at 02:42:05PM -0800, James Bottomley wrote: On Fri, 2013-11-15 at 23:05 +0100, Helge Deller wrote: When a user page mapping is released via kunmap*() functions, the

Re: [PATCH] aio: fix D-cache aliasing issues

2013-11-17 Thread James Bottomley
On Sun, 2013-11-17 at 22:23 +0100, Helge Deller wrote: On 11/16/2013 09:09 PM, Benjamin LaHaise wrote: On Sat, Nov 16, 2013 at 09:07:18PM +0100, Simon Baatz wrote: On Fri, Nov 15, 2013 at 02:42:05PM -0800, James Bottomley wrote: On Fri, 2013-11-15 at 23:05 +0100, Helge Deller wrote: When

Re: [PATCH] aio: fix D-cache aliasing issues

2013-11-17 Thread Helge Deller
* James Bottomley james.bottom...@hansenpartnership.com: On Sun, 2013-11-17 at 22:23 +0100, Helge Deller wrote: On 11/16/2013 09:09 PM, Benjamin LaHaise wrote: On Sat, Nov 16, 2013 at 09:07:18PM +0100, Simon Baatz wrote: On Fri, Nov 15, 2013 at 02:42:05PM -0800, James Bottomley wrote:

Re: [PATCH] aio: fix D-cache aliasing issues

2013-11-17 Thread James Bottomley
On Mon, 2013-11-18 at 00:47 +0100, Helge Deller wrote: * James Bottomley james.bottom...@hansenpartnership.com: On Sun, 2013-11-17 at 22:23 +0100, Helge Deller wrote: On 11/16/2013 09:09 PM, Benjamin LaHaise wrote: On Sat, Nov 16, 2013 at 09:07:18PM +0100, Simon Baatz wrote: On Fri,

Re: [PATCH] aio: fix D-cache aliasing issues

2013-11-17 Thread John David Anglin
On 17-Nov-13, at 6:47 PM, Helge Deller wrote: I only changed kunmap_parisc() to always call flush_kernel_dcache_page_addr(addr) - independend if we are on a PA8800/8900 CPU or not - which is what you proposed in your original mail. In which case the flushes in clear_user_page() and

Re: [PATCH] aio: fix D-cache aliasing issues

2013-11-17 Thread John David Anglin
On 17-Nov-13, at 7:52 PM, James Bottomley wrote: +void flush_user_dcache_page(struct page *page); + The split into flush_kernel.. and flush_user.. is pointless. We have no use for a flush_user_.. API because it's not part of the standard linux one. Plus it's going to confuse those who

Re: [PATCH] aio: fix D-cache aliasing issues

2013-11-17 Thread James Bottomley
On Sun, 2013-11-17 at 20:15 -0500, John David Anglin wrote: On 17-Nov-13, at 7:52 PM, James Bottomley wrote: +void flush_user_dcache_page(struct page *page); + The split into flush_kernel.. and flush_user.. is pointless. We have no use for a flush_user_.. API because it's not

Re: [PATCH] aio: fix D-cache aliasing issues

2013-11-16 Thread John David Anglin
On 16-Nov-13, at 5:37 PM, James Bottomley wrote: On Sat, 2013-11-16 at 17:32 -0500, John David Anglin wrote: On 16-Nov-13, at 5:06 PM, James Bottomley wrote: On Sat, 2013-11-16 at 21:07 +0100, Simon Baatz wrote: On Fri, Nov 15, 2013 at 02:42:05PM -0800, James Bottomley wrote: On Fri,

Re: [PATCH] aio: fix D-cache aliasing issues

2013-11-16 Thread John David Anglin
On 16-Nov-13, at 5:06 PM, James Bottomley wrote: On Sat, 2013-11-16 at 21:07 +0100, Simon Baatz wrote: On Fri, Nov 15, 2013 at 02:42:05PM -0800, James Bottomley wrote: On Fri, 2013-11-15 at 23:05 +0100, Helge Deller wrote: When a user page mapping is released via kunmap*() functions, the

Re: [PATCH] aio: fix D-cache aliasing issues

2013-11-16 Thread James Bottomley
On Sat, 2013-11-16 at 17:32 -0500, John David Anglin wrote: > On 16-Nov-13, at 5:06 PM, James Bottomley wrote: > > > On Sat, 2013-11-16 at 21:07 +0100, Simon Baatz wrote: > >> On Fri, Nov 15, 2013 at 02:42:05PM -0800, James Bottomley wrote: > >>> On Fri, 2013-11-15 at 23:05 +0100, Helge Deller

Re: [PATCH] aio: fix D-cache aliasing issues

2013-11-16 Thread James Bottomley
On Sat, 2013-11-16 at 21:07 +0100, Simon Baatz wrote: > On Fri, Nov 15, 2013 at 02:42:05PM -0800, James Bottomley wrote: > > On Fri, 2013-11-15 at 23:05 +0100, Helge Deller wrote: > > > When a user page mapping is released via kunmap*() functions, the D-cache > > > needs > > > to be flushed via

Re: [PATCH] aio: fix D-cache aliasing issues

2013-11-16 Thread Benjamin LaHaise
On Sat, Nov 16, 2013 at 09:07:18PM +0100, Simon Baatz wrote: > On Fri, Nov 15, 2013 at 02:42:05PM -0800, James Bottomley wrote: > > On Fri, 2013-11-15 at 23:05 +0100, Helge Deller wrote: > > > When a user page mapping is released via kunmap*() functions, the D-cache > > > needs > > > to be

Re: [PATCH] aio: fix D-cache aliasing issues

2013-11-16 Thread Simon Baatz
On Fri, Nov 15, 2013 at 02:42:05PM -0800, James Bottomley wrote: > On Fri, 2013-11-15 at 23:05 +0100, Helge Deller wrote: > > When a user page mapping is released via kunmap*() functions, the D-cache > > needs > > to be flushed via flush_dcache_page() to avoid D-cache aliasing issues. > > > >

Re: [PATCH] aio: fix D-cache aliasing issues

2013-11-16 Thread Simon Baatz
On Fri, Nov 15, 2013 at 02:42:05PM -0800, James Bottomley wrote: On Fri, 2013-11-15 at 23:05 +0100, Helge Deller wrote: When a user page mapping is released via kunmap*() functions, the D-cache needs to be flushed via flush_dcache_page() to avoid D-cache aliasing issues. This patch

Re: [PATCH] aio: fix D-cache aliasing issues

2013-11-16 Thread Benjamin LaHaise
On Sat, Nov 16, 2013 at 09:07:18PM +0100, Simon Baatz wrote: On Fri, Nov 15, 2013 at 02:42:05PM -0800, James Bottomley wrote: On Fri, 2013-11-15 at 23:05 +0100, Helge Deller wrote: When a user page mapping is released via kunmap*() functions, the D-cache needs to be flushed via

Re: [PATCH] aio: fix D-cache aliasing issues

2013-11-16 Thread James Bottomley
On Sat, 2013-11-16 at 21:07 +0100, Simon Baatz wrote: On Fri, Nov 15, 2013 at 02:42:05PM -0800, James Bottomley wrote: On Fri, 2013-11-15 at 23:05 +0100, Helge Deller wrote: When a user page mapping is released via kunmap*() functions, the D-cache needs to be flushed via

Re: [PATCH] aio: fix D-cache aliasing issues

2013-11-16 Thread James Bottomley
On Sat, 2013-11-16 at 17:32 -0500, John David Anglin wrote: On 16-Nov-13, at 5:06 PM, James Bottomley wrote: On Sat, 2013-11-16 at 21:07 +0100, Simon Baatz wrote: On Fri, Nov 15, 2013 at 02:42:05PM -0800, James Bottomley wrote: On Fri, 2013-11-15 at 23:05 +0100, Helge Deller wrote: When

Re: [PATCH] aio: fix D-cache aliasing issues

2013-11-16 Thread John David Anglin
On 16-Nov-13, at 5:06 PM, James Bottomley wrote: On Sat, 2013-11-16 at 21:07 +0100, Simon Baatz wrote: On Fri, Nov 15, 2013 at 02:42:05PM -0800, James Bottomley wrote: On Fri, 2013-11-15 at 23:05 +0100, Helge Deller wrote: When a user page mapping is released via kunmap*() functions, the

Re: [PATCH] aio: fix D-cache aliasing issues

2013-11-16 Thread John David Anglin
On 16-Nov-13, at 5:37 PM, James Bottomley wrote: On Sat, 2013-11-16 at 17:32 -0500, John David Anglin wrote: On 16-Nov-13, at 5:06 PM, James Bottomley wrote: On Sat, 2013-11-16 at 21:07 +0100, Simon Baatz wrote: On Fri, Nov 15, 2013 at 02:42:05PM -0800, James Bottomley wrote: On Fri,

Re: [PATCH] aio: fix D-cache aliasing issues

2013-11-15 Thread James Bottomley
On Fri, 2013-11-15 at 23:05 +0100, Helge Deller wrote: > When a user page mapping is released via kunmap*() functions, the D-cache > needs > to be flushed via flush_dcache_page() to avoid D-cache aliasing issues. > > This patch fixes aio on the parisc platform (and probably others). This should

[PATCH] aio: fix D-cache aliasing issues

2013-11-15 Thread Helge Deller
When a user page mapping is released via kunmap*() functions, the D-cache needs to be flushed via flush_dcache_page() to avoid D-cache aliasing issues. This patch fixes aio on the parisc platform (and probably others). Signed-off-by: Helge Deller To: Benjamin LaHaise To: linux-...@kvack.org

[PATCH] aio: fix D-cache aliasing issues

2013-11-15 Thread Helge Deller
When a user page mapping is released via kunmap*() functions, the D-cache needs to be flushed via flush_dcache_page() to avoid D-cache aliasing issues. This patch fixes aio on the parisc platform (and probably others). Signed-off-by: Helge Deller del...@gmx.de To: Benjamin LaHaise b...@kvack.org

Re: [PATCH] aio: fix D-cache aliasing issues

2013-11-15 Thread James Bottomley
On Fri, 2013-11-15 at 23:05 +0100, Helge Deller wrote: When a user page mapping is released via kunmap*() functions, the D-cache needs to be flushed via flush_dcache_page() to avoid D-cache aliasing issues. This patch fixes aio on the parisc platform (and probably others). This should be