Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754236Ab3IXJUa (ORCPT ); Tue, 24 Sep 2013 05:20:30 -0400 Received: from mailout4.w1.samsung.com ([210.118.77.14]:46547 "EHLO mailout4.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753162Ab3IXJU0 (ORCPT ); Tue, 24 Sep 2013 05:20:26 -0400 X-AuditID: cbfec7f5-b7ef66d00000795a-4b-52415958fab4 Message-id: <1380014422.31179.4.camel@AMDC1943> Subject: Re: [PATCH v2 0/5] mm: migrate zbud pages From: Krzysztof Kozlowski To: Seth Jennings Cc: Bob Liu , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrew Morton , Mel Gorman , Bartlomiej Zolnierkiewicz , Marek Szyprowski , Kyungmin Park , Dave Hansen , Minchan Kim Date: Tue, 24 Sep 2013 11:20:22 +0200 In-reply-to: <20130923220757.GC16191@variantweb.net> References: <1378889944-23192-1-git-send-email-k.kozlowski@samsung.com> <5237FDCC.5010109@oracle.com> <20130923220757.GC16191@variantweb.net> Content-type: text/plain; charset=UTF-8 X-Mailer: Evolution 3.2.3-0ubuntu6 Content-transfer-encoding: 7bit MIME-version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrOLMWRmVeSWpSXmKPExsVy+t/xa7oRkY5BBqdOilrMWb+GzWLjjPWs Fl2nprJYfHr5gNHibNMbdovLu+awWdxb85/VYu2Ru+wWk989Y7RY9vU9u8WhfavYHbg9Fu95 yeSxaVUnm8emT5PYPU7M+M3i8eDQZhaPj09vsXj0bVnF6LH5dLXH501yAZxRXDYpqTmZZalF +nYJXBn7f8xmL5jKX3Hl8VP2BsYGni5GTg4JAROJq60bmCBsMYkL99azdTFycQgJLGWUeL2n D8r5zCjRf/AuWBWvgL7E0nWfmEFsYQEjibu7D7OD2GwCxhKbly9hA7FFgGq6Z69gBmlmFvjD JLH85jewBIuAqkTf9KVgzZxAq8+/fsMEsaGfUWLxl2MsIAlmAXWJSfMWMUPcpCSxu72THSIu L7F5zVtmiCsEJX5MvscygVFgFpKWWUjKZiEpW8DIvIpRNLU0uaA4KT3XSK84Mbe4NC9dLzk/ dxMjJHK+7mBceszqEKMAB6MSD++FBIcgIdbEsuLK3EOMEhzMSiK8N2wdg4R4UxIrq1KL8uOL SnNSiw8xMnFwSjUwXt6eXd17bMvyNMFJHNeN5n26HB+95qtac263lHtd77y97PFedft6ExqV 69t8pkotYX5/6/epQwa7ZA8ZXXz7buaJzGMWhxcdzOl9bW506OdNjsYiGc/FCdPSd/oeFlpz 3ffv9EJeVb6kH5+fbltjc2d5XOCqtZcX/2zxOJyl+6H5yg7uJoGeUCWW4oxEQy3mouJEADuL vzN6AgAA Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2142 Lines: 49 Hi, On pon, 2013-09-23 at 17:07 -0500, Seth Jennings wrote: > On Tue, Sep 17, 2013 at 02:59:24PM +0800, Bob Liu wrote: > > Mel mentioned several problems about zswap/zbud in thread "[PATCH v6 > > 0/5] zram/zsmalloc promotion". > > > > Like "it's clunky as hell and the layering between zswap and zbud is > > twisty" and "I think I brought up its stalling behaviour during review > > when it was being merged. It would have been preferable if writeback > > could be initiated in batches and then waited on at the very least.. > > It's worse that it uses _swap_writepage directly instead of going > > through a writepage ops. It would have been better if zbud pages > > existed on the LRU and written back with an address space ops and > > properly handled asynchonous writeback." > > > > So I think it would be better if we can address those issues at first > > and it would be easier to address these issues before adding more new > > features. Welcome any ideas. > > I just had an idea this afternoon to potentially kill both these birds with one > stone: Replace the rbtree in zswap with an address_space. > > Each swap type would have its own page_tree to organize the compressed objects > by type and offset (radix tree is more suited for this anyway) and a_ops that > could be called by shrink_page_list() (writepage) or the migration code > (migratepage). > > Then zbud pages could be put on the normal LRU list, maybe at the beginning of > the inactive LRU so they would live for another cycle through the list, then be > reclaimed in the normal way with the mapping->a_ops->writepage() pointing to a > zswap_writepage() function that would decompress the pages and call > __swap_writepage() on them. How exactly the address space can be used here? Do you want to point to zbud pages in address_space.page_tree? If yes then which index should be used? Best regards, Krzysztof -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/