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 5FEF1C4332F for ; Fri, 21 Oct 2022 10:18:16 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 04E408E0003; Fri, 21 Oct 2022 06:18:16 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id F40E38E0001; Fri, 21 Oct 2022 06:18:15 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E09C38E0003; Fri, 21 Oct 2022 06:18:15 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id D258B8E0001 for ; Fri, 21 Oct 2022 06:18:15 -0400 (EDT) Received: from smtpin06.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 949374063A for ; Fri, 21 Oct 2022 10:18:15 +0000 (UTC) X-FDA: 80044556550.06.13D9BAE Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf09.hostedemail.com (Postfix) with ESMTP id 3092C140010 for ; Fri, 21 Oct 2022 10:18:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1666347494; h=from:from: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:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=NPkjQ5gJeqFcNbmHMFmugRV0TbKd9OVS/vY9UX71k1w=; b=g/DOmHeQzY5ihfeLNk13GqOoqx8nsFHPQMYvLpSxrHqksuMJUFgXRoAguMgu2jtB/a0/aZ Yr768ER3F0ziMjMtWjNJwmgX+iNj1zoDtYmqR7yXH6H9O9hUslIYd2MIYKyLwU0KJX2ygX 55nmWjXfsIqYhub3eOSL56YlHfmXbks= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-361-oz1aOL3uPbuuXrW3HLgbfQ-1; Fri, 21 Oct 2022 06:18:13 -0400 X-MC-Unique: oz1aOL3uPbuuXrW3HLgbfQ-1 Received: by mail-wr1-f71.google.com with SMTP id o13-20020adfa10d000000b00232c00377a0so676294wro.13 for ; Fri, 21 Oct 2022 03:18:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=NPkjQ5gJeqFcNbmHMFmugRV0TbKd9OVS/vY9UX71k1w=; b=XWY8RllXnMFW5lqFB0gAiceujtun2KXZHjCbmFKcVRQzkdtp6Lz+4C+Wr6244qh210 FXGmNVGeh/HKtTwDjr/fOIAv346pDKQxkmKrrReTTlifP15wyP7uANfDmfDhKoO/7xBo pfH9b4YgagU5BH3egN+KvmNSNNxwlm2Ms5PnUkNt2B9SBeTv8+PcvDejnyDOOVS16wwd 5MlYVXFUz+vj5yIetRJVDpmeBEvjOHqDSzjcosFNSPqDMCeJC62pC2VlMwCBZ5yecVPG LeSw1eOD5A9FKTKt+FIX70251YGrvF17UPr4UF+vAaByputmIfYMY1iOmCV5JLaQfdLK Xqtw== X-Gm-Message-State: ACrzQf0pS722Ys1jnfV12GsS9oiH1SpUGjvZ/gUb5TOGS6/+pIZ2I5+C ZYLm/qfcm+WSPxSWcbLqzC51AymM0SW1E32Bn/3o+bSoVqSzL5dx3oWz0qC4kTyT3XQWsXD38aS lM2J9VIvaZ5c= X-Received: by 2002:a05:6000:186e:b0:22e:5dd3:e32a with SMTP id d14-20020a056000186e00b0022e5dd3e32amr11636818wri.167.1666347492407; Fri, 21 Oct 2022 03:18:12 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5jnfoq3jKrac0Ke1UOkfG/iNPScqM4JMpvllN5SPCu9U75sfif2BMK1Y/1rhRnJlNd5WNqmg== X-Received: by 2002:a05:6000:186e:b0:22e:5dd3:e32a with SMTP id d14-20020a056000186e00b0022e5dd3e32amr11636796wri.167.1666347492076; Fri, 21 Oct 2022 03:18:12 -0700 (PDT) Received: from ?IPV6:2003:cb:c708:1700:e40d:574c:c991:5f78? (p200300cbc7081700e40d574cc9915f78.dip0.t-ipconnect.de. [2003:cb:c708:1700:e40d:574c:c991:5f78]) by smtp.gmail.com with ESMTPSA id f7-20020adfc987000000b0022e04bfa661sm18716200wrh.59.2022.10.21.03.18.11 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 21 Oct 2022 03:18:11 -0700 (PDT) Message-ID: <6eea25bf-08a8-641e-2360-68884e194608@redhat.com> Date: Fri, 21 Oct 2022 12:18:10 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.1 Subject: Re: [PATCH v3 0/5] ksm: support tracking KSM-placed zero-pages To: Andrew Morton , xu xin Cc: imbrenda@linux.ibm.com, jiang.xuexin@zte.com.cn, linux-kernel@vger.kernel.org, linux-mm@kvack.org, ran.xiaokai@zte.com.cn, xu.xin16@zte.com.cn, yang.yang29@zte.com.cn References: <20221017165541.6e2d3cebdc1ba13861ea4b2b@linux-foundation.org> <20221018090022.373574-1-xu.xin16@zte.com.cn> <20221018155407.41c993924ec09a64ae966d50@linux-foundation.org> From: David Hildenbrand Organization: Red Hat In-Reply-To: <20221018155407.41c993924ec09a64ae966d50@linux-foundation.org> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1666347495; a=rsa-sha256; cv=none; b=EKPTEqypFYwZw18con4djLPG5I4SSmQvYTChb9ICov5qUin5drqVd4iFXT62Cx2vITdIi/ WhxU1/Vb1pKu1Fgj2toMWxtqj76GExMgN/FqYK71LdLdKRpW1ufnGlh8OXO1sgFmxD7CIP Fl4kS74T0w4yV16veYjBhYxzulbToXA= ARC-Authentication-Results: i=1; imf09.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b="g/DOmHeQ"; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf09.hostedemail.com: domain of david@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=david@redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1666347495; 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:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=NPkjQ5gJeqFcNbmHMFmugRV0TbKd9OVS/vY9UX71k1w=; b=N1JwE4gD4tNI94h5XEVIRiKwtaOkY17lH5ppGnkflPadrVtxoqT/C/g39bzo+PPCX59LOs RdeI07rngt99eQSuR8Sclh7qz/x+fHBqe6GqFeqhmlv2KTKpcDSDNLiER6/VuaBlBRudQa dJi6nnIjJQXEYzJeJgKpIVgxisxxT3Q= Authentication-Results: imf09.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b="g/DOmHeQ"; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf09.hostedemail.com: domain of david@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=david@redhat.com X-Rspamd-Server: rspam04 X-Rspam-User: X-Stat-Signature: ac4jfu86aa7yred6i33y8j8ci1r8apo9 X-Rspamd-Queue-Id: 3092C140010 X-HE-Tag: 1666347495-447044 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 19.10.22 00:54, Andrew Morton wrote: > On Tue, 18 Oct 2022 09:00:22 +0000 xu xin wrote: > >>> 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. Having that said, I think we really want a second pair of (KSM-expert) eyes on these changes before moving forward with them. -- Thanks, David / dhildenb