lkml.org 
[lkml]   [2016]   [Feb]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCHv2 2/2] mm: downgrade VM_BUG in isolate_lru_page() to warning
On Tue,  2 Feb 2016 19:21:01 +0300 "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> wrote:

> Calling isolate_lru_page() is wrong and shouldn't happen, but it not
> nessesary fatal: the page just will not be isolated if it's not on LRU.
>
> Let's downgrade the VM_BUG_ON_PAGE() to WARN_RATELIMIT().
>
> Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
> ---
> mm/vmscan.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/vmscan.c b/mm/vmscan.c
> index eb3dd37ccd7c..71b1c29948db 100644
> --- a/mm/vmscan.c
> +++ b/mm/vmscan.c
> @@ -1443,7 +1443,7 @@ int isolate_lru_page(struct page *page)
> int ret = -EBUSY;
>
> VM_BUG_ON_PAGE(!page_count(page), page);
> - VM_BUG_ON_PAGE(PageTail(page), page);
> + WARN_RATELIMIT(PageTail(page), "trying to isolate tail page");
>
> if (PageLRU(page)) {
> struct zone *zone = page_zone(page);

Confused. I thought mm-fix-bogus-vm_bug_on_page-in-isolate_lru_page.patch:

--- a/mm/vmscan.c~mm-fix-bogus-vm_bug_on_page-in-isolate_lru_page
+++ a/mm/vmscan.c
@@ -1443,7 +1443,7 @@ int isolate_lru_page(struct page *page)
int ret = -EBUSY;

VM_BUG_ON_PAGE(!page_count(page), page);
- VM_BUG_ON_PAGE(PageTail(page), page);
+ VM_BUG_ON_PAGE(PageLRU(page) && PageTail(page), page);

if (PageLRU(page)) {
struct zone *zone = page_zone(page);
was better. We *know* that we sometimes encounter LRU pages here and
we know that we handle them correctly. So why scare users by blurting
out a warning about something for which we won't be taking any action?

\
 
 \ /
  Last update: 2016-02-02 22:41    [W:0.087 / U:0.608 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site