Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp4700129rwb; Tue, 20 Sep 2022 19:01:36 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4CJXscspn2+1VirW8XsDKCCxm7pvCHEYiPGLXtZ5XfuH+uSoXsjZXfd9xNv9WMyX9uTC7R X-Received: by 2002:a17:906:4bd3:b0:731:3bdf:b95c with SMTP id x19-20020a1709064bd300b007313bdfb95cmr19180280ejv.677.1663725696157; Tue, 20 Sep 2022 19:01:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663725696; cv=none; d=google.com; s=arc-20160816; b=xNVYEcUAGQCr79PFANbkmayD1/VsUWYpT9rxWAUyXR5S7L5AWezEXpHM6hO1SM3L7j iPmpEIp26q4B/ZbFtSarlOXsmLoACLfXTwAsk0iPP87sgAMklj1eK3u2ovSoZrYLwCqo 3LL/uz752kSak+n4PMbQg8ajjMpIfWnyYhY/P9cdahvLvlQElWLYLg+kq4Esjsf5FEXh iz1/SeOTncm1OTvgqkd7JRMD6cVMQQpp+I+bow6AMGWkLpHBsBYjPoZpCGKNM8XMOp6L q1rch/WoQdUghfanxonpPHOCYkVB++20PN3NPj1ckhQszNPaIpkQhh16Nnz01yX6MlUW AQ+Q== 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=/qR5XyjbpIIGqXkPd32zMvOtAQb1qAXqJ7Oejkz2G2Q=; b=s0GbEjffCcaScgp1Z9LDbG26DpbR3eYhqof2zagrJtYn4Bjh09vkRKhKnqhcMTSKAs Nbx/JRQ7DnYb5j46nd1CjxSOzCHhvg5OCBsbr6j/rfbQT6ZX0y90FQyO074O6lDRmvwk +MiM604BQhkn0AUZKEKdRuMV9COLbCjtFoPtNBN27v/HfxSwaKP8DjZWA/YfZBTyHcMO GNFKiKACBnssUGh0QXfqb8oWyYM356Nz2tOTYCOL8UV9f3J+aH92desILmLMdnMGazeu ib6WY9tFd1uJoVNV3z530RWK+INoDr/Bk0xzlsU84WtJ4AN4iHS8ilfPfh6Ea7E6X1QY HQtw== 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 u17-20020a50c051000000b0043e81c582d2si1231502edd.232.2022.09.20.19.01.09; Tue, 20 Sep 2022 19:01:36 -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 S231425AbiIUBmr (ORCPT + 99 others); Tue, 20 Sep 2022 21:42:47 -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 X-Spam-Status: No, score=-6.4 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS 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 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, > . >