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 X-Spam-Level: X-Spam-Status: No, score=-8.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C5ED4C433E1 for ; Tue, 18 Aug 2020 18:25:51 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 8BFF520786 for ; Tue, 18 Aug 2020 18:25:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=nvidia.com header.i=@nvidia.com header.b="XPxZFquO" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8BFF520786 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nvidia.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 137226B0089; Tue, 18 Aug 2020 14:25:51 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 0E8746B008A; Tue, 18 Aug 2020 14:25:51 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id F40F78D0001; Tue, 18 Aug 2020 14:25:50 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0128.hostedemail.com [216.40.44.128]) by kanga.kvack.org (Postfix) with ESMTP id DE0186B0089 for ; Tue, 18 Aug 2020 14:25:50 -0400 (EDT) Received: from smtpin30.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 7B7A03631 for ; Tue, 18 Aug 2020 18:25:50 +0000 (UTC) X-FDA: 77164518060.30.flesh20_53083ca27021 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin30.hostedemail.com (Postfix) with ESMTP id 4935A180B3C83 for ; Tue, 18 Aug 2020 18:25:50 +0000 (UTC) X-HE-Tag: flesh20_53083ca27021 X-Filterd-Recvd-Size: 4356 Received: from hqnvemgate24.nvidia.com (hqnvemgate24.nvidia.com [216.228.121.143]) by imf38.hostedemail.com (Postfix) with ESMTP for ; Tue, 18 Aug 2020 18:25:49 +0000 (UTC) Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate24.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Tue, 18 Aug 2020 11:23:55 -0700 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Tue, 18 Aug 2020 11:25:47 -0700 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Tue, 18 Aug 2020 11:25:47 -0700 Received: from [10.2.49.218] (172.20.13.39) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Tue, 18 Aug 2020 18:25:41 +0000 Subject: Re: [PATCH v3] mm: introduce reference pages To: Matthew Wilcox CC: Peter Collingbourne , "Kirill A . Shutemov" , Andrew Morton , "Catalin Marinas" , Evgenii Stepanov , Linux ARM , , kernel test robot , Linux API , References: <20200814213310.42170-1-pcc@google.com> <20200818030021.GM17456@casper.infradead.org> From: John Hubbard Message-ID: <2ce2125f-5424-63d5-16a2-a4e1da76053e@nvidia.com> Date: Tue, 18 Aug 2020 11:25:41 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 In-Reply-To: <20200818030021.GM17456@casper.infradead.org> X-Originating-IP: [172.20.13.39] X-ClientProxiedBy: HQMAIL107.nvidia.com (172.20.187.13) To HQMAIL107.nvidia.com (172.20.187.13) Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1597775035; bh=jd+8W6y4hx20CWRRPjc9DIa9OXmFSc2Rf98XZmP8xww=; h=X-PGP-Universal:Subject:To:CC:References:From:Message-ID:Date: User-Agent:MIME-Version:In-Reply-To:X-Originating-IP: X-ClientProxiedBy:Content-Type:Content-Language: Content-Transfer-Encoding; b=XPxZFquO6BA6KLKmkHcIXEzKU+w0/Z7CJ2gDt4x9bphHOp0pwo5wp/7UhFNawwH/M 2CSyfcoU5dXekP7VsUXq2QJZKo4ZanGXOHJZbnK+227dIbVQ/ovTWGLq6deB1aQTSy qpkYeH/D5GaYNbMKh78UtGu8oIz04jXfPNhG9aU0gKZbjyruzLN1/t0YilbMEpGvnb i687cd/itAIwFaJJ9sSJIiOX8AnynXiVcBDokebWBQe4xykp/ntpZ/ahrhwIdsNh9E GgZMamtCgCQ0bR/nhzOhAEtckrAkBSIDv4ptpsAEsCCCURchgRx/RoyA88KJbvwdoU 1N7jTgGcb9QNQ== X-Rspamd-Queue-Id: 4935A180B3C83 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam03 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 8/17/20 8:00 PM, Matthew Wilcox wrote: > On Mon, Aug 17, 2020 at 07:31:39PM -0700, John Hubbard wrote: >>> Real time (s) Max RSS (KiB) >>> anon 2.237081 107088 >>> memset 2.252241 112180 >>> refpage 2.243786 107128 >>> >>> We can see that RSS for refpage is almost the same as anon, and real >>> time overhead is 44% that of memset. >>> >> >> Are some of the numbers stale, maybe? Try as I might, I cannot combine >> anything above to come up with 44%. :) > > You're not trying hard enough ;-) > > (2.252241 - 2.237081) / 2.237081 = .00677668801442594166 > (2.243786 - 2.237081) / 2.237081 = .00299720930981041812 > .00299720930981041812 / .00677668801442594166 = .44228232189973614648 > > tadaa! haha, OK then! :) Next time I may try harder, but on the other hand my interpretation of the results is still "this is a small effect", even if there is a way to make it sound large by comparing the 3rd significant digits of the results... > > As I said last time this was posted, I'm just not excited by this. We go > from having a 0.68% time overhead down to an 0.30% overhead, which just > doesn't move the needle for me. Maybe there's a better benchmark than > this to show benefits from this patchset. > Yes, I wonder if there is an artificial workload that just uses refpages really extensively, maybe we can get some good solid improvements shown with that? Otherwise, it seems like we've just learned that memset is actually pretty good in this case. :) thanks, -- John Hubbard NVIDIA