Received: by 10.223.185.116 with SMTP id b49csp2588269wrg; Mon, 12 Feb 2018 12:07:17 -0800 (PST) X-Google-Smtp-Source: AH8x226bNURsqDYabsXjviircwVaYZ3S8gRoFi3zflapYQsDwi7D9W8n2fw30Z2zZGtr6j6R/1O0 X-Received: by 10.101.66.129 with SMTP id j1mr9910794pgp.56.1518466037330; Mon, 12 Feb 2018 12:07:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518466037; cv=none; d=google.com; s=arc-20160816; b=knDRok1088i/nT4a7vj1Mwoyg478SgQ5HKOnllgdlHqemg2rFbx4IO+A33PZmWWYQ0 7MyEq0FDXNCk7sD0el4qzHIaZCRmvV+hlNSebEJBlzpLgX58azd9cj57geAaY/ONn3nH wZ617HGZljH7fjHcx4/66dv0Orkx5cuEYzQqPmO8AzjIr3v3Ki199cRNRlHVa7EpGbrL UO28ZAv2OizEy0hMzz5/SDp8SViv5tXGxqA4JBdE5Q6f5tLn7Z+0vT5a6By6PR5mJ7WQ MBlS/NXJnZukXCtLEIuD3dL6BnoiC7Z10M1T+xjdnUJNfyZ97hjUYL7N6EKZktph+ZT5 vMEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=TzkfC4f8UfwnBrwUKigrTDwsAk7J4AlvcIrtZLoXLIg=; b=m3zsNiyUTmZKJ3MmkLvysmoCquL5tdMa85Sq4a1AS9U5dlmealKK/Saj55mIOOS8Mf t+aBQijAunxDxiWtvkvJzj1M7BTngI00Bz5MDEtbe9lBDCppv0NrXpr0cRhCOwn+Kqlt EJa3yX3qKEkkdrMYJF93V0wkZgCUKCqioMRLr4OH1PmbF2aQg+T/y4o9kwqraFl8hE1Y oq0wnQZxvWcLR7G/nxcgefvyTBPdtHEhNVfxzvERkWoOwiDbsQ5kNKcDryKYFbBB4C3i qMkVx5NbRnBN2/iw76QUh2SYMLH6vGwJkMMcn4aiW2iRPAfotLoF49Bsz1vw7i1tiI+j AE5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=YIpsuCAZ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 43-v6si64692plb.548.2018.02.12.12.07.02; Mon, 12 Feb 2018 12:07:17 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=YIpsuCAZ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752111AbeBLUFy (ORCPT + 99 others); Mon, 12 Feb 2018 15:05:54 -0500 Received: from mail-qt0-f182.google.com ([209.85.216.182]:37869 "EHLO mail-qt0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751021AbeBLUFw (ORCPT ); Mon, 12 Feb 2018 15:05:52 -0500 Received: by mail-qt0-f182.google.com with SMTP id w1so1033053qti.4; Mon, 12 Feb 2018 12:05:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=TzkfC4f8UfwnBrwUKigrTDwsAk7J4AlvcIrtZLoXLIg=; b=YIpsuCAZECsRPCC5vSKUj7/Yvukr0mtH+KQwllUHoxVOv8u7ekGHkMqKQ7n+hBFq4d ulLeU8hN4Uw1dcWLIPLXx555yVR1cylvfmU0FxpCws0hcOLQ9iBjz8XW1yye5TW/nNWl GyXqroBxOmkOnz5d3kF51+C7eKhSdLEu+lCuYIbXWd3dDU7jJOTdoRs5Y7Waj81uBktn XP2j3d3nJcwr82ve51JxqDJBeX1pi36hGD/UCmZ2uDZxUtOgXy96ZO+OF0UNTJ1jbvuK t+MwEEr26a467xJbqQMM6eTqiTUcF2dA+N+5S4zYD+V0VMcX1l8CFz/LpqwKlqVnjhbV V5Bw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=TzkfC4f8UfwnBrwUKigrTDwsAk7J4AlvcIrtZLoXLIg=; b=GBOfop12QqwqqkF2DHrOC/Gw0piuDCy9/UCXfxdz6Xk3p8ojayibcuAneIl2DpRxFy Rf4l5xRYNiDOijgn7kJHv7jM1LI8XvClOfORmUJcKokr8Zf0qf6MWWQpw79Rwy6oVLnM s6vHN5kj9F6VCPL8Z6Dd990YCwqKuce7OXAulfwt0lXmYA3rPJSfddD9r3Zp92YaiUA+ kVy0WxbysuKT8/y7ZNoE1+4cAIUc44kma/KLfCArUGpko0nlRKUPL8ioGM4pMjpe/h2d 8B9i2T/uu65t5oQBnB9Tv8TDgneC+VVF0+2D0wydzIR+16ENPRKaJQE/sf9DeLaPrvRW QapA== X-Gm-Message-State: APf1xPC3cAZvjXEblHY+6+zpAjSCwxADG2K8y9eRR1bBEHUo5NUpbZN6 qMHWZCMerRvvSW82k3I2Fx8= X-Received: by 10.200.50.155 with SMTP id z27mr20865397qta.140.1518465951836; Mon, 12 Feb 2018 12:05:51 -0800 (PST) Received: from localhost (dhcp-ec-8-6b-ed-7a-cf.cpe.echoes.net. [72.28.5.223]) by smtp.gmail.com with ESMTPSA id l78sm6527938qke.6.2018.02.12.12.05.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Feb 2018 12:05:51 -0800 (PST) Date: Mon, 12 Feb 2018 12:05:48 -0800 From: Tejun Heo To: Daniel Borkmann Cc: dennisszhou@gmail.com, Dmitry Vyukov , syzbot , Alexei Starovoitov , netdev , LKML , syzkaller-bugs@googlegroups.com Subject: Re: lost connection to test machine (4) Message-ID: <20180212200548.GG695913@devbig577.frc2.facebook.com> References: <001a113f8734783e94056505f8fd@google.com> <00c45ca8-305d-1818-e974-a9903c8494b8@iogearbox.net> <20180212170325.GW695913@devbig577.frc2.facebook.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180212170325.GW695913@devbig577.frc2.facebook.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 12, 2018 at 09:03:25AM -0800, Tejun Heo wrote: > Hello, Daniel. > > On Mon, Feb 12, 2018 at 06:00:13PM +0100, Daniel Borkmann wrote: > > [ +Dennis, +Tejun ] > > > > Looks like we're stuck in percpu allocator with key/value size of 4 bytes > > each and large number of entries (max_entries) in the reproducer in above > > link. > > > > Could we have some __GFP_NORETRY semantics and let allocations fail instead > > of triggering OOM killer? > > For some part, maybe, but not generally. The virt area allocation > goes down to page table allocation which is hard coded to use > GFP_KERNEL in arch mm code. So, the following should convert majority of allocations to use __GFP_NORETRY. It doesn't catch everything but should significantly lower the probability of hitting this and put this on the same footing as vmalloc. Can you see whether this is enough? Note that this patch isn't upstreamable. We definitely want to restrict this to the rebalance path, but it should be good enough for testing. Thanks. diff --git a/mm/percpu-vm.c b/mm/percpu-vm.c index 9158e5a..0b4739f 100644 --- a/mm/percpu-vm.c +++ b/mm/percpu-vm.c @@ -81,7 +81,7 @@ static void pcpu_free_pages(struct pcpu_chunk *chunk, static int pcpu_alloc_pages(struct pcpu_chunk *chunk, struct page **pages, int page_start, int page_end) { - const gfp_t gfp = GFP_KERNEL | __GFP_HIGHMEM; + const gfp_t gfp = GFP_KERNEL | __GFP_HIGHMEM | __GFP_NORETRY; unsigned int cpu, tcpu; int i;