Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754099Ab2KGQkk (ORCPT ); Wed, 7 Nov 2012 11:40:40 -0500 Received: from mail-qc0-f174.google.com ([209.85.216.174]:33458 "EHLO mail-qc0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753665Ab2KGQkR (ORCPT ); Wed, 7 Nov 2012 11:40:17 -0500 MIME-Version: 1.0 In-Reply-To: References: <1351840367-4152-1-git-send-email-minchan@kernel.org> <20121106153213.03e9cc9f.akpm@linux-foundation.org> Date: Wed, 7 Nov 2012 08:40:16 -0800 Message-ID: Subject: Re: [PATCH v4 0/3] zram/zsmalloc promotion From: Luigi Semenzato To: Minchan Kim Cc: Andrew Morton , Greg KH , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Dan Magenheimer , Nitin Gupta , Seth Jennings , Konrad Rzeszutek Wilk , Jens Axboe , Pekka Enberg , gaowanlong@cn.fujitsu.com Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2696 Lines: 61 Since Chrome OS was mentioned: the main reason why we don't use swap to a disk (rotating or SSD) is because it doesn't degrade gracefully and leads to a bad interactive experience. Generally we prefer to manage RAM at a higher level, by transparently killing and restarting processes. But we noticed that zram is fast enough to be competitive with the latter, and it lets us make more efficient use of the available RAM. As Minchan said, the zram module in itself appears to work fine. We are hitting other mm issues (one of which was recently fixed) which most likely are exposed by the different patterns of memory allocation when using zram. On Wed, Nov 7, 2012 at 2:38 AM, Minchan Kim wrote: > Hi Andrew, > > On Wed, Nov 7, 2012 at 8:32 AM, Andrew Morton > wrote: >> On Fri, 2 Nov 2012 16:12:44 +0900 >> Minchan Kim wrote: >> >>> This patchset promotes zram/zsmalloc from staging. >> >> The changelogs are distressingly short of *reasons* for doing this! >> >>> Both are very clean and zram have been used by many embedded product >>> for a long time. >> >> Well that's interesting. >> >> Which embedded products? How are they using zram and what benefit are >> they observing from it, in what scenarios? >> > > At least, major TV companys have used zram as swap since two years ago and > recently our production team released android smart phone with zram which is > used as swap, too. > And there is trial to use zram as swap in ChromeOS project, too. (Although > they report some problem recently, it was not a problem of zram). > When you google zram, you can find various usecase in xda-developers. > > With my experience, the benefit in real practice was to remove jitter of > video application. It would be effect of efficient memory usage by > compression but more issue is whether swap is there or not in the system. As > you know, recent mobile platform have used JAVA so there are lots of > anonymous pages. But embedded system normally doesn't use eMMC or SDCard as > swap because there is wear-leveling issue and latency so we can't reclaim > anymous pages. It sometime ends up making system very slow when it requires > to get contiguous memory and even many file-backed pages are evicted. It's > never what embedded people want it. Zram is one of best solution for that. > > It's very hard to type with mobile phone. :( > > -- > Kind regards, > Minchan Kim -- 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/