+ sh-get_user_pages_fast-must-flush-cache-the-way.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: sh: get_user_pages_fast() must flush cache
has been added to the -mm tree.  Its filename is
     sh-get_user_pages_fast-must-flush-cache-the-way.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/sh-get_user_pages_fast-must-flush-cache-the-way.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/sh-get_user_pages_fast-must-flush-cache-the-way.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Stas Sergeev <stsp@xxxxxxx>
Subject: sh: get_user_pages_fast() must flush cache

This patch avoids fuse hangs on sh4 by flushing the cache on
get_user_pages_fast().  This is not necessary a good thing to do, but
get_user_pages() does this, so get_user_pages_fast() should too.

Please note the patch for mips arch that addresses the similar problem:
https://kernel.googlesource.com/pub/scm/linux/kernel/git/ralf/linux/+/linux-3.4.50%5E!/#F0
They basically simply disable get_user_pages_fast() at all, using a
fall-back to get_user_pages(). But my fix is different, it adds an
explicit cache flushes.

Signed-off-by: Stas Sergeev <stsp@xxxxxxxxxxxxxxxxxxxxx>
Cc: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>
Cc: Kamal Dasu <kdasu.kdev@xxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 arch/sh/mm/gup.c |    2 ++
 1 file changed, 2 insertions(+)

diff -puN arch/sh/mm/gup.c~sh-get_user_pages_fast-must-flush-cache-the-way arch/sh/mm/gup.c
--- a/arch/sh/mm/gup.c~sh-get_user_pages_fast-must-flush-cache-the-way
+++ a/arch/sh/mm/gup.c
@@ -105,6 +105,8 @@ static noinline int gup_pte_range(pmd_t
 		VM_BUG_ON(!pfn_valid(pte_pfn(pte)));
 		page = pte_page(pte);
 		get_page(page);
+		__flush_anon_page(page, addr);
+		flush_dcache_page(page);
 		pages[*nr] = page;
 		(*nr)++;
 
_

Patches currently in -mm which might be from stsp@xxxxxxx are

sh-get_user_pages_fast-must-flush-cache-the-way.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux