Received: by 10.213.65.68 with SMTP id h4csp10840imn; Thu, 5 Apr 2018 16:37:59 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/x6kpvH1V5lTfJaUOERGMht6v1A9Db0nvrjEaMpt7mXUImqdQRomhKWRQ8Wx3Jw9NA4PDl X-Received: by 2002:a17:902:274a:: with SMTP id j10-v6mr24244650plg.28.1522971479941; Thu, 05 Apr 2018 16:37:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522971479; cv=none; d=google.com; s=arc-20160816; b=YdykpNk9UcuVjZcW4jJJHn10TBlU5orqJc6XCagbVJYh0HCWu7NABjmmVZtPFINkgk B6CVYl7Lo6xL2L3E68MyIrlTtYX4/9XqRRVBTz05eZPKmH1FbJR3N0J0VUvFvAMlVB69 u8XHUALNUQKO7+4gory1T+I0f/3AeyI2IX2/9H01maqJ5pD95yQviBpUpgXXeczPfZ7I PYUoCOgcCL42FcV1KjtTggrUeo5USj5zX1o0dIbcJiaQUhxl7grdi8v66Gr4QwL2/Uwd lvllQPzDS2+IRkCgADXCBpWypOTAswypCE+VJS1B8fkRZmjKDBO6DcSA6Jv5xe95lYwi bstA== 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=UGTcLqepdn9mBGiwwTOsOKjHqT74no5HZm7lC/z8iqM=; b=MOTKaEtvyJoBCxpoT+URe773qnnY+j8ziFfV2SLq7wl3OdcC6ZmXILnKLwosLGZ96Q 47K27hC0oxgzzNAe2A6L6oX5ySSIdE3a/OAn2VF5TxjpRavPYl3B0giyiHT7IXv8Dk+T grXu4E6urvL6eSu79fWdvA/eXzcFbO9TH1Tu6Qa1QDJzs1dgCtjG1Ph0B/PrVmPjyIJF X4tkIt/7EWurUhd0qFbKOIzXUvSCoPV6eFWHTLwz94bSQTC6YlHlnb8eHJ+NI1in3Lxi 1V8ZgsbSQ5Yg+pLJAfmJSh1r/sdoEcDXJZXJX6+nqXmEiZr3ONrGvRN0syYCNt00YIW7 5VMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=ufhv677f; 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 t11si6254742pgf.93.2018.04.05.16.37.45; Thu, 05 Apr 2018 16:37:59 -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=ufhv677f; 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 S1751389AbeDEXgk (ORCPT + 99 others); Thu, 5 Apr 2018 19:36:40 -0400 Received: from mail-it0-f41.google.com ([209.85.214.41]:52582 "EHLO mail-it0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750835AbeDEXgi (ORCPT ); Thu, 5 Apr 2018 19:36:38 -0400 Received: by mail-it0-f41.google.com with SMTP id f6-v6so4676883ita.2 for ; Thu, 05 Apr 2018 16:36:38 -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=UGTcLqepdn9mBGiwwTOsOKjHqT74no5HZm7lC/z8iqM=; b=ufhv677fsHgn87NLYbe2kBXxphQVkNP27OaaLJMPLA6kIWHZ5szzZvbc9ybaiXc0oa htVwoZ2l/mEaOKf5z5pFrC2lvXb2yM2klB3PdSXtqeBLKiuX8T8gVuZsBXS4rmjNt9T4 J3s+gbZWGX/iYbWUKeWiAuGQzJefbf2MsBrLLKTl2WbJfcuyVhyomvlsdRp1ifE6lGSH zdRz4dnr363WsWmUNVFqlTyIGIBGeIHF/kHpLczyzy9Wzmrq9c8u6a8NPyD05iq5fDhp gpG9jYFFnTzcJnH1qTdxFrLSkBVlJixucQ2cu11nQZINlH3Zy2whnD987+kMt/ZnDG7+ 1ZFw== 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=UGTcLqepdn9mBGiwwTOsOKjHqT74no5HZm7lC/z8iqM=; b=eJU8TWZLLZoAcS3GyK6AeNJV/8tFtWO6zcpAVWFzZwXnwkGwtk2RxPj9kLgDA6QC0Y L5qPV7ZqmcmVyT1vY1Kjqm/sECDF9LzMrd5dZiI1fnsgubrHbb/7JHXQ+z5kNHWJMcXQ lOdYCYTC4IZQp7fYJpZEP0zLhDO/GTw/Iz2qy4IhLqHpsQHWmkf1o6FIRYAFBW7k5B7v fRCE08d17eIe6ZVYkaRr80xFKFjrt7BRNQUB8tsz5C8Zpl6In1a2a1C5QOizTC+XTlHD Lr3nGubPhIDJOz4Mf3xqDOHozyUtvqApGD6HpiJDzjfE26wZuc8oH7gIClFFbWFshZa6 AaJA== X-Gm-Message-State: ALQs6tAn6eVt1TdLWM1FFeO/FbnS03QLP4ALXNSG6x9Eb3ZAeVROCZl8 El71riWjEiey8QEpW4PMby3kecPSoYn7Nw4ugTxlvHJm X-Received: by 2002:a24:fd03:: with SMTP id m3-v6mr15862520ith.47.1522971397942; Thu, 05 Apr 2018 16:36:37 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.11.158 with HTTP; Thu, 5 Apr 2018 16:36:37 -0700 (PDT) In-Reply-To: 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 16:36:37 -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 12:57 PM, Joel Fernandes wrote: > 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. I think its still Ok to keep the OOM patch as a safe guard even though its hard to test, and the si_mem_available on its own seem sufficient. What do you think? thanks, - Joel