Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp7248056rwl; Thu, 23 Mar 2023 01:16:06 -0700 (PDT) X-Google-Smtp-Source: AK7set+hjkeqnsWxZUWiNzljpddgDVV8TIUn3cQec7f0aoD2s1CXnQt5zNNWCQ2EHVlIpP8B9RyT X-Received: by 2002:a05:6402:281:b0:4fb:279b:b38 with SMTP id l1-20020a056402028100b004fb279b0b38mr8822620edv.33.1679559366224; Thu, 23 Mar 2023 01:16:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679559366; cv=none; d=google.com; s=arc-20160816; b=yg7SZwM/1H9zcx/7kHhMOXUXGnydiLcIiD5Ho9dQsQwH2zvg9uPsbz1xDIVgQiHZ5K il/6eR5JRNy4HCw83vGFGvEGG2xDEktNBpnhlYN2eMH4cehc7m1Lo3DrgDtemtWDxzKI qUok9qx3cgfCdp9LzMC/U8RRFay8yi7MwLxvPFzSTbfLvvxLQb9XU21d3kwHBcEE9WR+ XSi9a5Qlj/Sh3efp71X1ay038s4Oc27W5ssyOsVE2D5BTkStBVQQp64aSxLKPATeOG56 zbwQjWyIjG6UIIcbb5S5y6vZwWf8LWG3fqOjKtgjkVoZ0zoG/DUkkt4t5af/n6j05dae G10g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=FgDQK3eUlH5Rqds1aM1Qgt3Y1oUND9OP/S1iLslhdxo=; b=etbkT84h8anwQzHI5llNl/xaPFaZVKApCzyR3r2266Gu+f4MEtUqvtAmauQrsOc0tR p7SSHO2WQstHa5a5oFGtCV8euZc94z+USbX8n/xxqKiUmY3KS8AaNYoztWCtagG7UoDZ OQvRLE8vo14bY3BC4wE7qIwt3ZP/La5kZPXHFZUTEOYJg+1xa7vbDoXubz7jGM35UF6W StSedfFQaqinzTftWaOcI9cAj9r0zN0/n3CCEWBP+nMYj1/a+gJT7erQsrZFDLIuNvvi NZ+l7LF+GHEo4JrnBEa5lXhx6Ves4ZCykOAP+4wlvPcksabksmagaj2CY8/9NDnQiVr/ MMrQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j9-20020a170906474900b008de42a0a7a8si17034231ejs.186.2023.03.23.01.15.40; Thu, 23 Mar 2023 01:16:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230492AbjCWH7f (ORCPT + 99 others); Thu, 23 Mar 2023 03:59:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51478 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229752AbjCWH7e (ORCPT ); Thu, 23 Mar 2023 03:59:34 -0400 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8B7AAF974 for ; Thu, 23 Mar 2023 00:59:31 -0700 (PDT) Received: by verein.lst.de (Postfix, from userid 2407) id 5D07068AA6; Thu, 23 Mar 2023 08:59:27 +0100 (CET) Date: Thu, 23 Mar 2023 08:59:27 +0100 From: Christoph Hellwig To: Vitaly Wool Cc: Liu Shixin , Seth Jennings , Dan Streetman , Andrew Morton , Nathan Chancellor , Christoph Hellwig , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH -next v6 2/2] mm/zswap: delay the initializaton of zswap Message-ID: <20230323075927.GB20444@lst.de> References: <20230322102006.780624-1-liushixin2@huawei.com> <20230322102006.780624-3-liushixin2@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) X-Spam-Status: No, score=0.0 required=5.0 tests=SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 22, 2023 at 06:17:12PM +0100, Vitaly Wool wrote: > On Wed, Mar 22, 2023 at 10:30 AM Liu Shixin wrote: > > > > Since some users may not use zswap, the zswap_pool is wasted. Save memory > > by delaying the initialization of zswap until enabled. > > To be honest, I'm not a huge fan of this. Would enabling zswap module > build instead solve your problem? making zswap build modular would be a mess. It is core MM infrastructure and now we'd need to start dealing with adding and removing it at runtime as well as module refcounting.