From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755863AbbFROow (ORCPT ); Thu, 18 Jun 2015 10:44:52 -0400 Received: from mail-pa0-f47.google.com ([209.85.220.47]:34896 "EHLO mail-pa0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755775AbbFROo1 (ORCPT ); Thu, 18 Jun 2015 10:44:27 -0400 Date: Thu, 18 Jun 2015 23:43:43 +0900 From: Sergey Senozhatsky To: Minchan Kim Cc: Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Sergey Senozhatsky , Sergey Senozhatsky Subject: Re: [RFC][PATCHv3 2/7] zsmalloc: partial page ordering within a fullness_list Message-ID: <20150618144343.GA12441@swordfish> References: <1434628004-11144-1-git-send-email-sergey.senozhatsky@gmail.com> <1434628004-11144-3-git-send-email-sergey.senozhatsky@gmail.com> <20150618121314.GA518@swordfish> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150618121314.GA518@swordfish> User-Agent: Mutt/1.5.23+89 (0255b37be491) (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On (06/18/15 21:13), Sergey Senozhatsky wrote: > @@ -645,10 +645,11 @@ static void insert_zspage(struct page *page, struct size_class *class, > * We want to see more ZS_FULL pages and less almost > * empty/full. Put pages with higher ->inuse first. > */ > - if (page->inuse < (*head)->inuse) > - list_add_tail(&page->lru, &(*head)->lru); > - else > + if (fullness == ZS_ALMOST_FULL || > + (page->inuse >= (*head)->inuse)) > list_add(&page->lru, &(*head)->lru); > + else > + list_add_tail(&page->lru, &(*head)->lru); > } > > *head = page; oh, dear. what I was thinking of. this is just stupid. please ignore this part. -ss