Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754134AbeAKHFF (ORCPT + 1 other); Thu, 11 Jan 2018 02:05:05 -0500 Received: from mail-pf0-f177.google.com ([209.85.192.177]:45739 "EHLO mail-pf0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753948AbeAKHFE (ORCPT ); Thu, 11 Jan 2018 02:05:04 -0500 X-Google-Smtp-Source: ACJfBot16uhbq9G9GcBGkCvvEpmPABgaGuk0D4t72J6DfSCM6jjFyx6oWaE5Tf2ke6MwvYox/TY/tg== Date: Thu, 11 Jan 2018 16:04:59 +0900 From: Sergey Senozhatsky To: Yu Zhao Cc: Dan Streetman , Seth Jennings , Sergey Senozhatsky , Minchan Kim , Nitin Gupta , Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3] zswap: only save zswap header when necessary Message-ID: <20180111070459.GH494@jagdpanzerIV> References: <20180110224741.83751-1-yuzhao@google.com> <20180110225626.110330-1-yuzhao@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180110225626.110330-1-yuzhao@google.com> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On (01/10/18 14:56), Yu Zhao wrote: [..] > We waste sizeof(swp_entry_t) for zswap header when using zsmalloc > as zpool driver because zsmalloc doesn't support eviction. > > Add zpool_evictable() to detect if zpool is potentially evictable, > and use it in zswap to avoid waste memory for zswap header. > > Signed-off-by: Yu Zhao looks good to me. FWIW, Reviewed-by: Sergey Senozhatsky -ss