Re: [v5 1/2] mm: disable interrupts while initializing deferred pages

2018-03-13 Thread Pavel Tatashin
> hm, maybe. But I'm not sure that touch_nmi_watchdog() will hold off a > soft lockup warning. Maybe it will. It should: 124static inline void touch_nmi_watchdog(void) 125{ 126 arch_touch_nmi_watchdog(); 127 touch_softlockup_watchdog(); 128} > > And please let's get the above thoughts into the

Re: [v5 1/2] mm: disable interrupts while initializing deferred pages

2018-03-13 Thread Andrew Morton
On Tue, 13 Mar 2018 16:43:47 -0400 Pavel Tatashin wrote: > > > Soft lockup: kernel has run for too long without rescheduling > > Hard lockup: kernel has run for too long with interrupts disabled > > > > Both of these are detected by the NMI watchdog handler. > > > > 9b6e63cbf85b89b2d fixes a

Re: [v5 1/2] mm: disable interrupts while initializing deferred pages

2018-03-13 Thread Pavel Tatashin
> Soft lockup: kernel has run for too long without rescheduling > Hard lockup: kernel has run for too long with interrupts disabled > > Both of these are detected by the NMI watchdog handler. > > 9b6e63cbf85b89b2d fixes a soft lockup by adding a manual rescheduling > point. Replacing that with

Re: [v5 1/2] mm: disable interrupts while initializing deferred pages

2018-03-13 Thread Andrew Morton
On Tue, 13 Mar 2018 15:45:46 -0400 Pavel Tatashin wrote: > > > > > > We must remove cond_resched() because we can't sleep anymore. They were > > > added to fight NMI timeouts, so I will replace them with > > > touch_nmi_watchdog() in a follow-up fix. > > > > This makes no sense. Any code sect

Re: [v5 1/2] mm: disable interrupts while initializing deferred pages

2018-03-13 Thread Pavel Tatashin
> > > > We must remove cond_resched() because we can't sleep anymore. They were > > added to fight NMI timeouts, so I will replace them with > > touch_nmi_watchdog() in a follow-up fix. > > This makes no sense. Any code section where we can add cond_resched() > was never subject to NMI timeouts

Re: [v5 1/2] mm: disable interrupts while initializing deferred pages

2018-03-13 Thread Andrew Morton
On Tue, 13 Mar 2018 12:04:30 -0400 Pavel Tatashin wrote: > > > > > --- a/mm/page_alloc.c > > > +++ b/mm/page_alloc.c > > > @@ -1506,7 +1506,6 @@ static void __init deferred_free_pages(int nid, int > > > zid, unsigned long pfn, > > > } else if (!(pfn & nr_pgmask)) { > > >

Re: [v5 1/2] mm: disable interrupts while initializing deferred pages

2018-03-13 Thread Pavel Tatashin
Hi Andrew, > > +/* Disable interrupts and save previous IRQ state in flags before locking > > */ > > +static inline > > +void pgdat_resize_lock_irq(struct pglist_data *pgdat, unsigned long *flags) > > +{ > > + unsigned long tmp_flags; > > + > > + local_irq_save(*flags); > > + local_irq_disa

Re: [v5 1/2] mm: disable interrupts while initializing deferred pages

2018-03-12 Thread Andrew Morton
On Fri, 9 Mar 2018 17:08:06 -0500 Pavel Tatashin wrote: > Vlastimil Babka reported about a window issue during which when deferred > pages are initialized, and the current version of on-demand initialization > is finished, allocations may fail. While this is highly unlikely scenario, > since t