From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754789AbdC3EMl (ORCPT ); Thu, 30 Mar 2017 00:12:41 -0400 Received: from mail-pg0-f49.google.com ([74.125.83.49]:33003 "EHLO mail-pg0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754589AbdC3EMj (ORCPT ); Thu, 30 Mar 2017 00:12:39 -0400 Date: Thu, 30 Mar 2017 13:12:38 +0900 From: Sergey Senozhatsky To: Minchan Kim Cc: Andrew Morton , Sergey Senozhatsky , kernel-team@lge.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH] zram: factor out partial IO routine Message-ID: <20170330041238.GB513@jagdpanzerIV.localdomain> References: <1490773683-10701-1-git-send-email-minchan@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1490773683-10701-1-git-send-email-minchan@kernel.org> User-Agent: Mutt/1.8.0 (2017-02-23) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On (03/29/17 16:48), Minchan Kim wrote: > For architecture(PAGE_SIZE > 4K), zram have supported partial IO. > However, the mixed code for handling normal/partial IO is too mess, > error-prone to modify IO handler functions with upcoming feature > so this patch aims for cleaning up via factoring out partial IO > routines to zram_bvec_partial_[read|write] which will be disabled > for most 4K page architecures. > > x86(4K architecure) > add/remove: 0/1 grow/shrink: 0/1 up/down: 0/-664 (-664) > function old new delta > zram_bvec_rw 2301 2039 -262 > zram_decompress_page.isra 402 - -402 > > So, we will save 662 bytes. > > However, as side effect, it will increase binary size in > non-4K architecure but it's not major for zram so I believe > benefit(maintainance, binary size for most architecture) is bigger. a bigger side effect is that now we double the amount of lines we need to change in certain patches and, thus, the amount of work - when we add new functionality/fix something in zram_bvec_{write, read} we also would need to touch zram_bvec_partial_{write, read}. still probably worth it. Reviewed-by: Sergey Senozhatsky -ss