Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp881385ybl; Fri, 30 Aug 2019 08:28:13 -0700 (PDT) X-Google-Smtp-Source: APXvYqyxMwdYMTm7jMsLkxHSMyn9Ly+oudb2hpQhZTK2OHUD+8npkdJH+Zl4c4FTPxKq0E9e8s74 X-Received: by 2002:a17:902:465:: with SMTP id 92mr16733269ple.128.1567178893394; Fri, 30 Aug 2019 08:28:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567178893; cv=none; d=google.com; s=arc-20160816; b=gfl9x9dE4zOv77GbL3nhYz/dvsJhyEKMdU3gHpPsSjjYVT9+Um0Qm9GuvLO95d60CZ 5Bys4QsJsyjd9jZR8ZGpM+Cc4DrsW1mtbmEeKGxBCXIZeA9MQIaHfvwAitipnsEUw/ZH Rc9+yQHFhnAFED6ELQBtkRU0c09Mi+/KToySQs21itVwBGkDFMpd7Iyk5sgzDYU55xxh +ayRTNEbk615Vpf+LFQ9wksvcKNYMVzOZIXc6i6Gr2EDqn9VkfxGy25mYoKM1nIF4Vgn O00xiWxZjfCRe8pWh6REVl47LVJ4KjEid7NUKMZ+qwo91qTggrTa9g7U2pfDQSt0tOrM 2X1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :dkim-signature; bh=uAGNj/k9sxhyWPF4gW8v9ANxItk70JmBhK3Bz890W+M=; b=e3dguvlrBayXZYpZBvxYN8TXCmDqbBomESkId4kwd+ofeMsmf8gwKA2Wur61Ju3bQs NDF11g18khQcZlv9Lxk8So5jAuhRwNAON+xBpB3JZZck0wVSQQet1/M+1hCHTa2tTk9+ K5ac8DYIYyhJvlefXDEAV1KQLgoOW2BOD1hp+0XYZFCzm3ZAmUdl04Qrv3jwRsdrLmGN +mfwsOpgFrYQ/1ImEESLXcFmE/dwFmZ4ZTVBdENbc+yNVEX3/5eVItjoqzpB2n15EHxz vOF0nxPAPhzsL+/G6Kt1hwbK6e/Z06LUL+YZ2n7+CQVAAj48ZX8ZwCrWLawNB5tT6kqU yYYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lca.pw header.s=google header.b="j+V6+/Z8"; 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 s10si5047588pjp.27.2019.08.30.08.27.58; Fri, 30 Aug 2019 08:28:13 -0700 (PDT) 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=pass header.i=@lca.pw header.s=google header.b="j+V6+/Z8"; 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 S1728187AbfH3PZc (ORCPT + 99 others); Fri, 30 Aug 2019 11:25:32 -0400 Received: from mail-qk1-f195.google.com ([209.85.222.195]:44499 "EHLO mail-qk1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727938AbfH3PZc (ORCPT ); Fri, 30 Aug 2019 11:25:32 -0400 Received: by mail-qk1-f195.google.com with SMTP id i78so5007514qke.11 for ; Fri, 30 Aug 2019 08:25:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lca.pw; s=google; h=message-id:subject:from:to:cc:date:in-reply-to:references :mime-version:content-transfer-encoding; bh=uAGNj/k9sxhyWPF4gW8v9ANxItk70JmBhK3Bz890W+M=; b=j+V6+/Z819VI1YZCoOnBj/oMDBF8SifHtR2Py7Q6rcAn92pGtORGovoGCON3Xa0lEX mxAwlsSE96mMR4c61G9G8QRLocu2g29Ge8DsiPpZhLQtBn5g7rnvG1bZS0vRFyLLpUTi KFDkNrI8kkq2QeMA60xq6RRi5XmiTP6vF7tokvFja6/cKXod0up2/W3LB6o9eFp4H/yY LJ6JRhF31aQpNRTjiSXK9uHJasLwOO4iLkUiazLH6+SWDJCh1fQVNiKgaHLXlY6vO7W/ cdjf95wdC7m+IpXiXMrUqxD3WZVng2GUkXt8H/YEuy8WtKiRq/pMEFgtNh71FTkAJy5g TwQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:mime-version:content-transfer-encoding; bh=uAGNj/k9sxhyWPF4gW8v9ANxItk70JmBhK3Bz890W+M=; b=cA3v8wCyiDjKAiz//WlcSH5oJsKSqTZW9ehffLLvndwhsxZ4oFjwcbF094M2WQ/zUG qSUcgsl/DmBraMYxH5Q6YQBVJOvCt8eCx9iYSKVYPttleLNMoNV4ioXfVrOXV8gL4dbB 12kxQFLhY0BAdOfNYDzHPeMAWCJEiE5ced2e4e/c5mq3iDxekn4tFG3JzKZKkbRzg4Fn Ifwjz74tAuP86r8gI7EjNPsOBtyUMOov2uBw5v/c+R4dajbJ1i4GRjzZRXmf8jLH9R4B zLECOSD+FkMB7xe0/huBDw+UrjlVqz9D7sOR1xZX3WdSEOe6R3NaENMz8BoIr/ygoj/s iPdA== X-Gm-Message-State: APjAAAVbMlLfePD+SzDKFCdrv4n1DKbRc0GxORal7MpLmQjl+6QhqpUI XFrMAAYGbtKeTK4hRHu5u/yTAQ== X-Received: by 2002:a37:4d0c:: with SMTP id a12mr15819201qkb.214.1567178731214; Fri, 30 Aug 2019 08:25:31 -0700 (PDT) Received: from dhcp-41-57.bos.redhat.com (nat-pool-bos-t.redhat.com. [66.187.233.206]) by smtp.gmail.com with ESMTPSA id l8sm3559996qti.65.2019.08.30.08.25.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 30 Aug 2019 08:25:30 -0700 (PDT) Message-ID: <1567178728.5576.32.camel@lca.pw> Subject: Re: [PATCH] net/skbuff: silence warnings under memory pressure From: Qian Cai To: Eric Dumazet , davem@davemloft.net Cc: netdev@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Date: Fri, 30 Aug 2019 11:25:28 -0400 In-Reply-To: <6109dab4-4061-8fee-96ac-320adf94e130@gmail.com> References: <1567177025-11016-1-git-send-email-cai@lca.pw> <6109dab4-4061-8fee-96ac-320adf94e130@gmail.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.22.6 (3.22.6-10.el7) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2019-08-30 at 17:11 +0200, Eric Dumazet wrote: > > On 8/30/19 4:57 PM, Qian Cai wrote: > > When running heavy memory pressure workloads, the system is throwing > > endless warnings below due to the allocation could fail from > > __build_skb(), and the volume of this call could be huge which may > > generate a lot of serial console output and cosumes all CPUs as > > warn_alloc() could be expensive by calling dump_stack() and then > > show_mem(). > > > > Fix it by silencing the warning in this call site. Also, it seems > > unnecessary to even print a warning at all if the allocation failed in > > __build_skb(), as it may just retransmit the packet and retry. > > > > Same patches are showing up there and there from time to time. > > Why is this particular spot interesting, against all others not adding > __GFP_NOWARN ? > > Are we going to have hundred of patches adding __GFP_NOWARN at various points, > or should we get something generic to not flood the syslog in case of memory > pressure ? > From my testing which uses LTP oom* tests. There are only 3 places need to be patched. The other two are in IOMMU code for both Intel and AMD. The place is particular interesting because it could cause the system with floating serial console output for days without making progress in OOM. I suppose it ends up in a looping condition that warn_alloc() would end up generating more calls into __build_skb() via ksoftirqd.