Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1323175

Re: [PATCH 1/2] mm: fix bogus VM_BUG_ON_PAGE() in isolate_lru_page()

Path csiph.com!news.mixmin.net!aioe.org!bofh.it!news.nic.it!robomod
From "Kirill A. Shutemov" <kirill@shutemov.name>
Newsgroups linux.kernel
Subject Re: [PATCH 1/2] mm: fix bogus VM_BUG_ON_PAGE() in isolate_lru_page()
Date Mon, 01 Feb 2016 15:40:02 +0100
Message-ID <qXnO2-4aB-35@gated-at.bofh.it> (permalink)
References <qXmIi-3oo-13@gated-at.bofh.it> <qXmIj-3oo-21@gated-at.bofh.it> <qXnEm-45e-5@gated-at.bofh.it>
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=shutemov-name.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=b2Ovmg7D21jM/01RsJTfCAXTEwXdkBB7tqOId52IDU0=; b=eCf9vWQC+xjHuIp/XRCTZTFKpYlV5B3OmIkJ0dX8VFEtZtOFCXHc5mjYaZi2WtlvrT +GaMIFYGUkcCZuDQ0fIc37GE2YF39FsZlvLMseGXR/bmPbOf4Vx4yUmyIeMkeErTurlC HIQ26L6BG0x8Oaim4+HorAEHPtRIdwGBEthQV44ibswjeQEbkDQBCnB7tNYFCjzan/6U SssCBgOxKdzKPp6NiMy9jFl5tVdb3LGEbfrlt4whDlS2IoxszIE9dfzqFOwTtry9c3Ub v28AOJUgzYVlckpFmml+vMdA5He6m5yWWWGtmLBWp3FQJ84wGK1yk9gCq1aWm4W75Qzv B6Cg==
X-Google-Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=b2Ovmg7D21jM/01RsJTfCAXTEwXdkBB7tqOId52IDU0=; b=fgUVHCUFozpKtWRh0luI/KkAfGj0WmQzNOMUqaYwJcBywXlzs7RFdKh/D0oG2mlUC0 yB7hD7I9Ln5tkwsrZR/ylzjDueZuT/JE01DzUVXtY8woAcQIexR0x0dnv6SbTJpQvNJC aNkN7Ata1Sb0M61hJJZvZMXqFd20wUq8hE9iFC78zg09UWJ1fh2k8bvl0i09TOWDqAa5 Z11KOu2E4nNBea+yItBmFNdHWtP6KGbuopNpUknv60HjNS1Sg9+oTSGG02JBGfxSSH+j kwCNb640RF2GhYPrLGcmf8b4eEXL9ZJXa5kmEojm/VLIOU46YbaOIgVDmBfc5kQXEIFH 0m0A==
X-Gm-Message-State AG10YORi0Z7lLOmXX9WwcZpiB2gpE2h53wNsaB6oEHNKQQxYAloj7VCeRCTieAg7sNtTrQ==
X-Received by 10.194.133.233 with SMTP id pf9mr23128923wjb.75.1454337535343; Mon, 01 Feb 2016 06:38:55 -0800 (PST)
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Disposition inline
User-Agent Mutt/1.5.23.1 (2014-03-12)
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 23
Organization linux.* mail to news gateway
X-Original-Cc "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>, Andrew Morton <akpm@linux-foundation.org>, Dmitry Vyukov <dvyukov@google.com>, Vlastimil Babka <vbabka@suse.cz>, David Rientjes <rientjes@google.com>, Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>, linux-mm@kvack.org, linux-kernel@vger.kernel.org
X-Original-Date Mon, 1 Feb 2016 16:38:53 +0200
X-Original-Message-ID <20160201143853.GA30090@node.shutemov.name>
X-Original-References <1454333169-121369-1-git-send-email-kirill.shutemov@linux.intel.com> <1454333169-121369-2-git-send-email-kirill.shutemov@linux.intel.com> <20160201142446.GB24008@dhcp22.suse.cz>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1323175

Show key headers only | View raw


On Mon, Feb 01, 2016 at 03:24:46PM +0100, Michal Hocko wrote:
> On Mon 01-02-16 16:26:08, Kirill A. Shutemov wrote:
> > We don't care if there's a tail pages which is not on LRU. We are not
> > going to isolate them anyway.
> 
> yes we are not going to isolate them but calling this function on a
> tail page is wrong in principle, no? PageLRU check is racy outside of
> lru_lock so what if we are racing here. I know, highly unlikely but not
> impossible. So I am not really sure this is an improvement. When would
> we hit this VM_BUG_ON and it wouldn't be a bug or at least suspicious
> usage?

Yes, there is no point in calling isolate_lru_page() for tail pages, but
we do this anyway -- see the second patch.

And we need to validate all drivers, that they don't forget to set VM_IO
or make vma_migratable() return false in other way.

Alternative approach would be to downgrate the VM_BUG_ON_PAGE() to
WARN_ONCE_ON(). This way we would have chance to catch bad callers.

-- 
 Kirill A. Shutemov

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/2] Fix another VM_BUG_ON_PAGE(PageTail(page)) on mbind(2) "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> - 2016-02-01 14:30 +0100
  [PATCH 1/2] mm: fix bogus VM_BUG_ON_PAGE() in isolate_lru_page() "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> - 2016-02-01 14:30 +0100
    Re: [PATCH 1/2] mm: fix bogus VM_BUG_ON_PAGE() in isolate_lru_page() Michal Hocko <mhocko@kernel.org> - 2016-02-01 15:30 +0100
      Re: [PATCH 1/2] mm: fix bogus VM_BUG_ON_PAGE() in isolate_lru_page() "Kirill A. Shutemov" <kirill@shutemov.name> - 2016-02-01 15:40 +0100
        Re: [PATCH 1/2] mm: fix bogus VM_BUG_ON_PAGE() in isolate_lru_page() Michal Hocko <mhocko@kernel.org> - 2016-02-02 14:30 +0100
  [PATCH 2/2] mempolicy: do not try to queue pages from !vma_migratable() "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> - 2016-02-01 14:30 +0100
    Re: [PATCH 2/2] mempolicy: do not try to queue pages from  !vma_migratable() Andrew Morton <akpm@linux-foundation.org> - 2016-02-01 23:30 +0100

csiph-web