diff for duplicates of <20160518014229.GB21538@bbox> diff --git a/a/1.txt b/N1/1.txt index 8c90f2e..e9afecf 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -34,76 +34,3 @@ On Tue, May 17, 2016 at 03:34:23PM +0300, Kirill A. Shutemov wrote: > > bit system. > > Feel free to post such patch. I guess it's reasonable. - -From d926a2a19cd0921b34279c3f6a3bae8b7508646d Mon Sep 17 00:00:00 2001 -From: Minchan Kim <minchan@kernel.org> -Date: Wed, 18 May 2016 08:36:59 +0900 -Subject: [PATCH] mm: disable fault around on emulated access bit architecture - -The fault_around aims for reducing minor fault of file-backed pages -via speculative ahead pte mapping with relying on readahead logic. -However, on non-HW access bit architecture, the benefit is highly -limited because they should emulate young bit with minor fault -for page aging algorithm of reclaim. IOW, we cannot reduce minor fault -on those architectures. - -I did quick test in my ARM machine. - -512M file mmap sequential every word read on eSATA drive with 4 times. -stdev is stable. - -= fault_around 4096 = -elapsed time(usec): 6747645 - -= fault_around 65536 = -elapsed time(usec): 6709263 - -0.5% gain. - -Even, when I tested it with eMMC, there is no gain because I guess -with slow storage, major fault is more dominant factor. - -As well, fault_around has side effect to shrink slab more aggressively -and higher vmpressure so if such speculation fails, it can evict slab -more which can result in page I/O(e.g., inode cache), in the end, -it would make void benefit of fault_around. - -So let's make default disable on those architectures. - -Cc: Kirill A. Shutemov <kirill@shutemov.name> -Cc: linux-arch@vger.kernel.org -Signed-off-by: Minchan Kim <minchan@kernel.org> ---- - mm/memory.c | 8 ++++++++ - 1 file changed, 8 insertions(+) - -diff --git a/mm/memory.c b/mm/memory.c -index b762b17aa4c5..9f652fdc0295 100644 ---- a/mm/memory.c -+++ b/mm/memory.c -@@ -2897,8 +2897,16 @@ void do_set_pte(struct vm_area_struct *vma, unsigned long address, - update_mmu_cache(vma, address, pte); - } - -+/* -+ * If architecture emulates "accessed" or "young" bit without HW support, -+ * there is no much gain with fault_around. -+ */ - static unsigned long fault_around_bytes __read_mostly = -+#ifndef __HAVE_ARCH_PTEP_SET_ACCESS_FLAGS -+ PAGE_SIZE; -+#else - rounddown_pow_of_two(65536); -+#endif - - #ifdef CONFIG_DEBUG_FS - static int fault_around_bytes_get(void *data, u64 *val) --- -1.9.1 - - --- -To unsubscribe, send a message with 'unsubscribe linux-mm' in -the body to majordomo@kvack.org. For more info on Linux MM, -see: http://www.linux-mm.org/ . -Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a> diff --git a/a/content_digest b/N1/content_digest index 983ec45..b1a97c1 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -49,79 +49,6 @@ "> > That's why I wanted to disable fault_around as default in non-HW access\n" "> > bit system.\n" "> \n" - "> Feel free to post such patch. I guess it's reasonable.\n" - "\n" - "From d926a2a19cd0921b34279c3f6a3bae8b7508646d Mon Sep 17 00:00:00 2001\n" - "From: Minchan Kim <minchan@kernel.org>\n" - "Date: Wed, 18 May 2016 08:36:59 +0900\n" - "Subject: [PATCH] mm: disable fault around on emulated access bit architecture\n" - "\n" - "The fault_around aims for reducing minor fault of file-backed pages\n" - "via speculative ahead pte mapping with relying on readahead logic.\n" - "However, on non-HW access bit architecture, the benefit is highly\n" - "limited because they should emulate young bit with minor fault\n" - "for page aging algorithm of reclaim. IOW, we cannot reduce minor fault\n" - "on those architectures.\n" - "\n" - "I did quick test in my ARM machine.\n" - "\n" - "512M file mmap sequential every word read on eSATA drive with 4 times.\n" - "stdev is stable.\n" - "\n" - "= fault_around 4096 =\n" - "elapsed time(usec): 6747645\n" - "\n" - "= fault_around 65536 =\n" - "elapsed time(usec): 6709263\n" - "\n" - "0.5% gain.\n" - "\n" - "Even, when I tested it with eMMC, there is no gain because I guess\n" - "with slow storage, major fault is more dominant factor.\n" - "\n" - "As well, fault_around has side effect to shrink slab more aggressively\n" - "and higher vmpressure so if such speculation fails, it can evict slab\n" - "more which can result in page I/O(e.g., inode cache), in the end,\n" - "it would make void benefit of fault_around.\n" - "\n" - "So let's make default disable on those architectures.\n" - "\n" - "Cc: Kirill A. Shutemov <kirill@shutemov.name>\n" - "Cc: linux-arch@vger.kernel.org\n" - "Signed-off-by: Minchan Kim <minchan@kernel.org>\n" - "---\n" - " mm/memory.c | 8 ++++++++\n" - " 1 file changed, 8 insertions(+)\n" - "\n" - "diff --git a/mm/memory.c b/mm/memory.c\n" - "index b762b17aa4c5..9f652fdc0295 100644\n" - "--- a/mm/memory.c\n" - "+++ b/mm/memory.c\n" - "@@ -2897,8 +2897,16 @@ void do_set_pte(struct vm_area_struct *vma, unsigned long address,\n" - " \tupdate_mmu_cache(vma, address, pte);\n" - " }\n" - " \n" - "+/*\n" - "+ * If architecture emulates \"accessed\" or \"young\" bit without HW support,\n" - "+ * there is no much gain with fault_around.\n" - "+ */\n" - " static unsigned long fault_around_bytes __read_mostly =\n" - "+#ifndef __HAVE_ARCH_PTEP_SET_ACCESS_FLAGS\n" - "+\tPAGE_SIZE;\n" - "+#else\n" - " \trounddown_pow_of_two(65536);\n" - "+#endif\n" - " \n" - " #ifdef CONFIG_DEBUG_FS\n" - " static int fault_around_bytes_get(void *data, u64 *val)\n" - "-- \n" - "1.9.1\n" - "\n" - "\n" - "--\n" - "To unsubscribe, send a message with 'unsubscribe linux-mm' in\n" - "the body to majordomo@kvack.org. For more info on Linux MM,\n" - "see: http://www.linux-mm.org/ .\n" - "Don't email: <a href=mailto:\"dont@kvack.org\"> email@kvack.org </a>" + > Feel free to post such patch. I guess it's reasonable. -b6a0d776a95528cde698d27e0083777f039416942e5b2d58ceb0a8d16bdf55be +29990a6b442f0698bc0ee35467cd21e393cd7167fc6c358e4ca08c923615f1d6
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox