Received: by 10.213.65.68 with SMTP id h4csp320578imn; Fri, 6 Apr 2018 00:17:45 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+eDxaB1QXXhFOi7J36mICxEyC9PCQAemBitEAdca5BC6wo8/43mBMOKsUzd+ZuwN8fx5hf X-Received: by 10.101.83.136 with SMTP id x8mr16606025pgq.288.1522999065133; Fri, 06 Apr 2018 00:17:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522999065; cv=none; d=google.com; s=arc-20160816; b=T1t3rn5nwPr7I5lxmwrseI4pdlgYgdC2yqdEngFyEfBbxVEqljFxqaofQ598ZBd+B0 CKzGqplYFhuNbKeWF66riPDtPdsJvl8RfrAru/7fZHWIgHyr3beMs7KXE2UaPoePldaf SNn23Hn3XOeKvtkTcWs+lFFjHjSpKtv1uQJln9SlsZ6TA+8g+sPGiCWk/a0R+ARWBAZM INVcRsHthHUD4wuWhFyvPfMnXc/m4+VQDozsTh8E7vbwdDrkkEtgq91/AmoR5I/C5heS EPYVWvd23ENH54dA63wl4zYhUz6eVRs/2qjFROQfw13oXfXgSClzHvt7Qphz3tona7Oy JoJw== 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=DEuK3RjCHrxj7R6BhgH0paEULefPPZIZ436RWXOfCkA=; b=xk0D9oI5j3dOHHOMEHlx4F0KOYCorMndWfzBRCDWUdUUkA9u2wFakYeTi6OBGGeFX0 Rjhb6/bNkKPsp/vAYNyz11EzBg2AC+jks4RGk8lim/DqQJELcXsQ51dDLVsZsjc8/ZL8 0dVHcm6Q8SibWy6GBilS7xvQ0O1+NMpTkc9iMbgbZA1pzyClhs1/qP12RM3a7aJiSFpM nZsM+rSqa70YRumBLeUfenExJC8FGJLTfGMOztm8adYR6Tt90ZX5IZrGkfyc4/AN1Q+8 mpUA0u/PjFwMJKTq7bX6y5vQQjdLDVn8NT9uKNPZUHSTHNacyx2Fzutz1CuDkDtrjGZU j8YA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=dz1aBt+L; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m39-v6si10145580plg.151.2018.04.06.00.17.31; Fri, 06 Apr 2018 00:17:45 -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=@gmail.com header.s=20161025 header.b=dz1aBt+L; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751598AbeDFHQG (ORCPT + 99 others); Fri, 6 Apr 2018 03:16:06 -0400 Received: from mail-wm0-f54.google.com ([74.125.82.54]:38649 "EHLO mail-wm0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751027AbeDFHQE (ORCPT ); Fri, 6 Apr 2018 03:16:04 -0400 Received: by mail-wm0-f54.google.com with SMTP id i3so1008210wmf.3 for ; Fri, 06 Apr 2018 00:16:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=DEuK3RjCHrxj7R6BhgH0paEULefPPZIZ436RWXOfCkA=; b=dz1aBt+LYYTY3GWLufLxejV6VW4TFM0QJbwVvEUJ2eyThKsX1y6vRpNvoqtd0W53dV 7VDjU4c8WCNbnG/TxfTFXDdoPrqU7DDgsUN7PX8AID5obZpC6351hqtf2mMYUD/NYraB FNio0BLxA6CNHZpeOrorJ3+dK6EcVbwh51QS4EWqAjb8EQ8NtqquskV9eMyeFKtyY5Mq 2cOkXTQyl/1MuVUjTBrlOJ4duWljaJ3ebtPfdbDqv6q0NM4xXSP1yhyjW7FD1LAuYlpk B9Q9Fxz481XwIQmhom6SzwYTzsNrn8+9YOySLnoKTAvpWav+A7tCItbnsb5jMAZnZUpP BwyQ== 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=DEuK3RjCHrxj7R6BhgH0paEULefPPZIZ436RWXOfCkA=; b=GDGarIAqHG3bXSgMkplRmgWnPr7DK48P3KyU8J5G/1GsAXsrxLF5ZbETmfyxwSAxpe JHBeZf+jjR8chlENJv4+n8wDe3vA+5I20sT7WG1LGMiw9WHgoHeBEgpRTbI/RiD4KBsb dcmunqRmg2fmD96/LOE7FFYeP0oFfwpQLOZl8wyISqnczoK9oEY4IHW6lure0JNoxUyt C2nzAOxLurSFaB4ZAQ/lH8JMzN7VcjwdkxM5pCDfaI+5KN8w7AIEuz0h7zFkLKkZR7wn PEwBkl996YzE9Zr9Mz91YM1NiW5SR4bGRhbnvamsngW+5lNarsF4ZrVGhMH3zCARVO/l XV/Q== X-Gm-Message-State: ALQs6tB6INVnASsQnDAmvc0W6nIjguYMNzvLS3ObGsLi0RGTyterCi9P uhBIu/1koiAynf4NP+BqNqsGDaNcIql4S4+iKCY= X-Received: by 10.80.168.69 with SMTP id j63mr5679475edc.301.1522998963517; Fri, 06 Apr 2018 00:16:03 -0700 (PDT) MIME-Version: 1.0 Received: by 10.80.201.76 with HTTP; Fri, 6 Apr 2018 00:16:03 -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: Zhaoyang Huang Date: Fri, 6 Apr 2018 15:16:03 +0800 Message-ID: Subject: Re: [PATCH] ring-buffer: Add set/clear_current_oom_origin() during allocations To: Joel Fernandes Cc: Steven Rostedt , LKML , Michal Hocko , 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 On Fri, Apr 6, 2018 at 7:36 AM, Joel Fernandes wrote: > 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 I also test the patch on my system, which works fine for the previous script. PS: The script I mentioned is the cts test case POC 16_12 on android8.1