From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751814AbbFDDui (ORCPT ); Wed, 3 Jun 2015 23:50:38 -0400 Received: from mail-pa0-f50.google.com ([209.85.220.50]:33614 "EHLO mail-pa0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751043AbbFDDuc (ORCPT ); Wed, 3 Jun 2015 23:50:32 -0400 Date: Thu, 4 Jun 2015 12:50:25 +0900 From: Minchan Kim To: Sergey Senozhatsky Cc: Sergey Senozhatsky , Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [RFC][PATCH 03/10] zsmalloc: introduce zs_can_compact() function Message-ID: <20150604035025.GH2241@blaptop> References: <1432911928-14654-1-git-send-email-sergey.senozhatsky@gmail.com> <1432911928-14654-4-git-send-email-sergey.senozhatsky@gmail.com> <20150604025533.GE2241@blaptop> <20150604031514.GE1951@swordfish> <20150604033014.GG2241@blaptop> <20150604034230.GH1951@swordfish> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150604034230.GH1951@swordfish> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 04, 2015 at 12:42:30PM +0900, Sergey Senozhatsky wrote: > On (06/04/15 12:30), Minchan Kim wrote: > > > -- free objects in class: 5 (free-objs class capacity) > > > -- page1: inuse 2 > > > -- page2: inuse 2 > > > -- page3: inuse 3 > > > -- page4: inuse 2 > > > > What scenario do you have a cocern? > > Could you describe this example more clear? > > you mean "how is this even possible"? No I meant. I couldn't understand your terms. Sorry. What free-objs class capacity is? page1 is zspage? Let's use consistent terms between us. For example, maxobj-per-zspage is 4. A is allocated and used. X is allocated but not used. so we can draw a zspage below. AAXX So we can draw several zspages linked list as below AAXX - AXXX - AAAX Could you describe your problem again? Sorry. > > well, for example, > > make -jX > make clean > > can introduce a significant fragmentation. no new objects, just random > objs removal. assuming that we keep some of the objects, allocated during > compilation. > > e.g. > > ... > > page1 > allocate baz.so > allocate foo.o > page2 > allocate bar.o > allocate foo.so > ... > pageN > > > > now `make clean` > > page1: > allocated baz.so > empty > > page2 > empty > allocated foo.so > > ... > > pageN > > in the worst case, every page can turn out to be ALMOST_EMPTY. > > -ss -- Kind regards, Minchan Kim