Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp3725014rwr; Sun, 7 May 2023 18:46:45 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5XVkkBoQUwdyqiB8M+VyXVTBsy1w4I+tHo5Tl/KEa4e2vGQTEq48SXegp0F2XTmZyYsI5t X-Received: by 2002:a05:6a20:9144:b0:100:3edd:6110 with SMTP id x4-20020a056a20914400b001003edd6110mr3406644pzc.34.1683510404895; Sun, 07 May 2023 18:46:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683510404; cv=none; d=google.com; s=arc-20160816; b=uMa6DERt9kZYmeTFhRyUfKeMz5pZjXV4hv7eGYHEptKxmbuNk3VrXtKGyjJ8MgQ8Y4 iAc+w8pAvF1HAnAPAIZ/+VjMX5CzkFD+YGyEeCs3sPTCahfZtNO0hA0H2yrfu7rYBpvH t5+wuHCSM/j0nekEjtparvQhJskRBj3+t4djsEv1JLD53irYvkzmPPVxyuMykjpu3Lou 3hKM2a2ylcggC0sASoXNzeyruOYqM8cnyuUwZX1wksHfXZhCm4+qtd3MdGXriFChUgQa d4rEeQwPRO86ZOF+zYiYZ6HuHsaMX9Me/qjn23BWtFAisrfXkV85Tb4NbBRfkJby8LoR ACbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject; bh=DbfrnBYHPZ2F9ySCCQHz7Y4fpvof5HlRtEPZCpA34m4=; b=Nb5qEu3VYV9oYKLuk6zcqiKyx2l4ez9XVd3Az+2vImeHu1Jo7jAghBd9BJ3tteyzIR 9wTMKIszVrIr10pQpi29gnkbCe/sOX9l/JBiEde8Reoxl17AvcoGP5Q7molNLP+OhdQF TYSbu9UQZtOQcWjPfcDgJUaxjf1GDy052MF9YSrcxNDka5E100GkQLmjXOoa6MYsQBmi kUJA1/qW9NQpPddRByv6RtalhbCp2+7tXoXJDZ+R8h5Cn0iL7VI09LoTss2QpAmOOYDV lN78656A3qoOmrxucDJkcyawD8Y0lrpiVIbANU6Ipc6PGLYBOBXyJe//pQaLb133Tq0u SWSA== 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; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b19-20020a639313000000b0052cc25bd286si4206664pge.756.2023.05.07.18.46.32; Sun, 07 May 2023 18:46:44 -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; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232470AbjEHBh2 (ORCPT + 99 others); Sun, 7 May 2023 21:37:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46166 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229960AbjEHBh1 (ORCPT ); Sun, 7 May 2023 21:37:27 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BE69F46A8 for ; Sun, 7 May 2023 18:37:25 -0700 (PDT) Received: from dggpemm500009.china.huawei.com (unknown [172.30.72.55]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4QF3h13jszzTkD6; Mon, 8 May 2023 09:32:49 +0800 (CST) Received: from [10.174.179.24] (10.174.179.24) by dggpemm500009.china.huawei.com (7.185.36.225) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Mon, 8 May 2023 09:37:23 +0800 Subject: Re: [PATCH -next v9 0/3] Delay the initialization of zswap To: Chris Li References: <20230411093632.822290-1-liushixin2@huawei.com> <9b2b6dac-9a3d-efcb-9706-44f6df1fe2bf@huawei.com> CC: Seth Jennings , Dan Streetman , Vitaly Wool , Andrew Morton , Nathan Chancellor , Christoph Hellwig , , From: Liu Shixin Message-ID: <6ed055cb-e705-3993-6285-3a30bba15c0d@huawei.com> Date: Mon, 8 May 2023 09:37:23 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.174.179.24] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To dggpemm500009.china.huawei.com (7.185.36.225) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,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 2023/5/4 22:53, Chris Li wrote: > On Thu, May 04, 2023 at 03:11:05PM +0800, Liu Shixin wrote: >>> If it is the zswap_pool alone, it means that we can have a smaller patch >>> to get most of your 18M back. >> You're right, the most came from zswap_pool. > Thanks for the confirmation. > >>> I also notice you move a lot of __init function back to normal functions. >>> That would mean those functions wouldn't be able to drop after the >>> initialization phase. That is another reason to move less of the initialization >>> function. >> Thanks for your advice. I've thought about it before, but I thought there is less impact >> for the size of kernel, so I didn't do it. > Let's first agree on the hypothetical patch that only delaying zswap_pool would > have the benefit over V9 on: > - smaller patch, less invasive. > - less kernel text area due to more __init function got free after initialization. > > If we can reach that agreement, then we can discuss how we can get there. > > I think there is a possibility that the delay initialization of zswap_pool > can fall into the "zswap_has_pool = false" case, so you don't need to have > the initialization mutex. Simpler. > > I have my selfish reason as well. I have a much larger pending patch against > the zswap code so the smaller patch would mean less conflict for me. > > I am guilty of giving this feedback late. If you come up with a V10, I will be glad > to review it. Or, if you prefer, I can come up with the smaller patch for you > to review as well. What do you say? You can add a pre-patch to modify it before your patch. Thanks. > > Chris > > . >