diff for duplicates of <20160126202829.GA21250@node.shutemov.name> diff --git a/a/1.txt b/N1/1.txt index 1c61ea9..689599a 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -138,62 +138,3 @@ It worth looking on them closely... And I wouldn't be surprised if some VMAs without all of these flags are not migratable too. Sigh.. Any thoughts? - ->From 396ad132be07a2d2b9ec5d1d6ec9fe2fffe8105e Mon Sep 17 00:00:00 2001 -From: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> -Date: Tue, 26 Jan 2016 22:59:16 +0300 -Subject: [PATCH] sg: mark VMA as VM_IO to prevent migration - -Reduced testcase: - - #include <fcntl.h> - #include <unistd.h> - #include <sys/mman.h> - #include <numaif.h> - - #define SIZE 0x2000 - - int main() - { - int fd; - void *p; - - fd = open("/dev/sg0", O_RDWR); - p = mmap(NULL, SIZE, PROT_EXEC, MAP_PRIVATE | MAP_LOCKED, fd, 0); - mbind(p, SIZE, 0, NULL, 0, MPOL_MF_MOVE); - return 0; - } - -We shouldn't try to migrate pages in sg VMA as we don't have a way to -update Sg_scatter_hold::pages accordingly from mm core. - -Let's mark the VMA as VM_IO to indicate to mm core that the VMA is -migratable. - -Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> -Reported-by: Dmitry Vyukov <dvyukov@google.com> ---- - drivers/scsi/sg.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c -index 503ab8b46c0b..5e820674432c 100644 ---- a/drivers/scsi/sg.c -+++ b/drivers/scsi/sg.c -@@ -1261,7 +1261,7 @@ sg_mmap(struct file *filp, struct vm_area_struct *vma) - } - - sfp->mmap_called = 1; -- vma->vm_flags |= VM_DONTEXPAND | VM_DONTDUMP; -+ vma->vm_flags |= VM_IO | VM_DONTEXPAND | VM_DONTDUMP; - vma->vm_private_data = sfp; - vma->vm_ops = &sg_mmap_vm_ops; - return 0; --- - Kirill A. Shutemov - --- -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 b0827fa..e38d8aa 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -158,65 +158,6 @@ "It worth looking on them closely... And I wouldn't be surprised if some\n" "VMAs without all of these flags are not migratable too.\n" "\n" - "Sigh.. Any thoughts?\n" - "\n" - ">From 396ad132be07a2d2b9ec5d1d6ec9fe2fffe8105e Mon Sep 17 00:00:00 2001\n" - "From: \"Kirill A. Shutemov\" <kirill.shutemov@linux.intel.com>\n" - "Date: Tue, 26 Jan 2016 22:59:16 +0300\n" - "Subject: [PATCH] sg: mark VMA as VM_IO to prevent migration\n" - "\n" - "Reduced testcase:\n" - "\n" - "\t#include <fcntl.h>\n" - "\t#include <unistd.h>\n" - "\t#include <sys/mman.h>\n" - "\t#include <numaif.h>\n" - "\n" - "\t#define SIZE 0x2000\n" - "\n" - "\tint main()\n" - "\t{\n" - "\t\tint fd;\n" - "\t\tvoid *p;\n" - "\n" - "\t\tfd = open(\"/dev/sg0\", O_RDWR);\n" - "\t\tp = mmap(NULL, SIZE, PROT_EXEC, MAP_PRIVATE | MAP_LOCKED, fd, 0);\n" - "\t\tmbind(p, SIZE, 0, NULL, 0, MPOL_MF_MOVE);\n" - "\t\treturn 0;\n" - "\t}\n" - "\n" - "We shouldn't try to migrate pages in sg VMA as we don't have a way to\n" - "update Sg_scatter_hold::pages accordingly from mm core.\n" - "\n" - "Let's mark the VMA as VM_IO to indicate to mm core that the VMA is\n" - "migratable.\n" - "\n" - "Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>\n" - "Reported-by: Dmitry Vyukov <dvyukov@google.com>\n" - "---\n" - " drivers/scsi/sg.c | 2 +-\n" - " 1 file changed, 1 insertion(+), 1 deletion(-)\n" - "\n" - "diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c\n" - "index 503ab8b46c0b..5e820674432c 100644\n" - "--- a/drivers/scsi/sg.c\n" - "+++ b/drivers/scsi/sg.c\n" - "@@ -1261,7 +1261,7 @@ sg_mmap(struct file *filp, struct vm_area_struct *vma)\n" - " \t}\n" - " \n" - " \tsfp->mmap_called = 1;\n" - "-\tvma->vm_flags |= VM_DONTEXPAND | VM_DONTDUMP;\n" - "+\tvma->vm_flags |= VM_IO | VM_DONTEXPAND | VM_DONTDUMP;\n" - " \tvma->vm_private_data = sfp;\n" - " \tvma->vm_ops = &sg_mmap_vm_ops;\n" - " \treturn 0;\n" - "-- \n" - " Kirill A. Shutemov\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>" + Sigh.. Any thoughts? -cd26d06e4dcf919587abebb43a845a4a0ec9290d73e9f6990427981b0a61c29f +bb28987cccfb8891353982d982b854bc5ffec046dbbfb2cb26064408dadfd3e0
diff --git a/a/1.txt b/N2/1.txt index 1c61ea9..fd00e77 100644 --- a/a/1.txt +++ b/N2/1.txt @@ -191,9 +191,3 @@ index 503ab8b46c0b..5e820674432c 100644 return 0; -- Kirill A. Shutemov - --- -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/N2/content_digest index b0827fa..d9e143b 100644 --- a/a/content_digest +++ b/N2/content_digest @@ -211,12 +211,6 @@ " \tvma->vm_ops = &sg_mmap_vm_ops;\n" " \treturn 0;\n" "-- \n" - " Kirill A. Shutemov\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>" + Kirill A. Shutemov -cd26d06e4dcf919587abebb43a845a4a0ec9290d73e9f6990427981b0a61c29f +eb6447c46bf82b04f2bd0700ff5761e9969021d54f30f00307f1cd671055eb29
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.