From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754150AbcGEBSM (ORCPT ); Mon, 4 Jul 2016 21:18:12 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:33561 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753876AbcGEBSI (ORCPT ); Mon, 4 Jul 2016 21:18:08 -0400 Date: Tue, 5 Jul 2016 10:18:12 +0900 From: Sergey Senozhatsky To: Ganesh Mahendran Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, akpm@linux-foundation.org, minchan@kernel.org, ngupta@vflare.org, sergey.senozhatsky.work@gmail.com, rostedt@goodmis.org, mingo@redhat.com Subject: Re: [PATCH v2 5/8] mm/zsmalloc: avoid calculate max objects of zspage twice Message-ID: <20160705011812.GC459@swordfish> References: <1467614999-4326-1-git-send-email-opensource.ganesh@gmail.com> <1467614999-4326-5-git-send-email-opensource.ganesh@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1467614999-4326-5-git-send-email-opensource.ganesh@gmail.com> User-Agent: Mutt/1.6.1 (2016-04-27) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On (07/04/16 14:49), Ganesh Mahendran wrote: > Currently, if a class can not be merged, the max objects of zspage > in that class may be calculated twice. > > This patch calculate max objects of zspage at the begin, and pass > the value to can_merge() to decide whether the class can be merged. > > Also this patch remove function get_maxobj_per_zspage(), as there > is no other place to call this funtion. > > Signed-off-by: Ganesh Mahendran Reviewed-by: Sergey Senozhatsky -ss From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f70.google.com (mail-pa0-f70.google.com [209.85.220.70]) by kanga.kvack.org (Postfix) with ESMTP id 197EC6B0005 for ; Mon, 4 Jul 2016 21:18:09 -0400 (EDT) Received: by mail-pa0-f70.google.com with SMTP id ts6so375486994pac.1 for ; Mon, 04 Jul 2016 18:18:09 -0700 (PDT) Received: from mail-pf0-x244.google.com (mail-pf0-x244.google.com. [2607:f8b0:400e:c00::244]) by mx.google.com with ESMTPS id i72si4374867pfi.282.2016.07.04.18.18.08 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 04 Jul 2016 18:18:08 -0700 (PDT) Received: by mail-pf0-x244.google.com with SMTP id i123so17517544pfg.3 for ; Mon, 04 Jul 2016 18:18:08 -0700 (PDT) Date: Tue, 5 Jul 2016 10:18:12 +0900 From: Sergey Senozhatsky Subject: Re: [PATCH v2 5/8] mm/zsmalloc: avoid calculate max objects of zspage twice Message-ID: <20160705011812.GC459@swordfish> References: <1467614999-4326-1-git-send-email-opensource.ganesh@gmail.com> <1467614999-4326-5-git-send-email-opensource.ganesh@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1467614999-4326-5-git-send-email-opensource.ganesh@gmail.com> Sender: owner-linux-mm@kvack.org List-ID: To: Ganesh Mahendran Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, akpm@linux-foundation.org, minchan@kernel.org, ngupta@vflare.org, sergey.senozhatsky.work@gmail.com, rostedt@goodmis.org, mingo@redhat.com On (07/04/16 14:49), Ganesh Mahendran wrote: > Currently, if a class can not be merged, the max objects of zspage > in that class may be calculated twice. > > This patch calculate max objects of zspage at the begin, and pass > the value to can_merge() to decide whether the class can be merged. > > Also this patch remove function get_maxobj_per_zspage(), as there > is no other place to call this funtion. > > Signed-off-by: Ganesh Mahendran Reviewed-by: Sergey Senozhatsky -ss -- 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