From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757192AbcFAC0c (ORCPT ); Tue, 31 May 2016 22:26:32 -0400 Received: from LGEAMRELO12.lge.com ([156.147.23.52]:42779 "EHLO lgeamrelo12.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756857AbcFAC03 (ORCPT ); Tue, 31 May 2016 22:26:29 -0400 X-Original-SENDERIP: 156.147.1.125 X-Original-MAILFROM: minchan@kernel.org X-Original-SENDERIP: 165.244.98.76 X-Original-MAILFROM: minchan@kernel.org X-Original-SENDERIP: 10.177.223.161 X-Original-MAILFROM: minchan@kernel.org Date: Wed, 1 Jun 2016 11:27:09 +0900 From: Minchan Kim To: Sergey Senozhatsky CC: Sergey Senozhatsky , Andrew Morton , Joonsoo Kim , Subject: Re: [PATCH v2 4/8] zram: use crypto api to check alg availability Message-ID: <20160601022708.GL19976@bbox> References: <20160531122017.2878-1-sergey.senozhatsky@gmail.com> <20160531122017.2878-5-sergey.senozhatsky@gmail.com> <20160601000304.GF19976@bbox> <20160601010707.GB461@swordfish> MIME-Version: 1.0 In-Reply-To: <20160601010707.GB461@swordfish> User-Agent: Mutt/1.5.21 (2010-09-15) X-MIMETrack: Itemize by SMTP Server on LGEKRMHUB05/LGE/LG Group(Release 8.5.3FP6|November 21, 2013) at 2016/06/01 11:26:26, Serialize by Router on LGEKRMHUB05/LGE/LG Group(Release 8.5.3FP6|November 21, 2013) at 2016/06/01 11:26:26, Serialize complete at 2016/06/01 11:26:26 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 On Wed, Jun 01, 2016 at 10:07:07AM +0900, Sergey Senozhatsky wrote: > Hello Minchan, > > On (06/01/16 09:03), Minchan Kim wrote: > [..] > > So, if we do 'cat /sys/block/zram0/comp_algorithm", every crypto modules > > in the backend array are loaded in memory and not unloaded until admin > > executes rmmod? Right? > > yes, I think so. It scares me. Common case, except one we choosed, every loaded modules will be not used. I think it's really not good. Although the wastage might be not big now, it will be heavy as crypto comp modules are increased. What do you think about it? > > [..] > > If user load out-of-tree crypto compression module, what's status of > > comp_algorithm? > > > > #> insmod foo_crypto.ko > > #> echo foo > /sys/block/zram0/comp_algorithm > > #> cat /sys/block/zram0/comp_algorithm > > lzo lz4 [foo] > > ? > > yes, "lzo lz4 [out-of-tree-module-name]". Makes sense!