From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964842AbcCNISw (ORCPT ); Mon, 14 Mar 2016 04:18:52 -0400 Received: from mail-pa0-f51.google.com ([209.85.220.51]:36571 "EHLO mail-pa0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751716AbcCNISm (ORCPT ); Mon, 14 Mar 2016 04:18:42 -0400 Date: Mon, 14 Mar 2016 17:20:04 +0900 From: Sergey Senozhatsky To: Sergey Senozhatsky Cc: Minchan Kim , Sergey Senozhatsky , Andrew Morton , Joonsoo Kim , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [RFC][PATCH v3 1/5] mm/zsmalloc: introduce class auto-compaction Message-ID: <20160314082004.GE542@swordfish> References: <1457016363-11339-1-git-send-email-sergey.senozhatsky@gmail.com> <1457016363-11339-2-git-send-email-sergey.senozhatsky@gmail.com> <20160314061759.GC10675@bbox> <20160314074159.GA542@swordfish> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160314074159.GA542@swordfish> 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 On (03/14/16 16:41), Sergey Senozhatsky wrote: [..] > you mean that __zs_compact() instead of just checking per-class > zs_can_compact() should check global pool ratio and bail out if > compaction of class Z has dropped the overall fragmentation ratio > below some watermark? > > my logic was that > -- suppose we have class A with fragmentation ratio 49% and class B > with 8% of wasted pages, so the overall pool fragmentation is > (50 + 10)/ 2 < 30%, while we still have almost 50% fragmented class. "(49 + 8) / 2 < 30%" -ss