Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752334AbdGCCQ6 (ORCPT ); Sun, 2 Jul 2017 22:16:58 -0400 Received: from LGEAMRELO13.lge.com ([156.147.23.53]:42936 "EHLO lgeamrelo13.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751984AbdGCCQ4 (ORCPT ); Sun, 2 Jul 2017 22:16:56 -0400 X-Original-SENDERIP: 156.147.1.127 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:16:54 +0900 From: Minchan Kim To: Jerome Marchand , Andrew Morton 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: <20170703021654.GC2567@bbox> References: <20170630012436.GA24520@bbox> <20170630114859.1979-1-jmarchan@redhat.com> <20170703021312.GB2567@bbox> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170703021312.GB2567@bbox> 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: 987 Lines: 24 Forgot to add Andrew. On Mon, Jul 03, 2017 at 11:13:12AM +0900, Minchan Kim wrote: > 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. > > -- > To unsubscribe, send a message with 'unsubscribe linux-mm' in > the body to majordomo@kvack.org. For more info on Linux MM, > see: http://www.linux-mm.org/ . > Don't email: email@kvack.org