Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2571075rwb; Wed, 30 Nov 2022 08:11:16 -0800 (PST) X-Google-Smtp-Source: AA0mqf7YjiO+VBhv7eTZn6DeGbVfJpZ4EK10s7aYlMumVuwLxomfiYwGRzrhJMbtLKJnCPREfamS X-Received: by 2002:a62:6045:0:b0:575:f66b:75a9 with SMTP id u66-20020a626045000000b00575f66b75a9mr1897268pfb.2.1669824675947; Wed, 30 Nov 2022 08:11:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669824675; cv=none; d=google.com; s=arc-20160816; b=bc2vzR5CfrMy4s2dtriZmyuZLfmqcZLTr1mm/S98GSgTJogHoufOwun2EpPniF1iwz ER7WhFG48IRkJ+17gt20+QKqfWnXFWznEhyk4w5DMvEY4FDYcIwWHziWgb8o4KwlV1em vjxwTTXcBFMgpUa4LxIw7wqLoKIjbof+BK4yn6r93lNuM5h50p7oSpvViAvxbrfwccPN wbTriiKCjThNWAABjSCYqtBXrII1AzPWcLZkKv9tbQZ+c5buapqsfYFmau7yVjuaCvAo 1xjAioYC+300dnJi1Zcms+bgSWk0WXnX5iRzheNPWaRYWwxl913kHc2spxXFlyBakGge Aaig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=pkpn3JCLkN0zpicy7e0jcgZdD6YYDioTrx8v1I8/jMs=; b=qGW7dvgmayDszqmReaLVNsbfYNErQ81GgWod3uidLDZVrwsNhoGxTw2+bKlzFG1yp+ y+4CH47fiVOZ3TsVHOMWhyWZqfYTNyhZE3ZDm71QodUiinU5TCntn0bsVNOy1W6s2oFz LKR4zRk70ezae47f7cXPoqu8l7XGN6ZHv4/0pGdOX+1m0oCgWr/GVxMGh36ArQW9GC8U fkaT1X9L/nxc6wiaBnI1l8Lc+aQA4j+eLhSNcOQ+V1wQP2ZLwgL9HGQ6kwblvlciHRxe ag+U+hVrPOiEP90XShBwuah2043lq0EvVBE9lVMTBTvb1UGiN0mR8ChlO44QZAYXT3G0 MWiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@konsulko.com header.s=google header.b=GadttrHS; 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=pass (p=NONE sp=NONE dis=NONE) header.from=konsulko.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lx7-20020a17090b4b0700b002193ad201a8si2088263pjb.138.2022.11.30.08.11.00; Wed, 30 Nov 2022 08:11:15 -0800 (PST) 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; dkim=pass header.i=@konsulko.com header.s=google header.b=GadttrHS; 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=pass (p=NONE sp=NONE dis=NONE) header.from=konsulko.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229804AbiK3PXT (ORCPT + 83 others); Wed, 30 Nov 2022 10:23:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47784 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229680AbiK3PXR (ORCPT ); Wed, 30 Nov 2022 10:23:17 -0500 Received: from mail-pl1-x631.google.com (mail-pl1-x631.google.com [IPv6:2607:f8b0:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BB0EF4D5DA for ; Wed, 30 Nov 2022 07:23:16 -0800 (PST) Received: by mail-pl1-x631.google.com with SMTP id w23so16982219ply.12 for ; Wed, 30 Nov 2022 07:23:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=pkpn3JCLkN0zpicy7e0jcgZdD6YYDioTrx8v1I8/jMs=; b=GadttrHS1p84E1qQAQ/UpFhBhO77vSulBRtydG4Pe7Pg5UybNUOiEv+A89EITuLcSQ Wjz1o+kFDLytkP2JFdH9Lzyt+/+4z+7CWNQrxefS8Pjj+B17q/cZfRFJ5C2pVTAKrNi1 TKgCtduuLidkKD1pMQdDdxWD0hUnK6hTlK7zw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=pkpn3JCLkN0zpicy7e0jcgZdD6YYDioTrx8v1I8/jMs=; b=HyoCJLGNneobznS786BUbrqIOLXHkczNNp/vbbepPN1PjMNzf7MoPEB2AxXrQMae6m 2vm+8havRDDhp38Yaw0tVeAA20y3UB4a9TdEDA1s1S8iDDaTGHAnqsrdqS0+OOAMOrVR hKhSi6xEBQjAAvkPY2idIXfW/qRjU7uI8v9Xl3bDjKDMlar/BxIVI8TCI80wTmZls2Fl N+yCtUlieMFXbY/Epc8ZzSDfhBNoRDhjV0OPNL90KTw+KDDSbWl3M7d0J8afH/p/znPr nmIUVGv5sGf+5yj+hC2umQDEBg+Pm3HSVbBNhnC7jb/ThOFpN/ybn53ATbL2hKqGgXO4 0bBg== X-Gm-Message-State: ANoB5pl2Brb9r9rfAUca5WOswHHybdRMZTWvsAxU2jhgGVU4n1Siiaa0 vDp5qjxdGHICVmtuSCmF6GBtUcS/MFYooAiFwPAp5jRMiVI= X-Received: by 2002:a17:902:b40a:b0:188:635d:4b43 with SMTP id x10-20020a170902b40a00b00188635d4b43mr46622447plr.69.1669821796123; Wed, 30 Nov 2022 07:23:16 -0800 (PST) MIME-Version: 1.0 References: <20221128191616.1261026-1-nphamcs@gmail.com> <20221128191616.1261026-5-nphamcs@gmail.com> In-Reply-To: From: Vitaly Wool Date: Wed, 30 Nov 2022 16:23:05 +0100 Message-ID: Subject: Re: [PATCH v7 4/6] zsmalloc: Add a LRU to zs_pool to keep track of zspages in LRU order To: Johannes Weiner Cc: Sergey Senozhatsky , Nhat Pham , akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, minchan@kernel.org, ngupta@vflare.org, sjenning@redhat.com, ddstreet@ieee.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, 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 Tue, Nov 29, 2022 at 4:54 PM Johannes Weiner wrote: > > On Tue, Nov 29, 2022 at 11:03:45PM +0900, Sergey Senozhatsky wrote: > > On (22/11/29 12:53), Vitaly Wool wrote: > > > I think the amount of #ifdefs here becomes absolutely overwhelming. > > > Not that zsmalloc code was very readable before, but now it is > > > starting to look like a plain disaster. > > > > Presumably most of them will go away once LRU moved from > > allocator to upper level. > > Yes consider it the "cut here" lines for refactoring the LRU into > zswap, which we want to do next. They're not here to stay, and that > work will remove a lot of duplication and complexity from all > backends. So I hope it's acceptable as a transitionary state. I see, thanks for the explanation. ~Vitaly