From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754812AbcBZRCi (ORCPT ); Fri, 26 Feb 2016 12:02:38 -0500 Received: from mail-ob0-f176.google.com ([209.85.214.176]:34566 "EHLO mail-ob0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754367AbcBZRCh (ORCPT ); Fri, 26 Feb 2016 12:02:37 -0500 MIME-Version: 1.0 In-Reply-To: References: <1456466484-3442-1-git-send-email-iamjoonsoo.kim@lge.com> <1456466484-3442-13-git-send-email-iamjoonsoo.kim@lge.com> Date: Sat, 27 Feb 2016 02:02:36 +0900 Message-ID: Subject: Re: [PATCH v2 12/17] mm/slab: do not change cache size if debug pagealloc isn't possible From: Joonsoo Kim To: Christoph Lameter Cc: Andrew Morton , Pekka Enberg , David Rientjes , Jesper Dangaard Brouer , Vlastimil Babka , Linux Memory Management List , LKML , Joonsoo Kim Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2016-02-27 1:13 GMT+09:00 Christoph Lameter : > On Fri, 26 Feb 2016, js1304@gmail.com wrote: > >> We can fail to setup off slab in some conditions. Even in this case, >> debug pagealloc increases cache size to PAGE_SIZE in advance and it is >> waste because debug pagealloc cannot work for it when it isn't the off >> slab. To improve this situation, this patch checks first that this cache >> with increased size is suitable for off slab. It actually increases cache >> size when it is suitable for off-slab, so possible waste is removed. > > Maybe add some explanations to the code? You tried to simplify it earlier > and make it understandable. This makes it difficult to understand it. There is some explanation above the changed stuff although it doesn't appear in the patch. And, this patch doesn't change any condition for it. What this patch does is checking if it is suitable for off slab cache in advance. Before this patch, it is checked after increasing size and if it isn't suitable for off slab cache, it cannot be used for debug_pagealloc with increased size. Thanks.