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


Groups > linux.kernel > #1466455

Re: [PATCH] mm: Add WARN_ON for possibility of infinite loop if empty lists in free_pcppages_bulk'

From Mel Gorman <mgorman@techsingularity.net>
Newsgroups linux.kernel
Subject Re: [PATCH] mm: Add WARN_ON for possibility of infinite loop if empty lists in free_pcppages_bulk'
Date 2016-08-19 16:10 +0200
Message-ID <s7SEF-6Cv-5@gated-at.bofh.it> (permalink)
References <s7QWd-5wf-9@gated-at.bofh.it> <s7Rpg-5FZ-37@gated-at.bofh.it> <s7RIC-61N-17@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri, Aug 19, 2016 at 09:07:21AM -0400, Pankaj Gupta wrote:
> 
> > 
> > On Fri, Aug 19, 2016 at 05:45:18PM +0530, Pankaj Gupta wrote:
> > > While debugging issue in realtime kernel i found a scenario
> > > which resulted in infinite loop resulting because of empty pcp->lists
> > > and valid 'to_free' value. This patch is to add 'WARN_ON' in function
> > > 'free_pcppages_bulk' if there is possibility of infinite loop because
> > > of any bug in code.
> > > 
> > 
> > What was the bug that allowed this situation to occur? It would imply
> > the pcp count was somehow out of sync.
> 
> Yes pcp count was out of sync. It was a bug in the downstream code.

If the bug is not in the mainline code, I think it would be inappropriate
to add unnecessary code to a relatively hot path. At most, it should be
a VM_BUG_ON but the soft lockup should be clear enough.

-- 
Mel Gorman
SUSE Labs

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


Thread

[PATCH] mm: Add WARN_ON for possibility of infinite loop if empty lists in free_pcppages_bulk' Pankaj Gupta <pagupta@redhat.com> - 2016-08-19 14:20 +0200
  Re: [PATCH] mm: Add WARN_ON for possibility of infinite loop if  empty lists in free_pcppages_bulk' Mel Gorman <mgorman@techsingularity.net> - 2016-08-19 14:50 +0200
    Re: [PATCH] mm: Add WARN_ON for possibility of infinite loop if  empty lists in free_pcppages_bulk' Pankaj Gupta <pagupta@redhat.com> - 2016-08-19 15:10 +0200
      Re: [PATCH] mm: Add WARN_ON for possibility of infinite loop if  empty lists in free_pcppages_bulk' Mel Gorman <mgorman@techsingularity.net> - 2016-08-19 16:10 +0200
        Re: [PATCH] mm: Add WARN_ON for possibility of infinite loop if  empty lists in free_pcppages_bulk' Pankaj Gupta <pagupta@redhat.com> - 2016-08-23 10:50 +0200

csiph-web