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 6DBDEC4332F for ; Tue, 22 Nov 2022 03:07:49 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E94A46B0071; Mon, 21 Nov 2022 22:07:48 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id E1DB46B0073; Mon, 21 Nov 2022 22:07:48 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CE5266B0074; Mon, 21 Nov 2022 22:07:48 -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 B8B466B0071 for ; Mon, 21 Nov 2022 22:07:48 -0500 (EST) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 9338A1C5C57 for ; Tue, 22 Nov 2022 03:07:48 +0000 (UTC) X-FDA: 80159593416.02.A1C0461 Received: from mail-pj1-f49.google.com (mail-pj1-f49.google.com [209.85.216.49]) by imf20.hostedemail.com (Postfix) with ESMTP id 3CE8B1C0006 for ; Tue, 22 Nov 2022 03:07:48 +0000 (UTC) Received: by mail-pj1-f49.google.com with SMTP id ci10so5925596pjb.1 for ; Mon, 21 Nov 2022 19:07:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; 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=dKC44xNtMBTTI03PsQfb3At/7mJh1Wd3rUBR7H0i12E=; b=kC0Bt7l3kahpt0PbuQCuay1yRbm20Fj2Bt0YFvmUvw+NUEwtk8EzVvHbbK1H+UHOJg gavysDY0jprhHkZN4GWzMRlWSZ8zTeboN3aJ/N+0pg4uXxuRa/2X/SVQwevv6E5t1a5D ExH9JPTBxhiQ9gTxuiK80EbdQ81HrKYOKXBbw= 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=dKC44xNtMBTTI03PsQfb3At/7mJh1Wd3rUBR7H0i12E=; b=1kqHQOI0jlmsM/JWN5zcASP/+gO4xdCVnmfN1iN3DWvCw1f9KgrRWH440dpQEbT+LB YINdChPf5c2N+rKQ96dOEyHrNQ/c/OjRtYDyx9BcPKdSN5VGqkfdaAb1dzeOI4bEcbVw xdn3ECtycLqrMX1XaG94TfCVRUxNaoq/ctb2ZiBtaSgdpfR0oWfcwFzNqidvBMNe3yti gOyTg3dSH7rqcwfib3WkplE5+mrpB9/XvXp//GimRvbzuWf5mgmfXC2wm6zbY7hvuGRJ e6OOwpM23Ys/+wwa+wamay4nUVCEqxbi01T2RAgi+/FwnSXym5RhNcqwdI+qG8Jzx4+N 7lig== X-Gm-Message-State: ANoB5pnpfXnlryBshgXHKV4j6uy1IUIqkeECqYjzMWGF8CempUePQPCo WgkWW9aZrIdD3t5NVPbY87XUew== X-Google-Smtp-Source: AA0mqf4i3JZ2WBQ8evqssiGnJFuhf6MNAtNpZd4DjY7+b4eZUr81cQcLKxvgLXjLkreXDViFjxJQIw== X-Received: by 2002:a17:90a:a003:b0:214:1a8a:a415 with SMTP id q3-20020a17090aa00300b002141a8aa415mr23232123pjp.197.1669086467200; Mon, 21 Nov 2022 19:07:47 -0800 (PST) Received: from google.com ([240f:75:7537:3187:e258:71ac:37b7:2d52]) by smtp.gmail.com with ESMTPSA id u17-20020a170903125100b00186dcc37e17sm10451421plh.210.2022.11.21.19.07.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Nov 2022 19:07:46 -0800 (PST) Date: Tue, 22 Nov 2022 12:07:42 +0900 From: Sergey Senozhatsky To: Johannes Weiner Cc: Alexey Romanov , minchan@kernel.org, ngupta@vflare.org, akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, kernel@sberdevices.ru, ddrokosov@sberdevices.ru, Sergey Senozhatsky Subject: Re: [RFC PATCH v1 0/4] Introduce merge identical pages mechanism Message-ID: References: <20221121190020.66548-1-avromanov@sberdevices.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: ARC-Authentication-Results: i=1; imf20.hostedemail.com; dkim=pass header.d=chromium.org header.s=google header.b=kC0Bt7l3; spf=pass (imf20.hostedemail.com: domain of senozhatsky@chromium.org designates 209.85.216.49 as permitted sender) smtp.mailfrom=senozhatsky@chromium.org; dmarc=pass (policy=none) header.from=chromium.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1669086468; a=rsa-sha256; cv=none; b=mXD9GjTZ96tLE9xlanGLPTRL7wxUyZU0YKd+TY+pt21vX/lZVDRSEZwvYC1HWU8sfTJCZq 08ave/NNcgtdG/P6KhRrf1zSVIP1CYpe1VFSQh4z6gcflyhWwVfWSTWlyuEhuBtMde9Vpr iWATpS1AGOBUU6XEx2akdJgG/09wD9M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1669086468; 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=dKC44xNtMBTTI03PsQfb3At/7mJh1Wd3rUBR7H0i12E=; b=X2ecWgV5FhWlURoAQR+VrW51+cek1d6BY/3ukRjUbCr8pVhY1ugQ+KxvOHYMbbUTxJmwcl b3swW74yTdmWDyO/PascyTqXh9OFYpNwqyA5o83wThjCzyjmrULf7nK3dSO0H6UetQGGPt Qj9a65Yz/zi7JfduW/D1DzW8MH5MW10= X-Stat-Signature: 79cs7aiur581mr9f5r7iaok69s1wqzzw X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 3CE8B1C0006 Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=chromium.org header.s=google header.b=kC0Bt7l3; spf=pass (imf20.hostedemail.com: domain of senozhatsky@chromium.org designates 209.85.216.49 as permitted sender) smtp.mailfrom=senozhatsky@chromium.org; dmarc=pass (policy=none) header.from=chromium.org X-Rspam-User: X-HE-Tag: 1669086468-89782 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 (22/11/22 12:00), Sergey Senozhatsky wrote: > On (22/11/21 15:44), Johannes Weiner wrote: > > This looks pretty great. > > > > However, I'm curious why it's specific to zram, and not part of > > zsmalloc? That way zswap would benefit as well, without having to > > duplicate the implementation. This happened for example with > > page_same_filled() and zswap_is_page_same_filled(). > > > > It's zsmalloc's job to store content efficiently, so couldn't this > > feature (just like the page_same_filled one) be an optimization that > > zsmalloc does transparently for all its users? > > Yea, that's a much needed functionality, but things may be "complicated". > We had that KSM-ish thing in the past in zram. Very briefly as we quickly > found out that the idea was patented by some company in China and we couldn't > figure our if it was safe to land that code upstream. So we ended up dropping > the patches. > > https://lore.kernel.org/lkml/1494556204-25796-1-git-send-email-iamjoonsoo.kim@lge.com/ IIRC that was patent in question: https://patentimages.storage.googleapis.com/e2/66/9e/0ddbfae5c182ac/US9977598.pdf