linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Juha-Matti Tilli <juha-matti.tilli@foreca.com>
To: David Miller <davem@davemloft.net>
Cc: Eric Dumazet <edumazet@google.com>,
	Juha-Matti Tilli <juha-matti.tilli@foreca.com>,
	LKML <linux-kernel@vger.kernel.org>,
	netdev <netdev@vger.kernel.org>,
	Rafael Aquini <aquini@redhat.com>, Murphy Zhou <xzhou@redhat.com>,
	Yongcheng Yang <yoyang@redhat.com>,
	Jianhong Yin <jiyin@redhat.com>
Subject: Re: [PATCH] net: add big honking pfmemalloc OOM warning
Date: Thu, 11 Apr 2019 09:51:21 +0300	[thread overview]
Message-ID: <CAA1_w3_zGTXQd2dyr1EH51_avHXr5KresgM44B9bASF2CgTAcQ@mail.gmail.com> (raw)
In-Reply-To: <20190410.121125.839541085072412175.davem@davemloft.net>

On Wed, Apr 10, 2019 at 10:11 PM David Miller <davem@davemloft.net> wrote:
> > SNMP counters are per netns, and more useful in the modern computing
> > era,  where a host is shared by many different containers.
>
> +1  There is no way I am applying this patch.
>
> The kernel should not "big honking" anything in the logs.

Just to check, is the opposition to the patch related to the
expectation that it will log the condition too often despite the rate
limit, if many packets are dropped? Because if it is, that might be
possible to fix.

I think it might be possible to check the SNMP counter value, and if
zero, log the first instance of pfmemalloc drop, and then omit logging
afterwards. There could be race conditions, so in the absolute worst
case, you could have let's say 2 or 3 of these log lines instead of 1,
but I don't see that as an issue, because 99% of the time there would
be just one, and 2 or 3 lines won't fill the logs.

In our case, the existence of such a log message and the helpful
suggestion to bump up vm.min_free_kbytes would have saved us
approximately one month of debugging (or 2-3 weeks if the SNMP counter
was there in this kernel version). Even one such log message would be
enough. Our production systems were hanging daily during this
debugging happening.

In my opinion, the ideal count of pfmemalloc drops is exactly 0, and
the interesting event is the first instance of pfmemalloc drop
occurring.

If there's a bug in the kernel, I think the user should be notified,
so I see this as similar to some WARN_ON line -- which is even more
"big honking" log event because it's associated with a backtrace.

BR, Juha-Matti

      reply	other threads:[~2019-04-11  6:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-10 10:19 [PATCH] net: add big honking pfmemalloc OOM warning Juha-Matti Tilli
2019-04-10 14:16 ` Eric Dumazet
2019-04-10 15:01   ` Juha-Matti Tilli
2019-04-10 15:36     ` Eric Dumazet
2019-04-11  6:26       ` Juha-Matti Tilli
2019-04-11 10:26         ` Eric Dumazet
2019-04-10 19:11   ` David Miller
2019-04-11  6:51     ` Juha-Matti Tilli [this message]

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=CAA1_w3_zGTXQd2dyr1EH51_avHXr5KresgM44B9bASF2CgTAcQ@mail.gmail.com \
    --to=juha-matti.tilli@foreca.com \
    --cc=aquini@redhat.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=jiyin@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=xzhou@redhat.com \
    --cc=yoyang@redhat.com \
    /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).