From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-it0-f72.google.com (mail-it0-f72.google.com [209.85.214.72]) by kanga.kvack.org (Postfix) with ESMTP id B48BB6B0003 for ; Thu, 5 Apr 2018 19:36:40 -0400 (EDT) Received: by mail-it0-f72.google.com with SMTP id 135-v6so2788882iti.0 for ; Thu, 05 Apr 2018 16:36:40 -0700 (PDT) Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id u137-v6sor3536018itc.142.2018.04.05.16.36.38 for (Google Transport Security); Thu, 05 Apr 2018 16:36:38 -0700 (PDT) MIME-Version: 1.0 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 Content-Type: text/plain; charset="UTF-8" Sender: owner-linux-mm@kvack.org List-ID: 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 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