Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp629812rwi; Mon, 10 Oct 2022 05:21:13 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5bjZEKtxW/TM+TCBuWvCI9n+znmQK02Fa1Wyrtoaoo30rFHmEsD0ufA3fwOMhHq1muM0Od X-Received: by 2002:a17:902:ce11:b0:172:6f2c:a910 with SMTP id k17-20020a170902ce1100b001726f2ca910mr19230266plg.156.1665404472808; Mon, 10 Oct 2022 05:21:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665404472; cv=none; d=google.com; s=arc-20160816; b=ts9H7CAaxZ0uxJhB20+Qw6mUPkrEFLMar6zGVvztsHiWtWXv90Wag+PG9IYRDowoqX cNMTii1Pgutm6celgg8X0VIKrDnRIi5h0iV1cZykbJkreOp8V6p1X8Owc1Lnd9yS9GIM UTZvYzj4RZLPakHAv6ff9/b1XOXfpMuhiPGTzvZPYiKwMjMmXvyTVoJmi3wWvd3arCGc 0vlD+WhF+j+5QXMMbWfRI+73lj7PQvIbXUGoGyM2Ya+k96uiHe8YKH52vyX25fo5eWF+ sajvhx4AY8gEQjvGYBNhtV/yb5bpYtzmq1siFfzeJIbsr2ND6s9KTlPykL6sMpdLOu2A aQ6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=FwPMwCgbi/FbAd9r1+fUWWjocTEXzlErLf/J4KoA6Pw=; b=FSWNwSL/fUZm8zreATBSwwXrtgl6S26q+aepcbCZEEfN1VrhLCTqpAEt5mzvzAqADk y0UMCMQKYKaTezh3k5uw8ZLER52zp0HG5TvZlNEE8Lu54mg3FNNKt7JREwJ+KcLmdET7 Ty8/G/BQuo6a/MWaCSUv2F2FZ3DNy2QFNFyfAqHxF8WEIirqaa3Ip2tldHidBGalZTDs no/OMrppC9Zzl+dt+I8yUu0W/Q7TOrTc0agdOwT/lBpaa3JeIqlEQ6kMt4LKGVGiIUGb NadjHeNVjK5/rXd8pordPXxv8U+e5d3GwUpa7V4DmKlFHBagkzqRNmPhEeFFVtxHUzG1 9uCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="D3fg/uc7"; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i3-20020a17090adc0300b0020b020b98a1si10085391pjv.36.2022.10.10.05.21.01; Mon, 10 Oct 2022 05:21:12 -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; dkim=pass header.i=@gmail.com header.s=20210112 header.b="D3fg/uc7"; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231979AbiJJMIq (ORCPT + 99 others); Mon, 10 Oct 2022 08:08:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40328 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231731AbiJJMIo (ORCPT ); Mon, 10 Oct 2022 08:08:44 -0400 Received: from mail-pl1-x641.google.com (mail-pl1-x641.google.com [IPv6:2607:f8b0:4864:20::641]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 44FA161706 for ; Mon, 10 Oct 2022 05:08:43 -0700 (PDT) Received: by mail-pl1-x641.google.com with SMTP id d24so10207558pls.4 for ; Mon, 10 Oct 2022 05:08:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=FwPMwCgbi/FbAd9r1+fUWWjocTEXzlErLf/J4KoA6Pw=; b=D3fg/uc7O/MeJ7dpIE5CVLx02YbILU+5RamhHoy2B6Q2HH0R0s4CgnZXprAsun6ROi /VdDCXReoNG6k7t5xllDH9bqMHmXIDDWhpRG5/4BQfk45l4yhlUSjUMP09fbcnTa1tXI /SNzpnHpGcxgqaNws4pgacDVBDmUPtlNci0Mw//ZvMRz5gEoDe6x4Fiqf47opl3hLpvD bXUUywZ+kJZjS4afh9HE2HSx1TCRAFuBdPduKLXdaA0pACBHvYh/WjWmYsMLJPhBmfY7 oQ0qef9HRNuBo/EEgaYcs2jVYeKquu7PO1zz4AU0rrbpowBAaGQfG8tKnrQ5FO8YJjLV aIYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=FwPMwCgbi/FbAd9r1+fUWWjocTEXzlErLf/J4KoA6Pw=; b=efMnH+Yx8wzM6leV6mJ9eOv1ZFNmLssI3pZlDGuP90KgpOcq9/hMAQdg8doTJitzzZ Ya3kzd1qDoO8a420XfLzwD8NTenzJ6CNc37/x1AOQRyPkceviLZofkOhKUXC+tojTG+V 9pyzS6QXTDIfIYdS38SxS87Jyra5o02quDgOFb4Rk+HTRSrX7G7ukaM8mHi9FWueS5aX COT5sjkM8ubMopU9BzgGqSXRsMsL/ccC34HV81azh9sXdOO2MWtgBXQII5E4KzC1Ba1w MGEE0V+1vYtqzzGc43Xv1T6XyVfjY4eHPWIqDZaKhZGsTTz2yErfRSbaEaA7SNO/0llh a2Ig== X-Gm-Message-State: ACrzQf0KEtuE9qL8LaMRPrLLRhqeRRS4yyEeo5r6mauY3Ysas5tQrrZ4 xuZ3P7s7Bg108xyTxRdXcC8= X-Received: by 2002:a17:902:f650:b0:172:8ee1:7f40 with SMTP id m16-20020a170902f65000b001728ee17f40mr19161423plg.101.1665403722671; Mon, 10 Oct 2022 05:08:42 -0700 (PDT) Received: from localhost.localdomain ([193.203.214.57]) by smtp.gmail.com with ESMTPSA id h11-20020a17090a130b00b00208c58d5a0esm9037177pja.40.2022.10.10.05.08.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Oct 2022 05:08:41 -0700 (PDT) From: xu xin X-Google-Original-From: xu xin To: imbrenda@linux.ibm.com Cc: akpm@linux-foundation.org, david@redhat.com, jiang.xuexin@zte.com.cn, linux-kernel@vger.kernel.org, linux-mm@kvack.org, ran.xiaokai@zte.com.cn, xu.xin.sc@gmail.com, xu.xin16@zte.com.cn, yang.yang29@zte.com.cn Subject: Re: [PATCH v2 0/5] ksm: support tracking KSM-placed zero-pages Date: Mon, 10 Oct 2022 12:08:34 +0000 Message-Id: <20221010120834.318840-1-xu.xin16@zte.com.cn> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221010112413.219dc989@p-imbrenda> References: <20221010112413.219dc989@p-imbrenda> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, 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 Hello, Thanks for your reply. > >why are you trying so hard to fix something that is not broken? Actually, it breaks the definition of unmerge, though it's usually not a big problem. > >can't you just avoid using use_zero_pages? use_zero_pages is good, not just because of cache colouring as described in doc, but also because use_zero_pages can accelerate merging empty pages when there are plenty of empty pages (full of zeros) as the time of page-by-page comparision (unstable_tree_search_insert) is saved. > >why is it so important to know how many zero pages have been merged? >and why do you want to unmerge them? Zero pages may be the most common merged pages in actual environment(not only VM but also including other application like containers). Sometimes customers (app developers) are very interested in how many non-zero-pages are actually merged in their apps. > >the important thing is that the sysadmin knows how much memory would be >needed to do the unmerge, and that information is already there. > I think it's about chicken-and-egg problem. Anyway, thanks for your reply.