Received: by 2002:ac0:950c:0:0:0:0:0 with SMTP id f12csp3640728imc; Thu, 14 Mar 2019 01:42:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqzGorvTcq4YHpCv5Rj0tOW6lvxyNIxfQWqeJ7de2KpKnEQFj/e+r0X2aa2KsTEq3Pia9gyI X-Received: by 2002:a63:1a03:: with SMTP id a3mr44482372pga.192.1552552941130; Thu, 14 Mar 2019 01:42:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552552941; cv=none; d=google.com; s=arc-20160816; b=i8KFxwHE9g21kSoJ2I8eBLge7XPLpHvSkTIOySTmcYVxIgwZw7M81Bi9omAChTcq9W D/QuOhivTbmmFQ7IDHdA/nhV73LV7DvUCTQG6vDySshGGIWunnvPfT/tqa+vxBmHkPhU 9OtsyNl84fiDy00Mr1euNCMpCPk95EJfMyrB/Da+Gvvug2DYTI4Eh8u3xn/V+Jdu8k/L MdUNHwWH/XfCnD4kBfwIlVmrZLs5o3GJ8l67eba24pMCLW270SJYriiN/t1HiIBZOQIU DH+oXDCrrYM2a/mxiNNkq6CDey3xE/XNDFq5OjVU3M692oZhsrt3Ff7uWauqtoA+6B1u gCtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=wU3yShQLf1I/iQVb45F4fOJTi+ejY5x4FtnBKZoRRes=; b=U6qB0p/gUjjnlYr4qiX5vpOxzDAm7fnvhLKDLk9v6qLbFoJfx2sIEcG5IerLWF+AlD KhW+RLm2uOV3jw/FWP74PvetoGA1GDPnUzsm+KJhCb8fFoFwbsKhGx2vU1dA6wymFKrF oyliDy5ZYE6kiOujNjymC6rl7+77AL5ywqTyjwfIngJOZ/e9DE++MmxZMrUf+cYgvy/C M9WSeeOluIo4OpF+GBdRJ2OFNbcrTDpvENo32qMQbRy6ffVLovxhasYlgBv9orb/nEZx dqoUh1/SgVOj/othmjHRjeFlm+/TV9qeWCsigOmnPnFAPAdf+xurGtUum7dOQqumjrVJ b7Nw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u9si12002191pgp.269.2019.03.14.01.42.06; Thu, 14 Mar 2019 01:42:21 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727308AbfCNIlX convert rfc822-to-8bit (ORCPT + 99 others); Thu, 14 Mar 2019 04:41:23 -0400 Received: from mx2.suse.de ([195.135.220.15]:51010 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726539AbfCNIlX (ORCPT ); Thu, 14 Mar 2019 04:41:23 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 5A7B9AD25; Thu, 14 Mar 2019 08:41:21 +0000 (UTC) Date: Thu, 14 Mar 2019 09:41:20 +0100 From: Michal Hocko To: Pankaj Suryawanshi Cc: "linux-kernel@vger.kernel.org" , "minchan@kernel.org" Subject: Re: vmscan: Reclaim unevictable pages Message-ID: <20190314084120.GF7473@dhcp22.suse.cz> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: 8BIT In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu 14-03-19 08:23:10, Pankaj Suryawanshi wrote: > > Below is the Error Msg : > > [ 24.718792] page dumped because: VM_BUG_ON_PAGE(PageLRU(page) || PageUnevictable(page)) > [ 24.726949] page->mem_cgroup:bd008c00 > [ 24.730693] ------------[ cut here ]------------ > [ 24.735304] kernel BUG at mm/vmscan.c:1350! > [ 24.739478] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP ARM Just curious. Which kernel version is that? Are there any addional patches applied on top of vanilla? > Solved the issue by below patch. > > > diff --git a/mm/vmscan.c b/mm/vmscan.c > index be56e2e..2e51edc 100644 > --- a/mm/vmscan.c > +++ b/mm/vmscan.c > @@ -990,15 +990,17 @@ static unsigned long shrink_page_list(struct list_head *page_list, > page = lru_to_page(page_list); > list_del(&page->lru); > > if (!trylock_page(page)) { > goto keep; > } > > VM_BUG_ON_PAGE(PageActive(page), page); > > sc->nr_scanned++; > > if (unlikely(!page_evictable(page))) > - goto activate_locked; > + goto cull_mlocked; > > if (!sc->may_unmap && page_mapped(page)) > goto keep_locked; > @@ -1331,6 +1333,12 @@ static unsigned long shrink_page_list(struct list_head *page_list, > } else > list_add(&page->lru, &free_pages); > continue; > +cull_mlocked: > + if (PageSwapCache(page)) > + try_to_free_swap(page); > + unlock_page(page); > + list_add(&page->lru, &ret_pages); > + continue; > > activate_locked: > /* Not a candidate for swapping, so reclaim swap space. */ > > > > > From: Pankaj Suryawanshi > Sent: 14 March 2019 13:23:53 > To: linux-kernel@vger.kernel.org > Cc: minchan@kernel.org > Subject: vmscan: Reclaim unevictable pages > > > > Hello , > > shrink_page_list() returns , number of pages reclaimed, when pages is unevictable it returns VM_BUG_ON_PAGE(PageLRU(page) || PageUnevicatble(page),page); > > We can add the unevictable pages in reclaim list in shrink_page_list(), return total number of reclaim pages including unevictable pages, let the caller handle unevictable pages. > > Regards, > Pankaj > > ************************************************************************************************************************************************************* eInfochips Business Disclaimer: This e-mail message and all attachments transmitted with it are intended solely for the use of the addressee and may contain legally privileged and confidential information. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution, copying, or other use of this message or its attachments is strictly prohibited. If you have received this message in error, please notify the sender immediately by replying to this message and please delete it from your computer. Any views expressed in this message are those of the individual sender unless otherwise stated. Company has taken enough precautions to prevent the spread of viruses. However the company accepts no liability for any damage caused by any virus transmitted by this email. ************************************************************************************************************************************************************* -- Michal Hocko SUSE Labs