Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1729258ybl; Wed, 28 Aug 2019 20:33:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqy+a4pgjnd1rgoJtQd17jEoYrPPkPTTbi4VcllzSmEGb3R19tHmUT8gre8TIC1KXQ/13p8P X-Received: by 2002:a65:4948:: with SMTP id q8mr6267221pgs.214.1567049582832; Wed, 28 Aug 2019 20:33:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567049582; cv=none; d=google.com; s=arc-20160816; b=nJkDsKRDHKkGXAF8uz7cLZqsqe34GTjvA0mdim7S4ijY7DwJi/yozerksViU9S/qEG FfyyhRDa9ixu6fN+8UWGdwOiC6LyGLUQaO6Bm0wJmQKNQLQgI+YWQfc6eWyiMr5lsyDb JGc+OKjp88jw8hBxsRqXJX1DHMaw6VYp2dsEnsm74F0zuG30u2+gbpbAOO9sdQnKFpG/ dHDYtVSHX/BpmolIPNmZtW3MSXv9zaM8u7toJWNlpZWTOfAeABgwg0UrAjEc6vTSOjex LJelb9Mgc47HghDyZDK+/8v7FqttSFNtOtzFWT70VOH0lSC9GlPeOwtoY6Z7ABitAB1u 5vDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=B23iPa66D7URMvvUFe3gpmMeFfyLo1kqn9vSUt4f+f8=; b=Q2+9ITJMYvE4Kq3CmCDGDvI+k3sZlS+WlJ3pMbe0TAMJSWsa387gGFF92GRP0U4haH uHuua2pxZzM0WOCr7rXv5ROR7gcBgYEj+NA4d4v08a3DhVavVa5+IamVVk4IgFHn8/W1 FU2PDoxywU1wXvzj6Com+zeGafOqj5Ldo+Pt05/qFyHnED8T7U3RjoYjaEPuE464H/dl qrb440THgJqKD4D0D9Kla8xjvROjuSfbq6QXNt1corgmfigAOvHNoGTKJ8gHnIeqwEoj M7uBppnsw5ZQfl7mampk71JV2nFsHyzHmORELB22qANEYMXIGzh5yFd4ffZhxHOfxsyz zmQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@arista.com header.s=googlenew header.b=Ybp1a8Vu; 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; dmarc=pass (p=QUARANTINE sp=REJECT dis=NONE) header.from=arista.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a23si823382pgg.131.2019.08.28.20.32.46; Wed, 28 Aug 2019 20:33:02 -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=@arista.com header.s=googlenew header.b=Ybp1a8Vu; 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; dmarc=pass (p=QUARANTINE sp=REJECT dis=NONE) header.from=arista.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726642AbfH2Db7 (ORCPT + 99 others); Wed, 28 Aug 2019 23:31:59 -0400 Received: from mail-io1-f66.google.com ([209.85.166.66]:44175 "EHLO mail-io1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726081AbfH2Db7 (ORCPT ); Wed, 28 Aug 2019 23:31:59 -0400 Received: by mail-io1-f66.google.com with SMTP id j4so3915823iog.11 for ; Wed, 28 Aug 2019 20:31:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arista.com; s=googlenew; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=B23iPa66D7URMvvUFe3gpmMeFfyLo1kqn9vSUt4f+f8=; b=Ybp1a8VunoVjZCvuid2Eup5bQav1rc25fFWRK06QHz3i33O2S2fVy8uMX6FMwBPJkb yER0061k6laFWEIe1qX5nZCl78zI/ljtjFEjmJ3i5j8cst3pbsxMYimc1VwpcmkhDOrm bX+afp1jR7gO6ZDEsDBafi6ycuZfQyBxQR/MOOQv/mtIRiUH6YNzEiCqC0j2LG8zOOKN CklERWIMTG0pYraGDlZ/2jS9Jqda+G51I/Bv3ftHgrr8ztEJUEENSjc4pWZiQSKcwVf/ 1qTi/7SryB1UVcuQHLi5j8deEHiDKDV03cAZro4zVyEWkV77Lnvj0rPu5PJnDObWw9Ng 6nmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=B23iPa66D7URMvvUFe3gpmMeFfyLo1kqn9vSUt4f+f8=; b=SNJ++ZzfN/ZO2DJqpJbbOSUFNX3MlxtxUzIxW1A1LntiiQ8f2p4Dai2EwN5e+cJb/T KIntKYoI/NPqPNROYsTork+95JhGZsadACcRxz/B2fbHN9Fhe+QnctoHWNO2mnvHEqG2 7iwuj20cbzRm+ERQ8chlfpfXJoka/RBgUriCv9hP6NThTx/KK38at/g4JvBs0E5qd+Og 7LpKekGYcdeapGwE5z+LJj3Ep1v8U03AcmgedwYed9DTHYPZvqnlEjICyL7Yt4S0H0i/ zUVH2QLlD6Rxyb7LQwKD/9bjIhwBY2X051Bme/gxGnZg03B+odTGTX6/0wN0r0aAGiFp iO0A== X-Gm-Message-State: APjAAAXjknnZrFNqeSr88ha99fLzYjvztrnoEj1HtTRMNsz2t1Qw8nsn EmvRZoBuZbUvVT2/pc+xHNxYA4AWQXjnEE+vmSFABg== X-Received: by 2002:a6b:f803:: with SMTP id o3mr8481612ioh.187.1567049518377; Wed, 28 Aug 2019 20:31:58 -0700 (PDT) MIME-Version: 1.0 References: <20190826193638.6638-1-echron@arista.com> <1566909632.5576.14.camel@lca.pw> <79FC3DA1-47F0-4FFC-A92B-9A7EBCE3F15F@lca.pw> <2A1D8FFC-9E9E-4D86-9A0E-28F8263CC508@lca.pw> <20190828070845.GC7386@dhcp22.suse.cz> <2e816b05-7b5b-4bc0-8d38-8415daea920d@i-love.sakura.ne.jp> In-Reply-To: From: Edward Chron Date: Wed, 28 Aug 2019 20:31:46 -0700 Message-ID: Subject: Re: [PATCH 00/10] OOM Debug print selection and additional information To: Tetsuo Handa Cc: Michal Hocko , Qian Cai , Andrew Morton , Roman Gushchin , Johannes Weiner , David Rientjes , Shakeel Butt , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Ivan Delalande Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 28, 2019 at 1:04 PM Edward Chron wrote: > > On Wed, Aug 28, 2019 at 3:12 AM Tetsuo Handa > wrote: > > > > On 2019/08/28 16:08, Michal Hocko wrote: > > > On Tue 27-08-19 19:47:22, Edward Chron wrote: > > >> For production systems installing and updating EBPF scripts may someday > > >> be very common, but I wonder how data center managers feel about it now? > > >> Developers are very excited about it and it is a very powerful tool but can I > > >> get permission to add or replace an existing EBPF on production systems? > > > > > > I am not sure I understand. There must be somebody trusted to take care > > > of systems, right? > > > > > > > Speak of my cases, those who take care of their systems are not developers. > > And they afraid changing code that runs in kernel mode. They unlikely give > > permission to install SystemTap/eBPF scripts. As a result, in many cases, > > the root cause cannot be identified. > > +1. Exactly. The only thing we could think of Tetsuo is if Linux OOM Reporting > uses a an eBPF script then systems have to load them to get any kind of > meaningful report. Frankly, if using eBPF is the route to go than essentially > the whole OOM reporting should go there. We can adjust as we need and > have precedent for wanting to load the script. That's the best we could come > up with. > > > > > Moreover, we are talking about OOM situations, where we can't expect userspace > > processes to work properly. We need to dump information we want, without > > counting on userspace processes, before sending SIGKILL. > > +1. We've tried and as you point out and for best results the kernel > has to provide > the state. > > Again a full system dump would be wonderful, but taking a full dump for > every OOM event on production systems? I am not nearly a good enough salesman > to sell that one. So we need an alternate mechanism. > > If we can't agree on some sort of extensible, configurable approach then put > the standard OOM Report in eBPF and make it mandatory to load it so we can > justify having to do that. Linux should load it automatically. > We'll just make a few changes and additions as needed. > > Sounds like a plan that we could live with. > Would be interested if this works for others as well. One further comment. In talking with my colleagues here who know eBPF much better than I do, it may not be possible to implement something this complicated with eBPF. If that is in the fact the case, then we'd have to try and hook the OOM Reporting code with tracepoints similar to kprobes only we want to do more than add counters we want to change the flow to skip small output entries that aren't worth printing. If this isn't feasible with eBPF, then some derivative or our approach or enhancing the OOM output code directly seem like the best options. Will have to investigate this further.