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 4A6B4C3A59D for ; Mon, 24 Oct 2022 03:07:48 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 76179940008; Sun, 23 Oct 2022 23:07:47 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 710E6940007; Sun, 23 Oct 2022 23:07:47 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5D936940008; Sun, 23 Oct 2022 23:07:47 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 4D2E4940007 for ; Sun, 23 Oct 2022 23:07:47 -0400 (EDT) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 1325312097A for ; Mon, 24 Oct 2022 03:07:47 +0000 (UTC) X-FDA: 80054358174.19.5F6A457 Received: from mail-pl1-f196.google.com (mail-pl1-f196.google.com [209.85.214.196]) by imf18.hostedemail.com (Postfix) with ESMTP id AA2EE1C0007 for ; Mon, 24 Oct 2022 03:07:46 +0000 (UTC) Received: by mail-pl1-f196.google.com with SMTP id p3so6469044pld.10 for ; Sun, 23 Oct 2022 20:07:46 -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=KSG5pKXEMOX4Hxoh4vkf2ZzKyaQJNTqhWFdegxKWYNo=; b=gXThecH477Xe6h3lKH+zjHyVpBha0+4GyMD4kI2Ouw8rSEPKxO05R4ueRNAh9Q17bM JPfEsYoOgtz7/l2zEAamfJ09dx+FtiqtyTGB4hzkNcfc9tBWT3C/C5hgUsRqlJbKRjcs A7Ul7RP7+WIs+LzsqC4OXD1Soq+IDoaaZB2iYo9lhHlRzUfisZLJvuNouMlgcqXbnj0g RFo6PK8/RLv9RPcLAMCszCj0qsXteSkAszhbEvP5zO1FyT11vG6jg8Qcm53aG/u2n4ay u6Mq1pmMPSQMMJtAncbSBGZwRJlyi+XbgB92qYXsEY+F4FwIhW4iKUa2HkvaeuuvBwB4 ssrQ== 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=KSG5pKXEMOX4Hxoh4vkf2ZzKyaQJNTqhWFdegxKWYNo=; b=GESFv2+1hEd0tGSBjk18LzR9H6TktmITKWT4kG/+70yVSNxeCrDeQHs4fRBMMw53fU Ga5/r328wd83y7GACUKM7lWFCGItdwNEOFDMPDFNJGacLq0VhoB4L0OiTG0dDm6jAPXY //T/bXRU7edYJyQHKH6HzYyDnhmFsPVxhpxMw4MTExGezCqlR3qZS8tGec0hgIqnmby6 M+dDZNSqUxCuSQTgdnGzzcIW1Tof1v483piAy+SF3CBqOYWxF7IFHV4e7bdDTV+wGcRg uLGORuSCq6LUJ73QQjcqyR/DfdXEJ2oTDXcSjfdEru8FvfDM9P6p2pfzLoFI/lzIslC4 8gww== X-Gm-Message-State: ACrzQf20ngQKBAnakiJCMSXWCtZWPu3D/CAS4958E2HIJnHCtkGGTKch 17woy6JkiHwv7CGZgZ/ueXA= X-Google-Smtp-Source: AMsMyM4dVcREkXLNr99Ky41B9mBxLqhlPGQZOH2pvVdhRZ7nHByihwF8u8N64NZjHec2KzKZ6BJ7OQ== X-Received: by 2002:a17:903:1105:b0:178:ae31:aad with SMTP id n5-20020a170903110500b00178ae310aadmr31138447plh.3.1666580865525; Sun, 23 Oct 2022 20:07:45 -0700 (PDT) Received: from localhost.localdomain ([193.203.214.57]) by smtp.gmail.com with ESMTPSA id oa11-20020a17090b1bcb00b001f262f6f717sm2146971pjb.3.2022.10.23.20.07.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Oct 2022 20:07:44 -0700 (PDT) From: xu xin X-Google-Original-From: xu xin To: david@redhat.com Cc: akpm@linux-foundation.org, imbrenda@linux.ibm.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 v3 0/5] ksm: support tracking KSM-placed zero-pages Date: Mon, 24 Oct 2022 03:07:41 +0000 Message-Id: <20221024030741.440709-1-xu.xin16@zte.com.cn> X-Mailer: git-send-email 2.25.1 In-Reply-To: <6eea25bf-08a8-641e-2360-68884e194608@redhat.com> References: <6eea25bf-08a8-641e-2360-68884e194608@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1666580866; a=rsa-sha256; cv=none; b=M6CHSd6+5rACfIoPGSXKxt2s4rgwKE49RquK9miT89gXhWS3OqNw9Hf/FzH2AK7FI1kTv/ es04nBJ6GQ9KV4nTHXbbMo1fFYzbPP907mYiwA1iHwohnCVHeXeT803gdEts3C/cbPgha+ 3kqcAWPNYvns8ZCc7hGu/mCguTY6Uus= ARC-Authentication-Results: i=1; imf18.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=gXThecH4; spf=pass (imf18.hostedemail.com: domain of xu.xin.sc@gmail.com designates 209.85.214.196 as permitted sender) smtp.mailfrom=xu.xin.sc@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1666580866; 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-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=KSG5pKXEMOX4Hxoh4vkf2ZzKyaQJNTqhWFdegxKWYNo=; b=3fFYddNG52vsbBxvM3vhfNBCO17xXrbK4snrqqQ/UKFd3Y2M802JXYLa4ROq6gv2JFmQHq GFFWr+QSTVRpicOWniyCBhirEEL22NKEadV3BdbynkXIjqoHpNk1eKeKvHuCqgDm+UXDU9 pf26f7YmHJavVE/SJC8+75OMNSWS4tQ= X-Stat-Signature: o6rsb596oyowoqjppwmg1g1fgjpoifuq X-Rspamd-Queue-Id: AA2EE1C0007 Authentication-Results: imf18.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=gXThecH4; spf=pass (imf18.hostedemail.com: domain of xu.xin.sc@gmail.com designates 209.85.214.196 as permitted sender) smtp.mailfrom=xu.xin.sc@gmail.com; dmarc=pass (policy=none) header.from=gmail.com X-Rspam-User: X-Rspamd-Server: rspam01 X-HE-Tag: 1666580866-961323 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: > >>>> A full description of the real-world end-user operational benefits of >>>> these changes would help, please. >>>> >>> >>> The core idea of this patch set is to enable users to perceive the number of any >>> pages merged by KSM, regardless of whether use_zero_page switch has been turned >>> on, so that users can know how much free memory increase is really due to their >>> madvise(MERGEABLE) actions. >> >> OK, thanks. >> >>> The motivation for me to do this is that when I do >>> an application optimization of KSM on embedded Linux for 5G platform, I find >>> that ksm_merging_pages of some process becomes very small(but used to be large), >>> which led me to think that there was any problem with the application KSM-madvise >>> strategy, but in fact, it was only because use_zero_pages is on. >> >> Please expand on the above motivation and experience, and include it in >> the [0/n] changelog. But let's leave it a few days to see if there's >> additional reviewer input. >> > >I just posted a selftest: > >https://lore.kernel.org/all/20221021101141.84170-5-david@redhat.com/T/#u > >That could (should) be extended to test if unmerging works as expected. > Yes. As you said, these selftests can be extended to test if unsharing KSM-placed zero pages works as expected, and I'm happy to do the extending after they are merged. > >Having that said, I think we really want a second pair of (KSM-expert) >eyes on these changes before moving forward with them. OK, don't worry. Let it be reviewed for a more time, so as to absorb more views later. If necessary, I will resend the patches to adjust to break_ksm()'s changes.