netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dennis Zhou <dennisszhou@gmail.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Tejun Heo <tj@kernel.org>, Daniel Borkmann <daniel@iogearbox.net>,
	Dmitry Vyukov <dvyukov@google.com>,
	syzbot <syzbot+adb03f3f0bb57ce3acda@syzkaller.appspotmail.com>,
	Alexei Starovoitov <ast@kernel.org>,
	netdev <netdev@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	syzkaller-bugs@googlegroups.com
Subject: Re: lost connection to test machine (4)
Date: Tue, 13 Feb 2018 12:13:52 -0600	[thread overview]
Message-ID: <20180213181352.GA60936@localhost.uwnet.wisc.edu> (raw)
In-Reply-To: <1518544167.3715.180.camel@gmail.com>

On Tue, Feb 13, 2018 at 09:49:27AM -0800, Eric Dumazet wrote:
> On Tue, 2018-02-13 at 11:34 -0600, Dennis Zhou wrote:
> > Hi Eric,
> > 
> > On Tue, Feb 13, 2018 at 05:35:26AM -0800, Eric Dumazet wrote:
> > > 
> > > Also I would consider using this fix as I had warnings of cpus being
> > > stuck there for more than 50 ms :
> > > 
> > > 
> > > diff --git a/mm/percpu-vm.c b/mm/percpu-vm.c
> > > index 9158e5a81391ced4e268e3d5dd9879c2bc7280ce..6309b01ceb357be01e857e5f899429403836f41f 100644
> > > --- a/mm/percpu-vm.c
> > > +++ b/mm/percpu-vm.c
> > > @@ -92,6 +92,7 @@ static int pcpu_alloc_pages(struct pcpu_chunk *chunk,
> > >  			*pagep = alloc_pages_node(cpu_to_node(cpu), gfp, 0);
> > >  			if (!*pagep)
> > >  				goto err;
> > > +			cond_resched();
> > >  		}
> > >  	}
> > >  	return 0;
> > > 
> > > 
> > 
> > This function gets called from pcpu_populate_chunk while holding the
> > pcpu_alloc_mutex and is called from two scenarios. First, when an
> > allocation occurs to a place without backing pages, and second when the
> > workqueue item is scheduled to replenish the number of empty pages. So,
> > I don't think this is a good idea.
> > 
> 
> That _is_ a good idea, we do this already in vmalloc(), and vmalloc()
> can absolutely be called while some mutex(es) are held.
> 
> 
> > My understanding is if we're seeing warnings here, that means we're
> > struggling to find backing pages. I believe adding __GFP_NORETRY on the
> > workqueue path as Tejun mentioned above would help with warnings as
> > well, but not if they are caused by the allocation path.
> > 
> 
> That is a separate concern.
> 
> My patch simply avoids latency spikes when huge percpu allocations are
> happening, on systems with say 1024 cpus.
> 
> 

I see. I misunderstood thinking this was for the same concern.

Thanks,
Dennis

  reply	other threads:[~2018-02-13 18:13 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <001a113f8734783e94056505f8fd@google.com>
2018-02-12 16:03 ` lost connection to test machine (4) Dmitry Vyukov
2018-02-12 17:00   ` Daniel Borkmann
2018-02-12 17:03     ` Tejun Heo
2018-02-12 20:05       ` Tejun Heo
2018-02-13 13:35         ` Eric Dumazet
2018-02-13 17:34           ` Dennis Zhou
2018-02-13 17:49             ` Eric Dumazet
2018-02-13 18:13               ` Dennis Zhou [this message]
2018-02-14 17:15     ` Dennis Zhou
2018-02-14 17:28       ` syzbot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180213181352.GA60936@localhost.uwnet.wisc.edu \
    --to=dennisszhou@gmail.com \
    --cc=ast@kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=dvyukov@google.com \
    --cc=eric.dumazet@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=syzbot+adb03f3f0bb57ce3acda@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.com \
    --cc=tj@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).