[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180313160430.hbjnyiazadt3jwa6@xakep.localdomain>
Date: Tue, 13 Mar 2018 12:04:30 -0400
From: Pavel Tatashin <pasha.tatashin@...cle.com>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: steven.sistare@...cle.com, daniel.m.jordan@...cle.com,
m.mizuma@...fujitsu.com, mhocko@...e.com, catalin.marinas@....com,
takahiro.akashi@...aro.org, gi-oh.kim@...fitbricks.com,
heiko.carstens@...ibm.com, baiyaowei@...s.chinamobile.com,
richard.weiyang@...il.com, paul.burton@...s.com,
miles.chen@...iatek.com, vbabka@...e.cz, mgorman@...e.de,
hannes@...xchg.org, linux-kernel@...r.kernel.org,
linux-mm@...ck.org
Subject: Re: [v5 1/2] mm: disable interrupts while initializing deferred pages
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_disable();
> > + pgdat_resize_lock(pgdat, &tmp_flags);
> > +}
>
> As far as I can tell, this ugly-looking thing is identical to
> pgdat_resize_lock().
I will get rid of it, and use pgdat_resize_lock(). My confusion was that I
thought that local_irq_save() only saves the IRQ flags does not disable
them.
>
> > --- 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)) {
> > deferred_free_range(pfn - nr_free, nr_free);
> > nr_free = 1;
> > - cond_resched();
> > } else {
> > nr_free++;
>
> And how can we simply remove these cond_resched()s? I assume this is
> being done because interrupts are now disabled? But those were there
> for a reason, weren't they?
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.
Thank you for your review,
Pavel
Powered by blists - more mailing lists