Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757953AbcCUXu4 (ORCPT ); Mon, 21 Mar 2016 19:50:56 -0400 Received: from LGEAMRELO12.lge.com ([156.147.23.52]:45465 "EHLO lgeamrelo12.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751163AbcCUXuz (ORCPT ); Mon, 21 Mar 2016 19:50:55 -0400 X-Original-SENDERIP: 156.147.1.121 X-Original-MAILFROM: minchan@kernel.org X-Original-SENDERIP: 165.244.98.204 X-Original-MAILFROM: minchan@kernel.org X-Original-SENDERIP: 10.177.223.161 X-Original-MAILFROM: minchan@kernel.org Date: Tue, 22 Mar 2016 08:52:09 +0900 From: Minchan Kim To: Andrew Morton CC: linux-kernel@vger.kernel.org, Sergey Senozhatsky , karam.lee@lge.com, sangseok.lee@lge.com, chan.jeong@lge.com Subject: Re: [PATCH] zram: revive swap_slot_free_notify Message-ID: <20160321235209.GA27197@bbox> References: <1458287911-24806-1-git-send-email-minchan@kernel.org> <20160321133017.1e925cc45cdc9153d2623ef8@linux-foundation.org> MIME-Version: 1.0 In-Reply-To: <20160321133017.1e925cc45cdc9153d2623ef8@linux-foundation.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-MIMETrack: Itemize by SMTP Server on LGEKRMHUB07/LGE/LG Group(Release 8.5.3FP6|November 21, 2013) at 2016/03/22 08:50:51, Serialize by Router on LGEKRMHUB07/LGE/LG Group(Release 8.5.3FP6|November 21, 2013) at 2016/03/22 08:50:51, Serialize complete at 2016/03/22 08:50:51 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1247 Lines: 28 Hello Andrew, On Mon, Mar 21, 2016 at 01:30:17PM -0700, Andrew Morton wrote: > On Fri, 18 Mar 2016 16:58:31 +0900 Minchan Kim wrote: > > > "remove compressed copy from zram in-memory" > > applied swap_slot_free_notify call in *end_swap_bio_read* to > > remove duplicated memory between zram and memory. > > > > However, with introducing rw_page in zram <8c7f01025f7b> > > "zram: implement rw_page operation of zram", it became void > > because rw_page doesn't need bio. > > > > This patch restores the function for rw_page. > > This is a bit mysterious. What is the actual runtime effect of the > patch? I assume that 8c7f01025f7b caused duplication of memory and > that the only problem is additional resource consumption? If so, what > are the observable effects? etcetera, please. > As you already pointed out, only problem is memory duplication. In b430e9d1c6d4 description, I wrote down how it saves memory(e.g, about 19M in kernel build workload). Memory footprint is really important in embedded platforms which have small memory, for example, 512M) recently because it could start to kill processes if memory footprint exceeds some threshold by LMK or some similar memory management modules.