From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 79959C77B75 for ; Mon, 8 May 2023 01:37:32 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9E89A6B0078; Sun, 7 May 2023 21:37:31 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 998B26B007D; Sun, 7 May 2023 21:37:31 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8876A6B007E; Sun, 7 May 2023 21:37:31 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 793236B0078 for ; Sun, 7 May 2023 21:37:31 -0400 (EDT) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 36F9DA05D7 for ; Mon, 8 May 2023 01:37:31 +0000 (UTC) X-FDA: 80765375502.12.2C36CC5 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by imf15.hostedemail.com (Postfix) with ESMTP id DD626A0007 for ; Mon, 8 May 2023 01:37:27 +0000 (UTC) Authentication-Results: imf15.hostedemail.com; dkim=none; spf=pass (imf15.hostedemail.com: domain of liushixin2@huawei.com designates 45.249.212.188 as permitted sender) smtp.mailfrom=liushixin2@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1683509849; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=DbfrnBYHPZ2F9ySCCQHz7Y4fpvof5HlRtEPZCpA34m4=; b=1giOh5j44R1QiLZmylTFGWaLPjZ2fKTMsh7yFTqOmWDSWWDUAWUdl+FduyvZvan33g32Qe d15cImTHRRk/VfA8xN22UrimTPyyq3P2FGToT2XAxoczc6iojJseaZqRWoawM+h3qLhbgT LUyNUMNP9KxM86Bv1SDoUH+Br7rhvfY= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1683509849; a=rsa-sha256; cv=none; b=d10Y60a3aVbVpdMRFgWRHlzsoOZ5tGP0gsxweEpcOINIA5huJou29KWSVmr12ry5FzOgJa KMk6HDSTRI3aalOJOjhj43OhCzyOSqXGPFh2rgllHNxHSKLIUyqo1PVLc04c9XyJ1Y4fsl ojx3mqC/uDZUTxTpZT0r18cfAiAJswE= ARC-Authentication-Results: i=1; imf15.hostedemail.com; dkim=none; spf=pass (imf15.hostedemail.com: domain of liushixin2@huawei.com designates 45.249.212.188 as permitted sender) smtp.mailfrom=liushixin2@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com 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-Rspamd-Queue-Id: DD626A0007 X-Rspam-User: X-Rspamd-Server: rspam06 X-Stat-Signature: pa19i38zy5ifrkrmudwk3kj9ne3zhgr3 X-HE-Tag: 1683509847-833116 X-HE-Meta: U2FsdGVkX1+/PjC6rO5tB5ZXaegv1OWrpQgDUrrMWPndKvvSDej3y5QyY1Io3KQakMO39fZ8NISduY+fKi3HUGbeOhSIl4gOm508J044v5/xftiiaM5/c9L0boyXYBUW0gUs4NEp/MHU67cin6WmfsNhkNAAflUn4QImg4b+g5hHJEAA8Q3Y+nYTgIvoYkdidsK2Cupy7FngYiHc/PxIToIcbsTbS1Gb+uT+8jdDs0gt9bQwuGtO6R6Tl95aIc1kfQGD8v2A0BiPZl9T23NDcZAPXUaKlBfNH47vn4otJRfo3pBBuaG27cZLK+5P04QCnMl1oew7Wd4OxMQxiQMImyQKL2vAiQENqlHvQfwSm9UlPKwXx2iYaOQLa5/IZ/I9aQk2/hgFTF1SE+HxqbLASupYLylSB1GkuKaluEkw4L+/tNIWfhLH+FUGnujAaQwXtMsidLkhAwf3d8wduFuH7zkFLI4sWxFj025YFlnOaKPsXusWNSLSPNUc1HUgoR2XV8R4Jjw/p1sQY5F1/7C5iWsUsf9T9BiUM0reuJ7Bcmj557w7i46UcnIN/ysTs2cTNzlmLnTxaEcWA17K381sPabzzEI15m6P0tZ05VABfsVOtaLvTRpdiAF0rNvFgQ9qd3BFOd/NR1Bd3cd0DhHbGfv76kFsIJ9Gt1Dy6UAE04LYe75Zn8FW6teD3XbmEf+q7gN1pW9zeax3wy+r2kHs7+wyZwqeK5c+WDL6PuRuiZxa6PjVqPZtUy7ffnfLhtCsHUT51VXNg7xtSwfxi3Z6erLU/ZhbxCnjEIrvA2PTHghE54GTX0efe61KHWMkTbL8Lcu29pBG4IfpX2BSoc6nK1InLQElL70H4Z6N2TA/aW7TWPHfYPvEXpgI5SHhEWIBhycs7n8U6YWs0CQI/3YrrFOsxOY/caRcMTazAFMtyFhbkV7zYUM11C0mA29heugcs23/6o06ZsyXAf1rvkz 8VzoRk7B 4SD/khCkJIr6VV4AJJ3taIDbc6x6Z+wvbN1Eeqytcm2xqnt9LnZjHdGX5UD2LisMkGTaW3LmAVuqYgBwwQcTp0IK7crgEDChjpkry+HR4gXXPwQEi6/v0FZwbfXCufDRXaxjL X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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 > > . >