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=-3.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no 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 E4F72C433E1 for ; Thu, 13 Aug 2020 22:31:36 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id A3D74204EC for ; Thu, 13 Aug 2020 22:31:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="tBYIOZQE" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A3D74204EC Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 4B31E8D0003; Thu, 13 Aug 2020 18:31:36 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 4627D8D0002; Thu, 13 Aug 2020 18:31:36 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 378718D0003; Thu, 13 Aug 2020 18:31:36 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0020.hostedemail.com [216.40.44.20]) by kanga.kvack.org (Postfix) with ESMTP id 22A008D0002 for ; Thu, 13 Aug 2020 18:31:36 -0400 (EDT) Received: from smtpin02.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id D9DE8281F for ; Thu, 13 Aug 2020 22:31:35 +0000 (UTC) X-FDA: 77146993350.02.snow73_0507cd126ff7 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin02.hostedemail.com (Postfix) with ESMTP id B293010096C4F for ; Thu, 13 Aug 2020 22:31:35 +0000 (UTC) X-HE-Tag: snow73_0507cd126ff7 X-Filterd-Recvd-Size: 3424 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf41.hostedemail.com (Postfix) with ESMTP for ; Thu, 13 Aug 2020 22:31:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=lD/OUcP2u22hM6BEeIY+zI9M93BInCc4AiniJIIASME=; b=tBYIOZQEbTH82hCHh9j2ymJj/0 ldkFkIkJPWOtCbHjn3bjAfgyY4MTCyyoh178/YVNg+RBnHD2onFk8zjW9rW+rCWLTaucl08wbJ/6M KTZX/bJU/1CdqT0XwSgZ+Q9OvJX12YQPvWgsxbEp16/qOmXHmxgQUbzCaQWytoxC97BL8DudlVt9V o4G9UmNIR5GhORkyJyV+2Mi3HhYrNalrGxDfDE2pmyRmCf8bH9pByNicHBq1omAFtmJQlTbPTV/PN ppqY6TM+JPzTT1D3ySxg0BIxlco2/Fm6nImrtlf9eOhNS9KkewADyzMwdWuq/clUjX0sZxqEQONt8 HUoqCNuA==; Received: from willy by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1k6Lko-0007Tr-Ql; Thu, 13 Aug 2020 22:31:23 +0000 Date: Thu, 13 Aug 2020 23:31:22 +0100 From: Matthew Wilcox To: Peter Collingbourne Cc: John Hubbard , "Kirill A . Shutemov" , Andrew Morton , Catalin Marinas , Evgenii Stepanov , Linux ARM , linux-mm@kvack.org Subject: Re: [PATCH v2] mm: introduce reference pages Message-ID: <20200813223122.GR17456@casper.infradead.org> References: <20200813220937.40973-1-pcc@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200813220937.40973-1-pcc@google.com> X-Rspamd-Queue-Id: B293010096C4F X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam05 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 Thu, Aug 13, 2020 at 03:09:37PM -0700, Peter Collingbourne wrote: > In order to measure the performance and RSS impact of reference pages, > a version of this patch backported to kernel version 4.14 was tested on > a Pixel 4 together with a modified [2] version of the Scudo allocator > that uses reference pages to implement pattern initialization. A > PDFium test program was used to collect the measurements like so: > > $ wget https://static.docs.arm.com/ddi0487/fb/DDI0487F_b_armv8_arm.pdf > $ /system/bin/time -v ./pdfium_test --pages=1-100 DDI0487F_b_armv8_arm.pdf > > and the median of 100 runs measurement was taken with three variants > of the allocator: > > - "anon" is the baseline (no pattern init) > - "memset" is with pattern init of allocator pages implemented by > initializing anonymous pages with memset > - "refpage" is with pattern init of allocator pages implemented > by creating reference pages > > All three variants are measured using the patch that I linked. "anon" > is without the patch, "refpage" is with the patch and "memset" is > with a previous version of the patch [3] with "#if 0" in place of > "#if 1" in linux.cpp. The measurements are as follows: > > 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. Umm. These numbers aren't all /that/ compelling. memset takes 0.7% longer than the baseline and consumes 4.8% more memory. I was expecting better, to be honest ;-(