diff for duplicates of <20090617140334.GB8079@localhost> diff --git a/a/1.txt b/N1/1.txt index e3c68f0..6b75298 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -25,25 +25,25 @@ On Wed, Jun 17, 2009 at 09:43:29PM +0800, Minchan Kim wrote: > >> >> > > > > > Signed-off-by: Andi Kleen <ak@linux.intel.com> > >> >> > > > > > > >> >> > > > > > --- -> >> >> > > > > > include/linux/rmap.h | 1 + -> >> >> > > > > > mm/rmap.c | 9 ++++++++- -> >> >> > > > > > 2 files changed, 9 insertions(+), 1 deletion(-) +> >> >> > > > > > A include/linux/rmap.h | A A 1 + +> >> >> > > > > > A mm/rmap.c A A A A A A | A A 9 ++++++++- +> >> >> > > > > > A 2 files changed, 9 insertions(+), 1 deletion(-) > >> >> > > > > > > >> >> > > > > > --- sound-2.6.orig/mm/rmap.c > >> >> > > > > > +++ sound-2.6/mm/rmap.c > >> >> > > > > > @@ -958,7 +958,14 @@ static int try_to_unmap_one(struct page -> >> >> > > > > > /* Update high watermark before we lower rss */ -> >> >> > > > > > update_hiwater_rss(mm); +> >> >> > > > > > A A A A /* Update high watermark before we lower rss */ +> >> >> > > > > > A A A A update_hiwater_rss(mm); > >> >> > > > > > -> >> >> > > > > > - if (PageAnon(page)) { -> >> >> > > > > > + if (PageHWPoison(page) && !(flags & TTU_IGNORE_HWPOISON)) { -> >> >> > > > > > + if (PageAnon(page)) -> >> >> > > > > > + dec_mm_counter(mm, anon_rss); -> >> >> > > > > > + else if (!is_migration_entry(pte_to_swp_entry(*pte))) +> >> >> > > > > > - A A A if (PageAnon(page)) { +> >> >> > > > > > + A A A if (PageHWPoison(page) && !(flags & TTU_IGNORE_HWPOISON)) { +> >> >> > > > > > + A A A A A A A if (PageAnon(page)) +> >> >> > > > > > + A A A A A A A A A A A dec_mm_counter(mm, anon_rss); +> >> >> > > > > > + A A A A A A A else if (!is_migration_entry(pte_to_swp_entry(*pte))) > >> >> > > > > > >> >> > > > > Isn't it straightforward to use !is_hwpoison_entry ? > >> >> > > > -> >> >> > > > Good catch! It looks like a redundant check: the +> >> >> > > > Good catch! A It looks like a redundant check: the > >> >> > > > page_check_address() at the beginning of the function guarantees that > >> >> > > > !is_migration_entry() or !is_migration_entry() tests will all be TRUE. > >> >> > > > So let's do this? @@ -55,9 +55,9 @@ On Wed, Jun 17, 2009 at 09:43:29PM +0800, Minchan Kim wrote: > >> >> > page_check_address() calls pte_present() which returns the > >> >> > (_PAGE_PRESENT | _PAGE_PROTNONE) bits. While x86-64 defines > >> >> > -> >> >> > #define __swp_entry(type, offset) ((swp_entry_t) { \ -> >> >> > ((type) << (_PAGE_BIT_PRESENT + 1)) \ -> >> >> > | ((offset) << SWP_OFFSET_SHIFT) }) +> >> >> > #define __swp_entry(type, offset) A A A ((swp_entry_t) { \ +> >> >> > A A A A A A A A A A A A A A A A A A A A A ((type) << (_PAGE_BIT_PRESENT + 1)) \ +> >> >> > A A A A A A A A A A A A A A A A A A A A A | ((offset) << SWP_OFFSET_SHIFT) }) > >> >> > > >> >> > where SWP_OFFSET_SHIFT is defined to the bigger one of > >> >> > max(_PAGE_BIT_PROTNONE + 1, _PAGE_BIT_FILE + 1) = max(8+1, 6+1) = 9. @@ -84,8 +84,8 @@ On Wed, Jun 17, 2009 at 09:43:29PM +0800, Minchan Kim wrote: > >> >> Okay. then, how about this ? > >> >> We should not increase file_rss on trying to migrate the poisoned page > >> >> -> >> >> - else if (!is_migration_entry(pte_to_swp_entry(*pte))) -> >> >> + else if (!(PAGE_MIGRATION && migration)) +> >> >> - A A A A A A A else if (!is_migration_entry(pte_to_swp_entry(*pte))) +> >> >> + A A A A A A A else if (!(PAGE_MIGRATION && migration)) > >> > > >> > This is good if we are going to stop the hwpoison page from being > >> > consumed by move_to_new_page(), but I highly doubt we'll ever add @@ -93,10 +93,10 @@ On Wed, Jun 17, 2009 at 09:43:29PM +0800, Minchan Kim wrote: > >> > > >> > Because this race window is small enough: > >> > -> >> > TestSetPageHWPoison(p); -> >> > lock_page(page); -> >> > try_to_unmap(page, TTU_MIGRATION|...); -> >> > lock_page_nosync(p); +> >> > A A A A TestSetPageHWPoison(p); +> >> > A A A A A A A A A A A A A A A A A lock_page(page); +> >> > A A A A A A A A A A A A A A A A A try_to_unmap(page, TTU_MIGRATION|...); +> >> > A A A A lock_page_nosync(p); > >> > > >> > such small race windows can be found all over the kernel, it's just > >> > insane to try to fix any of them. @@ -106,7 +106,7 @@ On Wed, Jun 17, 2009 at 09:43:29PM +0800, Minchan Kim wrote: > >> I see your point. > >> My opinion is that at least we must be notified when such situation happen. > >> So I think it would be better to add some warning to fix up it when it -> >> happen even thought it is small race window. +> >> happen even thought A it is small race window. > > > > Notification is also pointless here: we'll die hard on > > accessing/consuming the poisoned page anyway :( @@ -129,3 +129,9 @@ can reach 80% coverage :) Thanks, Fengguang + +-- +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 e999e3a..6f42004 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -55,25 +55,25 @@ "> >> >> > > > > > Signed-off-by: Andi Kleen <ak@linux.intel.com>\n" "> >> >> > > > > >\n" "> >> >> > > > > > ---\n" - "> >> >> > > > > > \302\240include/linux/rmap.h | \302\240 \302\2401 +\n" - "> >> >> > > > > > \302\240mm/rmap.c \302\240 \302\240 \302\240 \302\240 \302\240 \302\240| \302\240 \302\2409 ++++++++-\n" - "> >> >> > > > > > \302\2402 files changed, 9 insertions(+), 1 deletion(-)\n" + "> >> >> > > > > > A include/linux/rmap.h | A A 1 +\n" + "> >> >> > > > > > A mm/rmap.c A A A A A A | A A 9 ++++++++-\n" + "> >> >> > > > > > A 2 files changed, 9 insertions(+), 1 deletion(-)\n" "> >> >> > > > > >\n" "> >> >> > > > > > --- sound-2.6.orig/mm/rmap.c\n" "> >> >> > > > > > +++ sound-2.6/mm/rmap.c\n" "> >> >> > > > > > @@ -958,7 +958,14 @@ static int try_to_unmap_one(struct page\n" - "> >> >> > > > > > \302\240 \302\240 \302\240 \302\240/* Update high watermark before we lower rss */\n" - "> >> >> > > > > > \302\240 \302\240 \302\240 \302\240update_hiwater_rss(mm);\n" + "> >> >> > > > > > A A A A /* Update high watermark before we lower rss */\n" + "> >> >> > > > > > A A A A update_hiwater_rss(mm);\n" "> >> >> > > > > >\n" - "> >> >> > > > > > - \302\240 \302\240 \302\240 if (PageAnon(page)) {\n" - "> >> >> > > > > > + \302\240 \302\240 \302\240 if (PageHWPoison(page) && !(flags & TTU_IGNORE_HWPOISON)) {\n" - "> >> >> > > > > > + \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 if (PageAnon(page))\n" - "> >> >> > > > > > + \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 dec_mm_counter(mm, anon_rss);\n" - "> >> >> > > > > > + \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 else if (!is_migration_entry(pte_to_swp_entry(*pte)))\n" + "> >> >> > > > > > - A A A if (PageAnon(page)) {\n" + "> >> >> > > > > > + A A A if (PageHWPoison(page) && !(flags & TTU_IGNORE_HWPOISON)) {\n" + "> >> >> > > > > > + A A A A A A A if (PageAnon(page))\n" + "> >> >> > > > > > + A A A A A A A A A A A dec_mm_counter(mm, anon_rss);\n" + "> >> >> > > > > > + A A A A A A A else if (!is_migration_entry(pte_to_swp_entry(*pte)))\n" "> >> >> > > > >\n" "> >> >> > > > > Isn't it straightforward to use !is_hwpoison_entry ?\n" "> >> >> > > >\n" - "> >> >> > > > Good catch! \302\240It looks like a redundant check: the\n" + "> >> >> > > > Good catch! A It looks like a redundant check: the\n" "> >> >> > > > page_check_address() at the beginning of the function guarantees that\n" "> >> >> > > > !is_migration_entry() or !is_migration_entry() tests will all be TRUE.\n" "> >> >> > > > So let's do this?\n" @@ -85,9 +85,9 @@ "> >> >> > page_check_address() calls pte_present() which returns the\n" "> >> >> > (_PAGE_PRESENT | _PAGE_PROTNONE) bits. While x86-64 defines\n" "> >> >> >\n" - "> >> >> > #define __swp_entry(type, offset) \302\240 \302\240 \302\240 ((swp_entry_t) { \\\n" - "> >> >> > \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240((type) << (_PAGE_BIT_PRESENT + 1)) \\\n" - "> >> >> > \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240| ((offset) << SWP_OFFSET_SHIFT) })\n" + "> >> >> > #define __swp_entry(type, offset) A A A ((swp_entry_t) { \\\n" + "> >> >> > A A A A A A A A A A A A A A A A A A A A A ((type) << (_PAGE_BIT_PRESENT + 1)) \\\n" + "> >> >> > A A A A A A A A A A A A A A A A A A A A A | ((offset) << SWP_OFFSET_SHIFT) })\n" "> >> >> >\n" "> >> >> > where SWP_OFFSET_SHIFT is defined to the bigger one of\n" "> >> >> > max(_PAGE_BIT_PROTNONE + 1, _PAGE_BIT_FILE + 1) = max(8+1, 6+1) = 9.\n" @@ -114,8 +114,8 @@ "> >> >> Okay. then, how about this ?\n" "> >> >> We should not increase file_rss on trying to migrate the poisoned page\n" "> >> >>\n" - "> >> >> - \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 else if (!is_migration_entry(pte_to_swp_entry(*pte)))\n" - "> >> >> + \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 else if (!(PAGE_MIGRATION && migration))\n" + "> >> >> - A A A A A A A else if (!is_migration_entry(pte_to_swp_entry(*pte)))\n" + "> >> >> + A A A A A A A else if (!(PAGE_MIGRATION && migration))\n" "> >> >\n" "> >> > This is good if we are going to stop the hwpoison page from being\n" "> >> > consumed by move_to_new_page(), but I highly doubt we'll ever add\n" @@ -123,10 +123,10 @@ "> >> >\n" "> >> > Because this race window is small enough:\n" "> >> >\n" - "> >> > \302\240 \302\240 \302\240 \302\240TestSetPageHWPoison(p);\n" - "> >> > \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 lock_page(page);\n" - "> >> > \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 try_to_unmap(page, TTU_MIGRATION|...);\n" - "> >> > \302\240 \302\240 \302\240 \302\240lock_page_nosync(p);\n" + "> >> > A A A A TestSetPageHWPoison(p);\n" + "> >> > A A A A A A A A A A A A A A A A A lock_page(page);\n" + "> >> > A A A A A A A A A A A A A A A A A try_to_unmap(page, TTU_MIGRATION|...);\n" + "> >> > A A A A lock_page_nosync(p);\n" "> >> >\n" "> >> > such small race windows can be found all over the kernel, it's just\n" "> >> > insane to try to fix any of them.\n" @@ -136,7 +136,7 @@ "> >> I see your point.\n" "> >> My opinion is that at least we must be notified when such situation happen.\n" "> >> So I think it would be better to add some warning to fix up it when it\n" - "> >> happen even thought \302\240it is small race window.\n" + "> >> happen even thought A it is small race window.\n" "> >\n" "> > Notification is also pointless here: we'll die hard on\n" "> > accessing/consuming the poisoned page anyway :(\n" @@ -158,6 +158,12 @@ "can reach 80% coverage :)\n" "\n" "Thanks,\n" - Fengguang + "Fengguang\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>" -22f6416cfddbefc1cb462e63fa1e116418a8ab9c6d3fbfa7c472db57595481e9 +276bd66aeb727711754a5e1209d711cf426047428f63237ff0b7620dcdb70de3
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.