Received: by 10.213.65.68 with SMTP id h4csp2325906imn; Thu, 5 Apr 2018 12:58:50 -0700 (PDT) X-Google-Smtp-Source: AIpwx48QzIQRHqwEJA06y7gexS3XmKuzu18jRktmudttGOg78o5tk2bys1R11thCtD0M3YGG3/zT X-Received: by 10.98.89.89 with SMTP id n86mr16512156pfb.158.1522958330833; Thu, 05 Apr 2018 12:58:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522958330; cv=none; d=google.com; s=arc-20160816; b=tmR1+HiTFVUurXFGoNwA0Rx9I+M3M7gNNo0YB9F6k4dUd5dl3w1P1hYlX8m/2o9ZKu qbQHpmV5QRsxvAXeYO4qbRsCKmw2J1hs9ZmuB+Z1K0xQlfj1gQuOe0hTdSY7t6Q3n4Hb Tb1U1PgYJNaNo0ntjHSk64iPgx5yM+Thw55c1cp+KjB3tkO6NyyerU/mMk4NswzEmlM7 6z3kBA1+wz37WqddEMntFj1DMMTIAZ+uLGY0BYKACsqvFM9TumgZq9tTxSvs8SZnx1Uh rG3Gf2h5f2XbgQ8ALheumKnACs+AvWIOluDGqH4qRG9UyqD/zqIYme7HQu95t+MDiJ1H Bpiw== 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 :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=+tzyraOzaunzT0LyXkjl19qxTJH2lb0QTlbD8O9BezM=; b=S2dfiYgsj0arUocaEOgpZt8ZAfJJ2ao7qVxzCCG0lpZFEt6aBsDYd+VhRjN06VGh60 UGKmGDAvHvs+tIjNWH5nabt0IGJzRXQXl46wIOJTBTioyJq7/OL7pDHiNW5osrIIevrD 0YtB4FXP9eZmu7cntOZHVyi0JWIdLzAN8iQsFsn8308TS55cNIWtDlt+maicYxFOldi0 O1P5LzFQceqi7cmYLkmvu+DNRNAdxOHvjnQT7GtUPmPnlmXMNDKJT0XnnRJ7dc3qaybm 8hyWJo4wV/HTskqEEFKo6o+Ix56p9IuXhcYPJ/XUl98Vs+IYdoavBfCnyAla1te2NJlL 2pRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=Fc6QOCyB; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s13-v6si6113351plq.426.2018.04.05.12.58.36; Thu, 05 Apr 2018 12:58:50 -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=@google.com header.s=20161025 header.b=Fc6QOCyB; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752918AbeDET5b (ORCPT + 99 others); Thu, 5 Apr 2018 15:57:31 -0400 Received: from mail-it0-f49.google.com ([209.85.214.49]:36865 "EHLO mail-it0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752746AbeDET53 (ORCPT ); Thu, 5 Apr 2018 15:57:29 -0400 Received: by mail-it0-f49.google.com with SMTP id 71-v6so5697385ith.2 for ; Thu, 05 Apr 2018 12:57:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=+tzyraOzaunzT0LyXkjl19qxTJH2lb0QTlbD8O9BezM=; b=Fc6QOCyB7PTP/4KKXE43/wFQNAgwpEXpeEg7nZf2zeflEdS8cyGgM3aG2HA6MFCSpj KsWDxrFQtWU85vp5ao6EPVtTsJiul1071vT79phGYznMH4HCelR7txLe4qT32ZP4vD6V axckBPIGZmkLnU7YY6C+FzqXgq1knI7mEMAXhxilXGkINU2y7bvaEsZ2lFDrOHMv7BlO jPjdGe0a/NMnAHnlVUA5CZcoAzLfbu2Vr8NjQlnjTMjxa3wDpAiAMyFFNVta6WFiU+2m Tv0ehi4kkLr/Ve57IBhNaFpgSkxrjezWXxtFGWqtCOoyMlX4D1IJNe7eSjmMx3kOrwgN ZXDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=+tzyraOzaunzT0LyXkjl19qxTJH2lb0QTlbD8O9BezM=; b=WriFLuGpLrM741ONk2q4j484Mtgm6p94lUpAX2BCsztHLqmvpadJNbFYHEEDyqJRbY rTNmNt7r4VlFbygtj1khbmniGbjcogQ6Urw4I62QHBR1XoVXajhuB7dV85/JMhw0nqw7 9cgniXWaMI6wrpuB8eMSgaW7bs0U0GA55vC41lKpvn631G5C/wEyJvwVlL0OLYn1Bs+r 7gzJNMmtoXGmNqp0V7L+sm7LaqrHyEGY9PiIF9AAC39NyETnIgJntrFms6HonPp5Yuci mmnlSfSfcdW73O3eXCNEY1ezNzgRGPOOp470BEWBRIKmZODcDgvAjyaDs9pGo98VQTQB TDqw== X-Gm-Message-State: ALQs6tAWy9cNgrbmhtFwQHMUebJDNybsjG36ldi+6hqESBmPgBVAFOIA VzsOLvOhrHvfnSmvc/GjJxomRIGs2ZgCOYJQ98aVbw== X-Received: by 2002:a24:468e:: with SMTP id j136-v6mr3346607itb.151.1522958248751; Thu, 05 Apr 2018 12:57:28 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.11.158 with HTTP; Thu, 5 Apr 2018 12:57:28 -0700 (PDT) In-Reply-To: <20180405094346.104cf288@gandalf.local.home> References: <20180404115310.6c69e7b9@gandalf.local.home> <20180404120002.6561a5bc@gandalf.local.home> <20180404121326.6eca4fa3@gandalf.local.home> <20180405094346.104cf288@gandalf.local.home> From: Joel Fernandes Date: Thu, 5 Apr 2018 12:57:28 -0700 Message-ID: Subject: Re: [PATCH] ring-buffer: Add set/clear_current_oom_origin() during allocations To: Steven Rostedt Cc: LKML , Michal Hocko , Zhaoyang Huang , Ingo Molnar , kernel-patch-test@lists.linaro.org, Andrew Morton , "open list:MEMORY MANAGEMENT" , Vlastimil Babka 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 Hi Steve, On Thu, Apr 5, 2018 at 6:43 AM, Steven Rostedt wrote: > On Wed, 4 Apr 2018 16:59:18 -0700 > Joel Fernandes wrote: > >> Happy to try anything else, BTW when the si_mem_available check >> enabled, this doesn't happen and the buffer_size_kb write fails >> normally without hurting anything else. > > Can you remove the RETRY_MAYFAIL and see if you can try again? It may > be that we just remove that, and if si_mem_available() is wrong, it > will kill the process :-/ My original code would only add MAYFAIL if it > was a kernel thread (which is why I created the mflags variable). Tried this. Dropping RETRY_MAYFAIL and the si_mem_available check destabilized the system and brought it down (along with OOM killing the victim). System hung for several seconds and then both the memory hog and bash got killed. thanks, - Joel