* [PATCH] MIPS: Fix get_user_page_fast() for mips with cache alias
@ 2013-06-14 18:10 Kamal Dasu
2013-06-18 16:47 ` Ralf Baechle
0 siblings, 1 reply; 3+ messages in thread
From: Kamal Dasu @ 2013-06-14 18:10 UTC (permalink / raw)
To: ralf, linux-mips; +Cc: Kamal Dasu
get_user_pages_fast() is missing cache flushes for MIPS platforms
with cache alias. Filesystem failures observed with DirectIO
operations due to missing flush_anon_page() that use page coloring
logic to work with cache aliases. This fix falls through to take
slow_irqon path that calls get_user_pages() that has required
logic for platforms where cpu_has_dc_aliases is true.
Signed-off-by: Kamal Dasu <kdasu.kdev@gmail.com>
---
arch/mips/mm/gup.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/mips/mm/gup.c b/arch/mips/mm/gup.c
index d4ea5c9..346fb7e 100644
--- a/arch/mips/mm/gup.c
+++ b/arch/mips/mm/gup.c
@@ -273,7 +273,7 @@ int get_user_pages_fast(unsigned long start, int nr_pages, int write,
len = (unsigned long) nr_pages << PAGE_SHIFT;
end = start + len;
- if (end < start)
+ if (end < start || cpu_has_dc_aliases)
goto slow_irqon;
/* XXX: batch / limit 'nr' */
--
1.8.2.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] MIPS: Fix get_user_page_fast() for mips with cache alias
2013-06-14 18:10 [PATCH] MIPS: Fix get_user_page_fast() for mips with cache alias Kamal Dasu
@ 2013-06-18 16:47 ` Ralf Baechle
2013-07-19 15:34 ` Kevin Cernekee
0 siblings, 1 reply; 3+ messages in thread
From: Ralf Baechle @ 2013-06-18 16:47 UTC (permalink / raw)
To: Kamal Dasu; +Cc: linux-mips
On Fri, Jun 14, 2013 at 02:10:03PM -0400, Kamal Dasu wrote:
> get_user_pages_fast() is missing cache flushes for MIPS platforms
> with cache alias. Filesystem failures observed with DirectIO
> operations due to missing flush_anon_page() that use page coloring
> logic to work with cache aliases. This fix falls through to take
> slow_irqon path that calls get_user_pages() that has required
> logic for platforms where cpu_has_dc_aliases is true.
A bit unsatisfying to always fall back to the slow variant yet I like
the patch because of it's simplicity but I wonder if there's not a
better solution.
Ralf
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] MIPS: Fix get_user_page_fast() for mips with cache alias
2013-06-18 16:47 ` Ralf Baechle
@ 2013-07-19 15:34 ` Kevin Cernekee
0 siblings, 0 replies; 3+ messages in thread
From: Kevin Cernekee @ 2013-07-19 15:34 UTC (permalink / raw)
To: Ralf Baechle; +Cc: Kamal Dasu, linux-mips, John Crispin
On Tue, Jun 18, 2013 at 9:47 AM, Ralf Baechle <ralf@linux-mips.org> wrote:
> On Fri, Jun 14, 2013 at 02:10:03PM -0400, Kamal Dasu wrote:
>
>> get_user_pages_fast() is missing cache flushes for MIPS platforms
>> with cache alias. Filesystem failures observed with DirectIO
>> operations due to missing flush_anon_page() that use page coloring
>> logic to work with cache aliases. This fix falls through to take
>> slow_irqon path that calls get_user_pages() that has required
>> logic for platforms where cpu_has_dc_aliases is true.
>
> A bit unsatisfying to always fall back to the slow variant yet I like
> the patch because of it's simplicity but I wonder if there's not a
> better solution.
Hi Ralf,
What are your thoughts on pushing this fix to the stable tree for
3.4+? Without Kamal's patch, ntfs-3g is completely broken on MIPS
platforms that have cache aliases.
Thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-07-19 15:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-14 18:10 [PATCH] MIPS: Fix get_user_page_fast() for mips with cache alias Kamal Dasu
2013-06-18 16:47 ` Ralf Baechle
2013-07-19 15:34 ` Kevin Cernekee
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.