From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f200.google.com (mail-pf0-f200.google.com [209.85.192.200]) by kanga.kvack.org (Postfix) with ESMTP id 409CF6B025F for ; Thu, 11 Jan 2018 02:05:05 -0500 (EST) Received: by mail-pf0-f200.google.com with SMTP id v25so1137874pfg.14 for ; Wed, 10 Jan 2018 23:05:05 -0800 (PST) Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id b2sor3985051pga.345.2018.01.10.23.05.04 for (Google Transport Security); Wed, 10 Jan 2018 23:05:04 -0800 (PST) Date: Thu, 11 Jan 2018 16:04:59 +0900 From: Sergey Senozhatsky 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> Sender: owner-linux-mm@kvack.org List-ID: 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 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 -- 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 From mboxrd@z Thu Jan 1 00:00:00 1970 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