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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4FEE6C6FA82 for ; Wed, 21 Sep 2022 01:42:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231434AbiIUBms (ORCPT ); Tue, 20 Sep 2022 21:42:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33798 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231419AbiIUBmp (ORCPT ); Tue, 20 Sep 2022 21:42:45 -0400 Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4450372EEF for ; Tue, 20 Sep 2022 18:42:44 -0700 (PDT) Received: from dggpemm500022.china.huawei.com (unknown [172.30.72.54]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4MXLhd0TlKzHpcL; Wed, 21 Sep 2022 09:40:33 +0800 (CST) Received: from dggpemm100009.china.huawei.com (7.185.36.113) by dggpemm500022.china.huawei.com (7.185.36.162) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Wed, 21 Sep 2022 09:42:42 +0800 Received: from [10.174.179.24] (10.174.179.24) by dggpemm100009.china.huawei.com (7.185.36.113) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Wed, 21 Sep 2022 09:42:41 +0800 Subject: Re: [PATCH v5 2/5] Revert "frontswap: simplify frontswap_register_ops" To: Christoph Hellwig References: <20220915035003.3347466-1-liushixin2@huawei.com> <20220915035003.3347466-3-liushixin2@huawei.com> <20220920121305.GA4237@lst.de> CC: Seth Jennings , Dan Streetman , Vitaly Wool , Andrew Morton , Nathan Chancellor , , , Kefeng Wang From: Liu Shixin Message-ID: <2b469a5c-7960-ca6a-9360-c7d3aa26e8ae@huawei.com> Date: Wed, 21 Sep 2022 09:42:41 +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: <20220920121305.GA4237@lst.de> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.174.179.24] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To dggpemm100009.china.huawei.com (7.185.36.113) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2022/9/20 20:13, Christoph Hellwig wrote: > On Thu, Sep 15, 2022 at 11:50:00AM +0800, Liu Shixin wrote: >> This reverts commit f328c1d16e4c764992895ac9c9425cea861b2ca0. >> >> Since we are supported to delay zswap initializaton, we need to invoke >> ops->init for the swap device which is already online when register >> backend. > Why do we "have" to do it. Retroactively supporting functionality on > previously enabled swap devices seems rather odd, and the amount of > cruft added for it here absolutely does not seem to be worth it. Hi Christoph, This revert makes code complicated, but I think it's necessary. When enable zswap, I expect it to work for all swap devices as much as possible. In this way, user can enable zswap and swap device in any order. Since we can enable zswap on previously swap devices, why not support it to get such benifit? Thanks, > . >