Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752242AbdI0WME (ORCPT ); Wed, 27 Sep 2017 18:12:04 -0400 Received: from out0-199.mail.aliyun.com ([140.205.0.199]:47497 "EHLO out0-199.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751355AbdI0WMC (ORCPT ); Wed, 27 Sep 2017 18:12:02 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R161e4;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e02c03296;MF=yang.s@alibaba-inc.com;NM=1;PH=DS;RN=8;SR=0;TI=SMTPD_---.9.7G06Z_1506550307; Subject: Re: [PATCH 2/3] mm: oom: show unreclaimable slab info when kernel panic To: Christopher Lameter Cc: Pekka Enberg , David Rientjes , Joonsoo Kim , akpm@linux-foundation.org, mhocko@kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <1506473616-88120-1-git-send-email-yang.s@alibaba-inc.com> <1506473616-88120-3-git-send-email-yang.s@alibaba-inc.com> From: "Yang Shi" Message-ID: Date: Thu, 28 Sep 2017 06:11:46 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 803 Lines: 24 On 9/27/17 2:59 PM, Christopher Lameter wrote: > On Thu, 28 Sep 2017, Yang Shi wrote: >>> 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? >> >> Because we want to dump the unreclaimable slab info in oom info. > > CONFIG_SLABINFO and /proc/slabinfo have nothing to do with the > unreclaimable slab info. The current design uses "struct slabinfo" and get_slabinfo() to retrieve some info, i.e. active objs, etc. They are protected by CONFIG_SLABINFO. We could replicate the logic in get_slabinfo without using struct slabinfo, but it sounds not that necessary and CONFIG_SLABINFO is typically enabled by default and it is not shown in menuconfig. Thanks, Yang >