Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp1724177rwe; Sat, 27 Aug 2022 15:31:04 -0700 (PDT) X-Google-Smtp-Source: AA6agR7xwmKvPP4fNJSXgDkuFHl5P0NMNnHCxt07g+zA4xVS97StEzabxZfz/wrhBK7e+rbqbf4n X-Received: by 2002:a05:6402:4411:b0:437:b723:72 with SMTP id y17-20020a056402441100b00437b7230072mr11673203eda.38.1661639464297; Sat, 27 Aug 2022 15:31:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661639464; cv=none; d=google.com; s=arc-20160816; b=HPlnUlqH0Rlr93EQbKH23FUDZvpXcyp2GKkZnqvOW6465Ss6n3UtVn2bmo48cpPGrw YCSt6adryMFRnvdbRGW0/k/wIHI9vCGs3qt+zGtkAVh8/XQZdz6RJ/HOoeLmqrqLt7Sx nH95GmQOQr2bmAgHvLdfNnPQ3Tde3KkCEt8X3EjWsV4M2XcQGicDOvVVaCzytu6mOryF KwGqsptu0gsiN0Q3TpL4iDuslFYh3/QjAeRRfsbNHPmQiv03YAZ+gItuzS0kr4OVLmHQ E1tNv+RhhNlUkPqnLgN/cvLiL0wji0rUEUITuuQWmIJNHcouw7E6Lh9Br5ZUaqp4PFoL Sahw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=Vuh++y0dVWXizgfL+6jqjx/m+ospQ9y7nNdrBAZwWkQ=; b=IZI4t/Bl0m6cODGSegFi1yd3RbS4LdRgu1C/Y12xAc07bCh4k71mDTgx1Es3t5XHqt tdAl3PVaWwBsGT/99yhSoetC6er9gj41r4WW6Zc1bQo+cWfQuQ+lqbMgmPe8kKP5xYuu 3cGbCTMStpSZDqnCe/Hdw1+2Xir+4A2nlHdWmg6z7IxLjTSdmaoYm5wTcMedm9giVmcC ChmX6XyPtnfemycL6d/lvqTTLORbh/mB6xj7lv2I3Mm4PJTYPKfHoWxgYiZef1pmtOqv xb95s09enFyrP7eMYLP20eKMJne8vM4fIarqRm4FuxskSUf+wHoTZ9i7le+j/GpQdHhI cfpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=pTkckR3Q; 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 hd13-20020a170907968d00b0074137f33d10si3571246ejc.365.2022.08.27.15.30.17; Sat, 27 Aug 2022 15:31:04 -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; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=pTkckR3Q; 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 S230193AbiH0WNN (ORCPT + 99 others); Sat, 27 Aug 2022 18:13:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45356 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229745AbiH0WNL (ORCPT ); Sat, 27 Aug 2022 18:13:11 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7D79931ECA for ; Sat, 27 Aug 2022 15:13:10 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 2D11AB807E8 for ; Sat, 27 Aug 2022 22:13:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8451BC433B5; Sat, 27 Aug 2022 22:13:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1661638387; bh=4j9dWv3SalI9XL4QHA6egNN0lDV1LYcP+fce7U59F+g=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=pTkckR3QSqI9EkRpQV/OQuwsYmSdo2Z4DWMItgvPyVBMkFcsWh4PAmeYpAA4I5i89 tMun4/ptY47kdq7YIcsFy2kYQ7u8QCRAQE3P1qNgDznZHGR6edqLLr+94FsUH8pAC/ 6hK0d4lnxyCUAbRCCKJFJ8T7IaEw1lE5NICP8M2Q= Date: Sat, 27 Aug 2022 15:13:06 -0700 From: Andrew Morton To: Liu Shixin Cc: Seth Jennings , Dan Streetman , Vitaly Wool , Nathan Chancellor , "Christoph Hellwig" , , , Kefeng Wang , Konrad Rzeszutek Wilk Subject: Re: [PATCH -next v3 0/5] Delay the initializaton of zswap Message-Id: <20220827151306.879ec27ea7314a543c5f60f6@linux-foundation.org> In-Reply-To: <20220827104600.1813214-1-liushixin2@huawei.com> References: <20220827104600.1813214-1-liushixin2@huawei.com> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 Sat, 27 Aug 2022 18:45:55 +0800 Liu Shixin wrote: > In the initialization of zswap, about 18MB memory will be allocated for > zswap_pool. Since not all users use zswap, the memory may be wasted. Save > the memory for these users by delaying the initialization of zswap to > first enablement. > > v2->v3: Fix frontswap_ops NULL reported by Nathan and add init for online > swap device in backend register. > v1->v2: Change init_zswap to zswap_init suggested by Andrew. Thanks. Konrad, could you please take a look for the frontswap changes?