Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp747250rwb; Tue, 27 Sep 2022 04:14:35 -0700 (PDT) X-Google-Smtp-Source: AMsMyM69hSjmiRZHQXENxz8w6knroxZ0oEbo+UFXH5eklkbNB830fSTBBHyxyV0fP1x4P6nYjcir X-Received: by 2002:a17:90b:1b46:b0:203:a2c7:2327 with SMTP id nv6-20020a17090b1b4600b00203a2c72327mr4006410pjb.91.1664277275338; Tue, 27 Sep 2022 04:14:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664277275; cv=none; d=google.com; s=arc-20160816; b=zGvNOF5urTO0YRxLUsnZpYm5Z6JpAxulriloxqG0198b6LIwDq2VKKd7W71bKEtiz5 XPf5miT+Si/sE7cjpz6zJ6wrbET4xkQ/FzQEtmcnQY9UVa5TXlVv7V+pxyhUWKqTBjKu LvPwBbKE1mKrTaO/APWvLfyh9BC5Kf51Qlmp2iQ4ljaSFQgmqBZ53GAUxqtuv2PBn2UY noRGtsF7IBdtvnwMPvi5SxcOuGvVDwYAAmwemswRy8WwNYwwx5IYui6LE/fhD94XkiCQ zUyykPV7oISRSyVyuGY5u+/yT6ixmiBr4RGDGIC7XeHyljQk2QQvpH9H0GOnvoGT/4eo HRaQ== 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=Ookq+7E67o9GPMFhWg2KgngLY5+U9GNcxpPTPwcVOa4=; b=eIu0zZCLDlhOWigfeL8b2aIeLENV/lCuPc2bMKJI/SU+oLHIf5tJ1fSSUHdr9KvbLd peyOBXoeYGQ0Qdxbq2bcUsUZ7jvFXZtpaHLUdtR1fgkodA5EHSMdGIBp5DhLrN+6FDWI OJwCmb6npMi1sEXvwaIInrwjUJnCBVH1oCVv71e5Jn6LPbjwYvQLvQE/S46G4D9ARysM bKH+oCKh8DAR6DmrRN2FYgvPSD3OrArgXPu6+ce+8soWWnBwTTwjVLjI+k+sw/qQrhBQ Gz9CGwYuEZsB9IWgHK3IfM6x0ewdNKjSHdDt2qDQd5usCBGqyByGShGyHSEywoiWjdKV V/wA== 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 r11-20020a170902be0b00b00176cde77e34si1412460pls.121.2022.09.27.04.14.21; Tue, 27 Sep 2022 04:14:35 -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 S230008AbiI0LNV (ORCPT + 99 others); Tue, 27 Sep 2022 07:13:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48486 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231820AbiI0LND (ORCPT ); Tue, 27 Sep 2022 07:13:03 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B02EC356FC for ; Tue, 27 Sep 2022 04:13:00 -0700 (PDT) Received: from dggpemm500023.china.huawei.com (unknown [172.30.72.56]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4McH1R6hHbzlX4k; Tue, 27 Sep 2022 19:08:43 +0800 (CST) Received: from dggpemm100009.china.huawei.com (7.185.36.113) by dggpemm500023.china.huawei.com (7.185.36.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Tue, 27 Sep 2022 19:12:59 +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; Tue, 27 Sep 2022 19:12:58 +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> <2b469a5c-7960-ca6a-9360-c7d3aa26e8ae@huawei.com> <20220927072754.GB16710@lst.de> CC: Seth Jennings , Dan Streetman , Vitaly Wool , Andrew Morton , Nathan Chancellor , , , Kefeng Wang From: Liu Shixin Message-ID: <986efc9f-0deb-f705-dff1-f4d5992c2b8d@huawei.com> Date: Tue, 27 Sep 2022 19:12:58 +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: <20220927072754.GB16710@lst.de> 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 dggpemm100009.china.huawei.com (7.185.36.113) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-6.5 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/27 15:27, Christoph Hellwig wrote: > On Wed, Sep 21, 2022 at 09:42:41AM +0800, Liu Shixin wrote: >> 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. > But why would expect something to work on a device that has been > swapped on before? That's not usually how things work. > > . If not do this, while some user enable swap device first and then enable zswap, zswap will not take effect. The user need to re-enable the swap device which is inconvenient. >