From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933624AbcBACL0 (ORCPT ); Sun, 31 Jan 2016 21:11:26 -0500 Received: from LGEAMRELO13.lge.com ([156.147.23.53]:46405 "EHLO lgeamrelo13.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933314AbcBACLY (ORCPT ); Sun, 31 Jan 2016 21:11:24 -0500 X-Original-SENDERIP: 156.147.1.126 X-Original-MAILFROM: iamjoonsoo.kim@lge.com X-Original-SENDERIP: 10.177.222.138 X-Original-MAILFROM: iamjoonsoo.kim@lge.com Date: Mon, 1 Feb 2016 11:11:42 +0900 From: Joonsoo Kim To: Herbert Xu Cc: "Li, Weigang" , "David S. Miller" , Sergey Senozhatsky , Minchan Kim , Dan Streetman , linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 04/10] crypto/compress: add asynchronous compression support Message-ID: <20160201021141.GA32125@js1304-P5Q-DELUXE> References: <1453796112-14273-1-git-send-email-iamjoonsoo.kim@lge.com> <1453796112-14273-5-git-send-email-iamjoonsoo.kim@lge.com> <20160127074140.GA30335@gondor.apana.org.au> <56A878C9.8050202@intel.com> <20160127080355.GA31330@gondor.apana.org.au> <20160127080926.GA31516@gondor.apana.org.au> <20160128031941.GA14467@js1304-P5Q-DELUXE> <20160129100901.GA17272@gondor.apana.org.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160129100901.GA17272@gondor.apana.org.au> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 29, 2016 at 06:09:01PM +0800, Herbert Xu wrote: > On Thu, Jan 28, 2016 at 12:19:42PM +0900, Joonsoo Kim wrote: > > > > I have tested asynchronous compression APIs in zram and I saw > > regression. Atomic allocation and setting up SG lists are culprit > > for this regression. Moreover, zram optimizes linearisation > > So which is it, atomic allocations or setting up SG lists? There > is nothing in acomp that requires you to do an atomic allocation. Atomic allocation are called for linearisation when needed. Zram's compressed content is usually stored in two physically separate pages so linearisation is needed. See scomp_map(). Setting up SG lists means that to use acomp, sg_init_table(), sg_set_page() are need to be called by zram unlike the case just passing the pointer based buffer. Thanks.