Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752211AbdGCCNQ (ORCPT ); Sun, 2 Jul 2017 22:13:16 -0400 Received: from LGEAMRELO12.lge.com ([156.147.23.52]:34124 "EHLO lgeamrelo12.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751983AbdGCCNP (ORCPT ); Sun, 2 Jul 2017 22:13:15 -0400 X-Original-SENDERIP: 156.147.1.151 X-Original-MAILFROM: minchan@kernel.org X-Original-SENDERIP: 10.177.220.163 X-Original-MAILFROM: minchan@kernel.org Date: Mon, 3 Jul 2017 11:13:12 +0900 From: Minchan Kim To: Jerome Marchand Cc: Nitin Gupta , Sergey Senozhatsky , Mahendran Ganesh , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] mm/zsmalloc: simplify zs_max_alloc_size handling Message-ID: <20170703021312.GB2567@bbox> References: <20170630012436.GA24520@bbox> <20170630114859.1979-1-jmarchan@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170630114859.1979-1-jmarchan@redhat.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 635 Lines: 15 On Fri, Jun 30, 2017 at 01:48:59PM +0200, Jerome Marchand wrote: > Commit 40f9fb8cffc6 ("mm/zsmalloc: support allocating obj with size of > ZS_MAX_ALLOC_SIZE") fixes a size calculation error that prevented > zsmalloc to allocate an object of the maximal size > (ZS_MAX_ALLOC_SIZE). I think however the fix is unneededly > complicated. > > This patch replaces the dynamic calculation of zs_size_classes at init > time by a compile time calculation that uses the DIV_ROUND_UP() macro > already used in get_size_class_index(). > > Signed-off-by: Jerome Marchand Acked-by: Minchan Kim Thanks.