Commit a08c80eb authored by Andi Kleen's avatar Andi Kleen

HWPOISON: Remove retry loop for try_to_unmap

We don't reply in other temporary failure cases and there were no
reports of replies happening. I think the original reason it was
added was also just an early bug, not an observation of the race.

So remove the loop for now, but keep a warning message.
Signed-off-by: default avatarAndi Kleen <ak@linux.intel.com>
parent 9033ae16
...@@ -840,8 +840,6 @@ static int page_action(struct page_state *ps, struct page *p, ...@@ -840,8 +840,6 @@ static int page_action(struct page_state *ps, struct page *p,
return (result == RECOVERED || result == DELAYED) ? 0 : -EBUSY; return (result == RECOVERED || result == DELAYED) ? 0 : -EBUSY;
} }
#define N_UNMAP_TRIES 5
/* /*
* Do all that is necessary to remove user space mappings. Unmap * Do all that is necessary to remove user space mappings. Unmap
* the pages and send SIGBUS to the processes if the data was dirty. * the pages and send SIGBUS to the processes if the data was dirty.
...@@ -853,7 +851,6 @@ static int hwpoison_user_mappings(struct page *p, unsigned long pfn, ...@@ -853,7 +851,6 @@ static int hwpoison_user_mappings(struct page *p, unsigned long pfn,
struct address_space *mapping; struct address_space *mapping;
LIST_HEAD(tokill); LIST_HEAD(tokill);
int ret; int ret;
int i;
int kill = 1; int kill = 1;
struct page *hpage = compound_head(p); struct page *hpage = compound_head(p);
...@@ -907,17 +904,7 @@ static int hwpoison_user_mappings(struct page *p, unsigned long pfn, ...@@ -907,17 +904,7 @@ static int hwpoison_user_mappings(struct page *p, unsigned long pfn,
if (kill) if (kill)
collect_procs(hpage, &tokill); collect_procs(hpage, &tokill);
/* ret = try_to_unmap(hpage, ttu);
* try_to_unmap can fail temporarily due to races.
* Try a few times (RED-PEN better strategy?)
*/
for (i = 0; i < N_UNMAP_TRIES; i++) {
ret = try_to_unmap(hpage, ttu);
if (ret == SWAP_SUCCESS)
break;
pr_debug("MCE %#lx: try_to_unmap retry needed %d\n", pfn, ret);
}
if (ret != SWAP_SUCCESS) if (ret != SWAP_SUCCESS)
printk(KERN_ERR "MCE %#lx: failed to unmap page (mapcount=%d)\n", printk(KERN_ERR "MCE %#lx: failed to unmap page (mapcount=%d)\n",
pfn, page_mapcount(hpage)); pfn, page_mapcount(hpage));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment