Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752120AbdI0HOI (ORCPT ); Wed, 27 Sep 2017 03:14:08 -0400 Received: from resqmta-ch2-01v.sys.comcast.net ([69.252.207.33]:44036 "EHLO resqmta-ch2-01v.sys.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751021AbdI0HOH (ORCPT ); Wed, 27 Sep 2017 03:14:07 -0400 Date: Wed, 27 Sep 2017 02:14:05 -0500 (CDT) From: Christopher Lameter X-X-Sender: cl@nuc-kabylake To: Yang Shi cc: penberg@kernel.org, rientjes@google.com, iamjoonsoo.kim@lge.com, akpm@linux-foundation.org, mhocko@kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/3] mm: oom: show unreclaimable slab info when kernel panic In-Reply-To: <1506473616-88120-3-git-send-email-yang.s@alibaba-inc.com> Message-ID: References: <1506473616-88120-1-git-send-email-yang.s@alibaba-inc.com> <1506473616-88120-3-git-send-email-yang.s@alibaba-inc.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-CMAE-Envelope: MS4wfKuDRp97c/Re6CIbzxU7eEsvkCfFcWWGx+vJxIgSGY6i+NDZJoSb28nr2x62bbz6ZDkqOdn3mzTf2JNyvLCODd723x93GXPEoSHLNV3pT8Qaro5ycMjx MOWbgN2ktDJyLEvQqj6Rmy+Kya5Lm7mUUKw6cxvWysKjxef9Wjxu10SlVpBhsnG/2QQQ+xozxqaHh46cl0iSp5y7zgRVxI5VMUghY90bve7KNewjkv/HjUWc 19PkZTWIzX59Z1D4/JkeE3YjqKp8JE1RhSWg8YCFC5CoonmDqVshs9ds3ngmTcO/rzpmedng9bVAxGXkQWps++TARi6H6sJtIeQi6/Eo40ygKx/BGpsACQNG UuaawAKfid9pajLlKJg8qWa/g5ct70lCVxejICqYt0vZxSImAC0= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 981 Lines: 28 On Wed, 27 Sep 2017, Yang Shi wrote: > Print out unreclaimable slab info (used size and total size) which > actual memory usage is not zero (num_objs * size != 0) when: > - unreclaimable slabs : all user memory > unreclaim_slabs_oom_ratio > - panic_on_oom is set or no killable process Ok. I like this much more than the earlier releases. > diff --git a/mm/slab.h b/mm/slab.h > index 0733628..b0496d1 100644 > --- a/mm/slab.h > +++ b/mm/slab.h > @@ -505,6 +505,14 @@ static inline struct kmem_cache_node *get_node(struct kmem_cache *s, int node) > void memcg_slab_stop(struct seq_file *m, void *p); > int memcg_slab_show(struct seq_file *m, void *p); > > +#ifdef CONFIG_SLABINFO > +void dump_unreclaimable_slab(void); > +#else > +static inline void dump_unreclaimable_slab(void) > +{ > +} > +#endif CONFIG_SLABINFO? How does this relate to the oom info? /proc/slabinfo support is optional. Oom info could be included even if CONFIG_SLABINFO goes away. Remove the #ifdef?