Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754480AbdDDPKI (ORCPT ); Tue, 4 Apr 2017 11:10:08 -0400 Received: from mail-wm0-f44.google.com ([74.125.82.44]:37000 "EHLO mail-wm0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753079AbdDDPKG (ORCPT ); Tue, 4 Apr 2017 11:10:06 -0400 MIME-Version: 1.0 In-Reply-To: <20170404074028.GD15132@dhcp22.suse.cz> References: <20170404074028.GD15132@dhcp22.suse.cz> From: Doug Anderson Date: Tue, 4 Apr 2017 08:10:03 -0700 X-Google-Sender-Auth: FO0n9ZyrDWSkl8vL6aFtJ6yLUYM Message-ID: Subject: Re: [RFC PATCH] binder: Don't require the binder lock when killed in binder_thread_read() To: Michal Hocko Cc: Greg KH , arve@android.com, riandrews@android.com, Todd Kjos , devel@driverdev.osuosl.org, "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2207 Lines: 62 Hi, On Tue, Apr 4, 2017 at 12:40 AM, Michal Hocko wrote: > On Mon 03-04-17 11:09:32, Doug Anderson wrote: > [...] >> Maybe +Michal Hocko would have some opinions of which OOM Reaper >> patches would be good for picking into linux stable? > > I am lacking context here but please note that the OOM reaper patches > alone are not sufficient to make the OOM handling lockup free. There > were quite some changes in the core OOM killer handling to make this > possible. This has been work throughout the last year and it will be > really non-trivial to backport to stable trees. Yeah, that was the impression I got. > So the primary question is what are you trying to achieve? Ideally it would be nice to bring back patches to make the OOM handling lockup free. However, presuming that's not feasible then at least it would be nice if we could get some minimal set of patches that: - Isn't too scary to backport. - Handles the low hanging fruit. - Is fairly self contained. For Chrome OS we've got devices on a number of different kernels ranging from 3.8 - 4.4. Due to changes in userspace, it appears much more likely that we wedge the OOM killer these days, so my main goal is to avoid this in most cases. Right now for Chrome OS I have patches that look like this: * https://chromium-review.googlesource.com/465186 UPSTREAM: mm: oom_kill: don't ignore oom score on exiting tasks * https://chromium-review.googlesource.com/465187 CHROMIUM: DROP: mm/oom_kill: Don't kill a subthread in our place if we still ... * https://chromium-review.googlesource.com/465188 CHROMIUM: DROP: mm/oom_kill: Double-check before killing a child in our place * https://chromium-review.googlesource.com/465189 CHROMIUM: DROP: mm/oom_kill: Avoid deadlock; allow multiple victims ...and those seem to fit the bill for us, but: 1. It would be nice if other users of linuxstable could benefit. 2. I know the above patches are not as ideal as the work that has happened upstream, so of course I'd prefer to get the upstream solution. 3. I always appreciate being closer to the upstream solution which means we get more people looking at the code and more people testing the code. -Doug