From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752983AbbIQNA6 (ORCPT ); Thu, 17 Sep 2015 09:00:58 -0400 Received: from mx2.suse.de ([195.135.220.15]:47532 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752255AbbIQNA5 (ORCPT ); Thu, 17 Sep 2015 09:00:57 -0400 Subject: Re: [PATCH 1/2] zbud: allow PAGE_SIZE allocations To: Vitaly Wool , ddstreet@ieee.org, akpm@linux-foundation.org, minchan@kernel.org, sergey.senozhatsky@gmail.com References: <20150916134857.e4a71f601a1f68cfa16cb361@gmail.com> <20150916135048.fbd50fac5e91244ab9731b82@gmail.com> Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org From: Vlastimil Babka Message-ID: <55FAB985.9060705@suse.cz> Date: Thu, 17 Sep 2015 15:00:53 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.0.1 MIME-Version: 1.0 In-Reply-To: <20150916135048.fbd50fac5e91244ab9731b82@gmail.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/16/2015 01:50 PM, Vitaly Wool wrote: > For zram to be able to use zbud via the common zpool API, > allocations of size PAGE_SIZE should be allowed by zpool. > zbud uses the beginning of an allocated page for its internal > structure but it is not a problem as long as we keep track of > such special pages using a newly introduced page flag. > To be able to keep track of zbud pages in any case, struct page's > lru pointer will be used for zbud page lists instead of the one > that used to be part of the aforementioned internal structure. I don't know how zsmalloc handles uncompressible PAGE_SIZE allocations, but I wouldn't expect it to be any more clever than this? So why duplicate the functionality in zswap and zbud? This could be handled e.g. at the zpool level? Or maybe just in zram, as IIRC in zswap (frontswap) it's valid just to reject a page and it goes to physical swap.