From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754007AbdCBHDW (ORCPT ); Thu, 2 Mar 2017 02:03:22 -0500 Received: from LGEAMRELO11.lge.com ([156.147.23.51]:46250 "EHLO lgeamrelo11.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751153AbdCBHDU (ORCPT ); Thu, 2 Mar 2017 02:03:20 -0500 X-Original-SENDERIP: 156.147.1.126 X-Original-MAILFROM: minchan@kernel.org X-Original-SENDERIP: 10.177.223.161 X-Original-MAILFROM: minchan@kernel.org Date: Thu, 2 Mar 2017 16:02:47 +0900 From: Minchan Kim To: Sangwoo Cc: ngupta@vflare.org, sergey.senozhatsky.work@gmail.com, linux-kernel@vger.kernel.org, Andrew Morton Subject: Re: [PATCH] zram: reduce load operation in page_same_filled Message-ID: <20170302070247.GA32617@bbox> References: <1488428104-7257-1-git-send-email-sangwoo2.park@lge.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1488428104-7257-1-git-send-email-sangwoo2.park@lge.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Sangwoo, On Thu, Mar 02, 2017 at 01:15:04PM +0900, Sangwoo wrote: > In page_same_filled function, all elements in the page is compared > with next index value. The current comparison routine compares > the (i)th and (i+1)th values of the page. > In this case, two load operaions occur for each comparison. > But if we store first value of the page stores at 'val' variable > and using it to compare with others, the load opearation is reduced. > It reduce load operation per page by up to 64times. > > Signed-off-by: Sangwoo The rule is that you should use your full name Sangwoo Park for SOB. :) Anyway, Good spot! FYI, Ccing Andrew because he merges zram patches to mmotm tree. Acked-by: Minchan Kim Thanks.