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 89D1FC54EE9 for ; Tue, 27 Sep 2022 11:13:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230251AbiI0LNV (ORCPT ); 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 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. >