From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759099AbcJYPCA (ORCPT ); Tue, 25 Oct 2016 11:02:00 -0400 Received: from gum.cmpxchg.org ([85.214.110.215]:32778 "EHLO gum.cmpxchg.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752089AbcJYPB5 (ORCPT ); Tue, 25 Oct 2016 11:01:57 -0400 Date: Tue, 25 Oct 2016 11:01:42 -0400 From: Johannes Weiner To: Michal Hocko Cc: Andrew Morton , Vladimir Davydov , Tejun Heo , linux-mm@kvack.org, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-team@fb.com Subject: Re: [PATCH] mm: memcontrol: do not recurse in direct reclaim Message-ID: <20161025150142.GA31081@cmpxchg.org> References: <20161024203005.5547-1-hannes@cmpxchg.org> <20161025090747.GD31137@dhcp22.suse.cz> <20161025141050.GA13019@cmpxchg.org> <20161025144543.GL31137@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161025144543.GL31137@dhcp22.suse.cz> User-Agent: Mutt/1.7.1 (2016-10-04) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 25, 2016 at 04:45:44PM +0200, Michal Hocko wrote: > On Tue 25-10-16 10:10:50, Johannes Weiner wrote: > > Like other direct reclaimers, mark tasks in memcg reclaim PF_MEMALLOC > > to avoid recursing into any other form of direct reclaim. Then let > > recursive charges from PF_MEMALLOC contexts bypass the cgroup limit. > > Should we mark this for stable (up to 4.5) which changed the out-out to > opt-in? Yes, good point. Internally, we're pulling it into our 4.6 tree as well. The commit that fixes the particular bug we encountered in btrfs is a9bb7e620efd ("memcg: only account kmem allocations marked as __GFP_ACCOUNT") in 4.5+, so you could argue that we don't need the backport in kernels with this commit. And I'm not aware of other manifestations of this problem. But the unbounded recursion hole is still there, technically, so we might just want to put it into all stable kernels and be safe. So either Cc: # up to and including 4.5 or, and I'm leaning toward that, simply Cc: