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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id F03E8C4332F for ; Wed, 16 Nov 2022 22:02:38 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 69DB26B0073; Wed, 16 Nov 2022 17:02:38 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 6275D8E0002; Wed, 16 Nov 2022 17:02:38 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4A0FB8E0001; Wed, 16 Nov 2022 17:02:38 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 36ABE6B0073 for ; Wed, 16 Nov 2022 17:02:38 -0500 (EST) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 06107120879 for ; Wed, 16 Nov 2022 22:02:38 +0000 (UTC) X-FDA: 80140680396.12.4094912 Received: from mail-qt1-f180.google.com (mail-qt1-f180.google.com [209.85.160.180]) by imf01.hostedemail.com (Postfix) with ESMTP id 933594001A for ; Wed, 16 Nov 2022 22:02:35 +0000 (UTC) Received: by mail-qt1-f180.google.com with SMTP id l2so3082qtq.11 for ; Wed, 16 Nov 2022 14:02:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cmpxchg-org.20210112.gappssmtp.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=qxY4awyAHKJmDzgFV4/XFR7JoWvntkbK8PIidM5n6xM=; b=P/vCSrVMxBTxgyyVTAGqr+kX3kUkSOkZLYm1Q2r2BYuCqLJu+e9z8dnDJrVt5FiBwI T7tGBJXhcikcEqZY0vtQMKgOP8Z2fn2vzRU/MX3hd9/ayXYz6OmlN7PnuZEO/aIsAalz THWfcZ4svC8CckJ1tjNytN6RU45d7ZSiZM4t/Ero/29lUjJxI710U5B5XQDCABk+WpQE V2f+EtZxzI9/Opm/FNSxap51ne2dgZgd1ROcoooPB6EYNQHTN6q8KHEu0kQ5Z4OnL5Dy 3glFZ25xyx2h9MwTX7KTE1htr+y6qq/FFpk3iAR1shfgmU/BsmwTF4ZxQ20hTXvMdxVR Rb0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=qxY4awyAHKJmDzgFV4/XFR7JoWvntkbK8PIidM5n6xM=; b=B2kntT4bpEzkmuRFWQ/X/BscmhTw6O17L9VZxy5FdHB1CcAEEIelsntkKZzFAhK1Cj xtfRHpOhQdx5qD9zR2SmArlYvHcSn57zGPD0tKmTlQvNWeeIb7EWnHgpPcJKVs6KyDUE rxOUup1Zu3nLrbAZI5aFkvV/D24pY9akPG4VgWwjceuiTECwOJZsUuoXsCVItLWZZ08q qeRZM5KdKAmd/Ei02Pgy52RL33kM9PS9rEWge4ufgn5YXggt6ISusSoaOs2Fb7U1adyp G3GW2mzOtoFBFDNa4FlxjNyoKY8zLi/gEoz+5FqEVyUdBZ0T175ySN2OrVfLm7f+wtEa x3eg== X-Gm-Message-State: ANoB5pnCeCPkyZLZ6aaR0BBUjJHsll9FY6KfxFGTdbENUXhwd1U3aAX4 a+xF6ziIsyDjTLwhTvLKOQ7lAw== X-Google-Smtp-Source: AA0mqf7Th5PDDsD9O68ylLIPWunbWRrlLQwthWg1Kh4MqsG9RSMusxhrWmoykqWy/vdDK4jdLWj1Fw== X-Received: by 2002:ac8:474b:0:b0:3a5:177d:d9cb with SMTP id k11-20020ac8474b000000b003a5177dd9cbmr23019179qtp.64.1668636154579; Wed, 16 Nov 2022 14:02:34 -0800 (PST) Received: from localhost ([2620:10d:c091:480::1:bc4]) by smtp.gmail.com with ESMTPSA id u16-20020a37ab10000000b006bb29d932e1sm10593433qke.105.2022.11.16.14.02.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Nov 2022 14:02:34 -0800 (PST) Date: Wed, 16 Nov 2022 17:02:57 -0500 From: Johannes Weiner To: Minchan Kim Cc: Nhat Pham , linux-mm@kvack.org, linux-kernel@vger.kernel.org, ngupta@vflare.org, senozhatsky@chromium.org, akpm@linux-foundation.org, sjenning@redhat.com, ddstreet@ieee.org, vitaly.wool@konsulko.com Subject: Re: [PATCH v3 3/5] zsmalloc: Add a LRU to zs_pool to keep track of zspages in LRU order Message-ID: References: <20221110171831.19176-1-nphamcs@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1668636155; a=rsa-sha256; cv=none; b=GxjVI03x7KW8fSDBUJTtvBzQAt7rDH56PhnjDGI7pMkXiVAiSGE6rNrxSvHhCQTiqAfS9w ierKbMhYQpG/PW413ScO2poizJ0Io4WEwzVDN6JJyOxd3URisXNJ4ZH3iOLBXrmDqtSm+G UkstqDgQ3vEGMsFSb7ZlDJI1UwgCtEo= ARC-Authentication-Results: i=1; imf01.hostedemail.com; dkim=pass header.d=cmpxchg-org.20210112.gappssmtp.com header.s=20210112 header.b="P/vCSrVM"; dmarc=pass (policy=none) header.from=cmpxchg.org; spf=pass (imf01.hostedemail.com: domain of hannes@cmpxchg.org designates 209.85.160.180 as permitted sender) smtp.mailfrom=hannes@cmpxchg.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1668636155; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=qxY4awyAHKJmDzgFV4/XFR7JoWvntkbK8PIidM5n6xM=; b=sss6h6uIZ6CeAnyAfCoU9zJfBbItKYP0H1aP2uHN3fNZyzg03UuqYvxBOw3y/iDB6JYXbe uziwIlylBgpbHfHdnxTePCr9e9U/her6Y/9yHixX3XvVK9utMmam8liJNxpJlkTxQsP0WX wIwq57398ntJFhjhIga8jPSJD0q5fQM= X-Rspam-User: Authentication-Results: imf01.hostedemail.com; dkim=pass header.d=cmpxchg-org.20210112.gappssmtp.com header.s=20210112 header.b="P/vCSrVM"; dmarc=pass (policy=none) header.from=cmpxchg.org; spf=pass (imf01.hostedemail.com: domain of hannes@cmpxchg.org designates 209.85.160.180 as permitted sender) smtp.mailfrom=hannes@cmpxchg.org X-Rspamd-Server: rspam02 X-Stat-Signature: 5w84dmydaj3be6d7n3oy6muyj55gnmrc X-Rspamd-Queue-Id: 933594001A X-HE-Tag: 1668636155-585410 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Thu, Nov 10, 2022 at 02:48:32PM -0800, Minchan Kim wrote: > On Thu, Nov 10, 2022 at 09:18:31AM -0800, Nhat Pham wrote: > > > Please put the LRU logic under config ZSMALLOC_LRU since we don't need the > > > additional logic to others. > > > > I think the existing CONFIG_ZPOOL would be a good option for this purpose. It > > should disable the LRU behavior for non-zswap use case (zram for e.g). The > > eviction logic is also currently defined under this. What do you think, > > Minchan? > > That sounds good. > > Sergey and I are working to change zsmalloc zspage size. > https://lore.kernel.org/linux-mm/20221031054108.541190-1-senozhatsky@chromium.org/ > > Could you send a new version once we settle those change down > in Andrew's tree to minimize conflict? > (Feel free to join the review/discussion if you are also interested ;-)) I've been reading through that thread, and it doesn't look like it'll be ready for the upcoming merge window. (I've tried to contribute something useful to it, but it's a fairly difficult tuning problem, and I don't know if a sysfs knob is the best answer, either...) Would you have any objections to putting Nhat's patches here into 6.2? It doesn't sound like there was any more feedback (except the trivial ifdef around the LRU), and the patches are otherwise ready to go.