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=-0.8 required=3.0 tests=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 86B92ECE596 for ; Wed, 9 Oct 2019 16:35:21 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 55562206BB for ; Wed, 9 Oct 2019 16:35:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 55562206BB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id E6DA78E0005; Wed, 9 Oct 2019 12:35:20 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E1E2A8E0003; Wed, 9 Oct 2019 12:35:20 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D0CB68E0005; Wed, 9 Oct 2019 12:35:20 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0198.hostedemail.com [216.40.44.198]) by kanga.kvack.org (Postfix) with ESMTP id B00118E0003 for ; Wed, 9 Oct 2019 12:35:20 -0400 (EDT) Received: from smtpin20.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with SMTP id 662366894 for ; Wed, 9 Oct 2019 16:35:20 +0000 (UTC) X-FDA: 76024796400.20.food51_85c691ddf9e5f X-HE-Tag: food51_85c691ddf9e5f X-Filterd-Recvd-Size: 6939 Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by imf07.hostedemail.com (Postfix) with ESMTP for ; Wed, 9 Oct 2019 16:35:19 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Oct 2019 09:35:17 -0700 X-IronPort-AV: E=Sophos;i="5.67,276,1566889200"; d="scan'208";a="187670690" Received: from ahduyck-desk1.jf.intel.com ([10.7.198.76]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Oct 2019 09:35:17 -0700 Message-ID: <22ce946f7a5cf0b7b4c8058c400d8b9b4c63a5a5.camel@linux.intel.com> Subject: Re: [PATCH v11 0/6] mm / virtio: Provide support for unused page reporting From: Alexander Duyck To: Nitesh Narayan Lal , Dave Hansen , Michal Hocko , Mel Gorman , Andrew Morton , Vlastimil Babka Cc: LKML , linux-mm , Alexander Duyck , David Hildenbrand , kvm list , "Michael S. Tsirkin" , Matthew Wilcox , Oscar Salvador , Yang Zhang , Pankaj Gupta , Konrad Rzeszutek Wilk , Rik van Riel , lcapitulino@redhat.com, "Wang, Wei W" , Andrea Arcangeli , Paolo Bonzini , Dan Williams Date: Wed, 09 Oct 2019 09:35:17 -0700 In-Reply-To: <5c640ecb-cfef-2fa6-57aa-1352f1036f4e@redhat.com> References: <20191001152441.27008.99285.stgit@localhost.localdomain> <7233498c-2f64-d661-4981-707b59c78fd5@redhat.com> <1ea1a4e11617291062db81f65745b9c95fd0bb30.camel@linux.intel.com> <8bd303a6-6e50-b2dc-19ab-4c3f176c4b02@redhat.com> <0a16b11e-ec3b-7196-5b7f-e7395876cf28@redhat.com> <7fc13837-546c-9c4a-1456-753df199e171@redhat.com> <5b6e0b6df46c03bfac906313071ac0362d43c432.camel@linux.intel.com> <5c640ecb-cfef-2fa6-57aa-1352f1036f4e@redhat.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.30.5 (3.30.5-1.fc29) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 Wed, 2019-10-09 at 11:21 -0400, Nitesh Narayan Lal wrote: > On 10/7/19 1:06 PM, Nitesh Narayan Lal wrote: > [...] > > > So what was the size of your guest? One thing that just occurred to me is > > > that you might be running a much smaller guest than I was. > > I am running a 30 GB guest. > > > > > > > If so I would have expected a much higher difference versus > > > > > baseline as zeroing/faulting the pages in the host gets expensive fairly > > > > > quick. What is the host kernel you are running your test on? I'm just > > > > > wondering if there is some additional overhead currently limiting your > > > > > setup. My host kernel was just the same kernel I was running in the guest, > > > > > just built without the patches applied. > > > > Right now I have a different host-kernel. I can install the same kernel to the > > > > host as well and see if that changes anything. > > > The host kernel will have a fairly significant impact as I recall. For > > > example running a stock CentOS kernel lowered the performance compared to > > > running a linux-next kernel. As a result the numbers looked better since > > > the overall baseline was lower to begin with as the host OS was > > > introducing additional overhead. > > I see in that case I will try by installing the same guest kernel > > to the host as well. > > As per your suggestion, I tried replacing the host kernel with an > upstream kernel without my patches i.e., my host has a kernel built on top > of the upstream kernel's master branch which has Sept 23rd commit and the guest > has the same kernel for the no-hinting case and same kernel + my patches > for the page reporting case. > > With the changes reported earlier on top of v12, I am not seeing any further > degradation (other than what I have previously reported). > > To be sure that THP is actively used, I did an experiment where I changed the > MEMSIZE in the page_fault. On doing so THP usage checked via /proc/meminfo also > increased as I expected. > > In any case, if you find something else please let me know and I will look into it > again. > > > I am still looking into your suggestion about cache line bouncing and will reply > to it, if I have more questions. > > > [...] I really feel like this discussion has gone off course. The idea here is to review this patch set[1] and provide working alternatives if there are issues with the current approach. The bitmap based approach still has a number of outstanding issues including sparse memory and hotplug which have yet to be addressed. We can gloss over that, but there is a good chance that resolving those would have potential performance implications. With this most recent change there is now also the fact that it can only really support reporting at one page order so the solution is now much more prone to issues with memory fragmentation than it was before. I would consider the fact that my solution works with multiple page orders while the bitmap approach requires MAX_ORDER - 1 seems like another obvious win for my solution. Until we can get back to the point where we are comparing apples to apples I would prefer not to benchmark the bitmap solution as without the extra order limitation it was over 20% worse then my solution performance wise. Ideally I would like to get code review for patches 3 and 4, and spend my time addressing issues reported there. The main things I need input on is if the solution of allowing the list iterators to be reset is good enough to address the compaction issues that were pointed out several releases ago or if I have to look for another solution. Also I have changed things so that page_reporting.h was split over two files with the new one now living in the mm/ folder. By doing that I was hoping to reduce the exposure of the internal state of the free-lists so that essentially all we end up providing is an interface for the notifier to be used by virtio- balloon. Thanks. - Alex [1]: https://lore.kernel.org/lkml/20191001152441.27008.99285.stgit@localhost.localdomain/ 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=-0.8 required=3.0 tests=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 B70F6C4360C for ; Sun, 13 Oct 2019 00:11:53 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 15B302067B for ; Sun, 13 Oct 2019 00:11:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 15B302067B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 5A1768E0001; Sat, 12 Oct 2019 20:11:52 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 550646B0005; Sat, 12 Oct 2019 20:11:52 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3A39E8E0001; Sat, 12 Oct 2019 20:11:52 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0103.hostedemail.com [216.40.44.103]) by kanga.kvack.org (Postfix) with ESMTP id 0E56C6B0003 for ; Sat, 12 Oct 2019 20:11:52 -0400 (EDT) Received: from smtpin08.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with SMTP id BAA72181AEF30 for ; Sun, 13 Oct 2019 00:11:51 +0000 (UTC) X-FDA: 76036833222.08.meal39_4a56c7dd47309 X-HE-Tag: meal39_4a56c7dd47309 X-Filterd-Recvd-Size: 16897 Received: from listssympa-test.colorado.edu (listssympa-test.colorado.edu [128.138.129.156]) by imf08.hostedemail.com (Postfix) with ESMTP for ; Sun, 13 Oct 2019 00:11:50 +0000 (UTC) Received: from listssympa-test.colorado.edu (localhost [127.0.0.1]) by listssympa-test.colorado.edu (8.15.2/8.15.2/MJC-8.0/sympa) with ESMTPS id x9D0BfSK022371 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 12 Oct 2019 18:11:41 -0600 Received: (from root@localhost) by listssympa-test.colorado.edu (8.15.2/8.15.2/MJC-8.0/submit) id x9D0Bfcx022351; Sat, 12 Oct 2019 18:11:41 -0600 Received: from BYAPR03MB4149.namprd03.prod.outlook.com (2603:10b6:a03:80::17) by BYAPR03MB4376.namprd03.prod.outlook.com with HTTPS via BYAPR11CA0040.NAMPRD11.PROD.OUTLOOK.COM; Wed, 9 Oct 2019 18:53:17 +0000 Received: from BN6PR03CA0087.namprd03.prod.outlook.com (2603:10b6:405:6f::25) by BYAPR03MB4149.namprd03.prod.outlook.com (2603:10b6:a03:7c::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2347.16; Wed, 9 Oct 2019 17:51:00 +0000 Received: from BY2NAM01FT047.eop-nam01.prod.protection.outlook.com (2a01:111:f400:7e42::201) by BN6PR03CA0087.outlook.office365.com (2603:10b6:405:6f::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2347.16 via Frontend Transport; Wed, 9 Oct 2019 17:51:00 +0000 Received: from ipmx3.colorado.edu (128.138.67.74) by BY2NAM01FT047.mail.protection.outlook.com (10.152.68.243) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2347.16 via Frontend Transport; Wed, 9 Oct 2019 17:51:00 +0000 Received: from mx.colorado.edu ([128.138.67.77]) by mx.colorado.edu with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Oct 2019 11:06:16 -0600 Received: from vger.kernel.org ([209.132.180.67]) by mx.colorado.edu with ESMTP; 09 Oct 2019 10:35:20 -0600 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731747AbfJIQfT (ORCPT ); Wed, 9 Oct 2019 12:35:19 -0400 Received: from mga14.intel.com ([192.55.52.115]:46952 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730490AbfJIQfT (ORCPT ); Wed, 9 Oct 2019 12:35:19 -0400 Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Oct 2019 09:35:18 -0700 Received: from ahduyck-desk1.jf.intel.com ([10.7.198.76]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Oct 2019 09:35:17 -0700 Authentication-Results: spf=none (sender IP is 128.138.67.74) smtp.mailfrom=vger.kernel.org; o365.colorado.edu; dkim=none (message not signed) header.d=none;o365.colorado.edu; dmarc=fail action=none header.from=linux.intel.com; Received-SPF: None (protection.outlook.com: vger.kernel.org does not designate permitted sender hosts) Authentication-Results-Original: mx.colorado.edu; dkim=none (message not signed) header.i=none IronPort-SDR: LCjxxHER9ZCaj0L0KC9NAg4sZWbPAmm32LANb2ytFvr12dSxCOZaKPfx+adoJLJmWeyuhBo2tj Y6DvQhplbMXkTFdxV8k6EeFupfHiDxoa4= IronPort-SDR: HB2139CZHQPx8jlzfh0165mLc1GkM/UqEdIsJfQjXfSQTDhSTApSWbKxtpj1EUKGyM6dRZrk34 J0NTo+rHPkO+yHOAItXHs72ViNSa4hqkc= IronPort-PHdr: =?us-ascii?q?9a23=3AMCEGdxCyoHAx/3x8Lju6UyQJPHJ1kqjoPgMT9p?= =?us-ascii?q?ssgq5PdaLmxZn5IUjD/qs03lrZG47c7/VegubR9a3sRD9I7ZWAtSUEd5pBH1?= =?us-ascii?q?8AhN4NlgMtSMiCFQXgLfHsYiB7VMRPXVNo5Te6ZE5SHsvz?= IronPort-PHdr: =?us-ascii?q?9a23=3Ag7SI2B/Zuir1u/9uRHGN80YQeigqvan1NQcJ65?= =?us-ascii?q?0hzohDabmn44+8ZR7a9bNmi1vOR4zX7LRJh/eF+6zjWGlV55GHvThCdZFXTB?= =?us-ascii?q?YKhI0QmBBoG8+KD0D3bbbqYiU2Ed4EVQpj+He2PA=3D=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0GHDABLGZ5dYU1DioBlHAEBAQEBBwE?= =?us-ascii?q?BEQEEBAEBgXuBbywFJAJGVDEqhCOOXCqBZZk/gV8RAQEBAQEBAQEBCBgNCAI?= =?us-ascii?q?BAQEBhxAjOBMCAwkBAQEDAQEBAgEFAgEBAgIDGBYGhV8Mg0ZrAQEBAQEBAQE?= =?us-ascii?q?BAQEBAQEBAQEBARYCDVRkAQUBAiBWBgkBAQoYAgImAgIDVAYBEgUWA4MFgnc?= =?us-ascii?q?PsE2BMoQMASsBgRWDLIFCBiBsKIwOe4Ecg241PoJIgWWDJYJeBI80hnNEh2W?= =?us-ascii?q?OcweCJWqGHoUYiHkbgjqHTo84ji2HYEKRPIFpgXszGiNQgm0RAT0QFIFbF4h?= =?us-ascii?q?khQgBViIBMgEBAYEEkBMBAQ?= X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0GwCgBiEp5dh0O0hNFlHAEBAQEBBwE?= =?us-ascii?q?BEQEEBAEBgXuBbyxwUwExKoQjjlsqgWUUmSuBXxEBAQEBAQEBAQEIGA0HAQI?= =?us-ascii?q?BAQEBhxAjOBMCAwkBAQEDAQEBAgEFAgEBAgIQAQEBCgsJCCmFNAyDRmsBAQE?= =?us-ascii?q?BAQEBAQEBAQEBAQEBAQEBFgINVGQBAgMBAiBWBgkBAQoYAgImAgIDVAYBEgU?= =?us-ascii?q?WA4MEAYIKD7BUgTKEDAErAYEVgyyBQgaBDCiMDnuBHINuNT6CSIFlgyWCWAS?= =?us-ascii?q?PNIZzRIdljnMHgiVqhh6FGIh5G4I6h06POI4th2BCkTyBaYF7MxojUIJtEQE?= =?us-ascii?q?9EBSBWxeIZIUIAVYhAQEyAQEBgQIBAZNdAQE?= X-IPAS-Result: =?us-ascii?q?A0GHDABLGZ5dYU1DioBlHAEBAQEBBwEBEQEEBAEBgXuBb?= =?us-ascii?q?ywFJAJGVDEqhCOOXCqBZZk/gV8RAQEBAQEBAQEBCBgNCAIBAQEBhxAjOBMCA?= =?us-ascii?q?wkBAQEDAQEBAgEFAgEBAgIDGBYGhV8Mg0ZrAQEBAQEBAQEBAQEBAQEBAQEBA?= =?us-ascii?q?RYCDVRkAQUBAiBWBgkBAQoYAgImAgIDVAYBEgUWA4MFgncPsE2BMoQMASsBg?= =?us-ascii?q?RWDLIFCBiBsKIwOe4Ecg241PoJIgWWDJYJeBI80hnNEh2WOcweCJWqGHoUYi?= =?us-ascii?q?HkbgjqHTo84ji2HYEKRPIFpgXszGiNQgm0RAT0QFIFbF4hkhQgBViIBMgEBA?= =?us-ascii?q?YEEkBMBAQ?= X-IPAS-Result: =?us-ascii?q?A0GwCgBiEp5dh0O0hNFlHAEBAQEBBwEBEQEEBAEBgXuBb?= =?us-ascii?q?yxwUwExKoQjjlsqgWUUmSuBXxEBAQEBAQEBAQEIGA0HAQIBAQEBhxAjOBMCA?= =?us-ascii?q?wkBAQEDAQEBAgEFAgEBAgIQAQEBCgsJCCmFNAyDRmsBAQEBAQEBAQEBAQEBA?= =?us-ascii?q?QEBAQEBFgINVGQBAgMBAiBWBgkBAQoYAgImAgIDVAYBEgUWA4MEAYIKD7BUg?= =?us-ascii?q?TKEDAErAYEVgyyBQgaBDCiMDnuBHINuNT6CSIFlgyWCWASPNIZzRIdljnMHg?= =?us-ascii?q?iVqhh6FGIh5G4I6h06POI4th2BCkTyBaYF7MxojUIJtEQE9EBSBWxeIZIUIA?= =?us-ascii?q?VYhAQEyAQEBgQIBAZNdAQE?= X-IronPort-AV: E=Sophos;i="5.67,277,1566885600"; d="scan'208";a="369360839" X-IronPort-AV: E=Sophos;i="5.67,276,1566885600"; d="scan'208";a="369283425" X-IronPort-AV: E=Sophos;i="5.67,276,1566889200"; d="scan'208";a="187670690" X-IronPort-Outbreak-Status: No, level 0, Unknown - Unknown X-IronPort-Outbreak-Status: No, level 0, Unknown - Unknown X-Original-Recipients: migi9492@g.colorado.edu X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Message-ID: <22ce946f7a5cf0b7b4c8058c400d8b9b4c63a5a5.camel@linux.intel.com> Subject: Re: [PATCH v11 0/6] mm / virtio: Provide support for unused page reporting From: "Alexander Duyck" To: "Nitesh Narayan Lal" , "Dave Hansen" , "Michal Hocko" , "Mel Gorman" , "Andrew Morton" , "Vlastimil Babka" Cc: LKML , linux-mm , "Alexander Duyck" , "David Hildenbrand" , "kvm list" , "Michael S. Tsirkin" , "Matthew Wilcox" , "Oscar Salvador" , "Yang Zhang" , "Pankaj Gupta" , "Konrad Rzeszutek Wilk" , "Rik van Riel" , "lcapitulino@redhat.com" , "Wang, Wei W" , "Andrea Arcangeli" , "Paolo Bonzini" , "Dan Williams" Date: Wed, 09 Oct 2019 09:35:17 -0700 In-Reply-To: <5c640ecb-cfef-2fa6-57aa-1352f1036f4e@redhat.com> References: <20191001152441.27008.99285.stgit@localhost.localdomain> <7233498c-2f64-d661-4981-707b59c78fd5@redhat.com> <1ea1a4e11617291062db81f65745b9c95fd0bb30.camel@linux.intel.com> <8bd303a6-6e50-b2dc-19ab-4c3f176c4b02@redhat.com> <0a16b11e-ec3b-7196-5b7f-e7395876cf28@redhat.com> <7fc13837-546c-9c4a-1456-753df199e171@redhat.com> <5b6e0b6df46c03bfac906313071ac0362d43c432.camel@linux.intel.com> <5c640ecb-cfef-2fa6-57aa-1352f1036f4e@redhat.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.30.5 (3.30.5-1.fc29) MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-MS-Exchange-Organization-ExpirationStartTime: 09 Oct 2019 17:51:00.3671 (UTC) X-MS-Exchange-Organization-ExpirationStartTimeReason: OriginalSubmit X-MS-Exchange-Organization-ExpirationInterval: 1:00:00:00.0000000 X-MS-Exchange-Organization-ExpirationIntervalReason: OriginalSubmit X-MS-Exchange-Organization-Network-Message-Id: edbee148-01a7-49f8-e118-08d74ce13ef2 X-EOPAttributedMessage: 0 X-MS-Exchange-Organization-MessageDirectionality: Originating X-Forefront-Antispam-Report: CIP:128.138.67.74;IPV:CAL;CTRY:US;EFV:NLI;SFV:SKN;SFS:;DIR:INB;SFP:;SCL:-1;SRVR:BYAPR03MB4149;H:ipmx3.colorado.edu;FPR:;SPF:None;LANG:en;;SKIP:1; X-MS-Exchange-Organization-AuthSource: BY2NAM01FT047.eop-nam01.prod.protection.outlook.com X-MS-Exchange-Organization-AuthAs: Anonymous X-OriginatorOrg: colorado.edu X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: edbee148-01a7-49f8-e118-08d74ce13ef2 X-MS-TrafficTypeDiagnostic: BYAPR03MB4149:|BYAPR03MB4149: X-MS-Exchange-PUrlCount: 1 X-MS-Exchange-Organization-SCL: -1 X-MS-Oob-TLC-OOBClassifiers: OLM:10000; X-Microsoft-Antispam: BCL:0; X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Oct 2019 17:51:00.1279 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: edbee148-01a7-49f8-e118-08d74ce13ef2 X-MS-Exchange-CrossTenant-Id: 3ded8b1b-070d-4629-82e4-c0b019f46057 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3ded8b1b-070d-4629-82e4-c0b019f46057;Ip=[128.138.67.74];Helo=[ipmx3.colorado.edu] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR03MB4149 X-MS-Exchange-Transport-EndToEndLatency: 01:02:17.7022146 X-MS-Exchange-Processed-By-BccFoldering: 15.20.2347.014 X-Microsoft-Antispam-Mailbox-Delivery: ucf:0;jmr:0;ex:0;auth:0;dest:I;ENG:(750127)(520002050)(944506383)(944626516); X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?3P35bkSjJgE/ifnqMoFI5CnwQ47lZ58tCYnLlIdojKTIld8HHThesbALSB/Q?= =?us-ascii?Q?7Si5A2U0BmgGB2JYHbDNekg/dYWHOwA8BXqXjN1UbzDY4q9k8JAdT5WLgVqI?= =?us-ascii?Q?1Cbk5Pbfg10ZhmaXYOAqOWsMidXdHCOk/CvdpJtLry0p2zcB/rgqk5w+dZcY?= =?us-ascii?Q?z8OsrjOB1W9YtVQVwRy18IoYdoi6kprNgVJhOJSMpYjdy+PN9YWGdomvdLkT?= =?us-ascii?Q?JO4BJj+T/lGjAvkc/iJ1+OgdeFiCzNty+zpHCfnzYil/NaodKTk8CIo4d/Dx?= =?us-ascii?Q?GQnPrXMiIm3x+OeePzU0pwNGsvqZpHlSiRayiZSMJOJxCPUSZLYSA3ItmPXs?= =?us-ascii?Q?LyBZI6uoAfKRL96GQQIcEUhpFddZBDrEqqWYNZ+eabW3l8IzYlvkl7mI+fAN?= =?us-ascii?Q?MZNZilLkSysTrw8gaCah3gdin3CHnbo0pxHfEsEa7cn4OUYMmuZxbC1XM2VT?= =?us-ascii?Q?zdAf8sZBiA1/9jaZxTbpuowFt5Td9GP7O84DWMJBckqFEpcX80sjViwUrWjq?= =?us-ascii?Q?cMY2EAqeSOqhaYHPGvYTfFO08ccPq/C/bX+HSYzuV5fmF1ACCMi38L7MDkkx?= =?us-ascii?Q?Tv4wc/OJiszuUPwqPWPQsiaR94EQ3CjMqNb7fWD0C6/8fHPMlrRRl0x4BTdq?= =?us-ascii?Q?dpuodDb6f8I+P+oQIqlejLAFT4Qy3TLwO5cOIK3+skqSDwPSLeX80SSoaey0?= =?us-ascii?Q?xb7yqWEVuuvxJ9Lwn+c72pN+Ka5C0JPPFkthSH8RCtJ5Mhf4+PyOmYYcZ3rY?= =?us-ascii?Q?dC7sZ5pgEOFY764FiapVB4wPSgQpZFbiqfT12j4sHnUMtVgGuoI9sLcssUtk?= =?us-ascii?Q?KFygjzAyLIZmHgYdHrtbnffC4pUi3PFRzW3CRVJLLhoNDqFLFkMddvMR2xf1?= =?us-ascii?Q?1ZMfeiqVfzE6AIXZRDwm6l8TQ6I/+YEXQKNqDXrx63kXCtVC5Itpvim5UR5b?= =?us-ascii?Q?6zoeS7kL4trX2CX+q3GrB6LRirG8cKTsx7wG11ZHwqEWmHDD/od9RjvRTUzJ?= =?us-ascii?Q?DkcLgFJVNcExv6R0O6i0OmQubvGBtuZ692KDK9sWm507OlqiRNiplrIlYTIB?= =?us-ascii?Q?eYHwxL1G9WDc3p0UjCiL+23yv1/BryzsqhUH+lpVxUkcl4nkwAjR/wY4OXHV?= =?us-ascii?Q?gtzXd7LZG/cUUnQjOUv08gKhmA4W6O0KX13VO1URdbRjjc580G3BewYWBhyM?= =?us-ascii?Q?PrrhQKECA86fl5+b?= 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: Message-ID: <20191009163517.tDoGbGb6keDgbdYGyssU8JYe7qoLNrFSBRKLRS8peSw@z> On Wed, 2019-10-09 at 11:21 -0400, Nitesh Narayan Lal wrote: > On 10/7/19 1:06 PM, Nitesh Narayan Lal wrote: > [=2E=2E=2E] > > > So what was the size of your guest? One thing that just occurred to m= e is > > > that you might be running a much smaller guest than I was=2E > > I am running a 30 GB guest=2E > >=20 > > > > > If so I would have expected a much higher difference versus > > > > > baseline as zeroing/faulting the pages in the host gets expensive= fairly > > > > > quick=2E What is the host kernel you are running your test on? I'= m just > > > > > wondering if there is some additional overhead currently limiting= your > > > > > setup=2E My host kernel was just the same kernel I was running in= the guest, > > > > > just built without the patches applied=2E > > > > Right now I have a different host-kernel=2E I can install the same = kernel to the > > > > host as well and see if that changes anything=2E > > > The host kernel will have a fairly significant impact as I recall=2E = For > > > example running a stock CentOS kernel lowered the performance compare= d to > > > running a linux-next kernel=2E As a result the numbers looked better = since > > > the overall baseline was lower to begin with as the host OS was > > > introducing additional overhead=2E > > I see in that case I will try by installing the same guest kernel > > to the host as well=2E >=20 > As per your suggestion, I tried replacing the host kernel with an > upstream kernel without my patches i=2Ee=2E, my host has a kernel built o= n top > of the upstream kernel's master branch which has Sept 23rd commit and the= guest > has the same kernel for the no-hinting case and same kernel + my patches > for the page reporting case=2E >=20 > With the changes reported earlier on top of v12, I am not seeing any furt= her > degradation (other than what I have previously reported)=2E >=20 > To be sure that THP is actively used, I did an experiment where I changed= the > MEMSIZE in the page_fault=2E On doing so THP usage checked via /proc/memi= nfo also > increased as I expected=2E >=20 > In any case, if you find something else please let me know and I will loo= k into it > again=2E >=20 >=20 > I am still looking into your suggestion about cache line bouncing and wil= l reply > to it, if I have more questions=2E >=20 >=20 > [=2E=2E=2E] I really feel like this discussion has gone off course=2E The idea here is to review this patch set[1] and provide working alternatives if there are issues with the current approach=2E The bitmap based approach still has a number of outstanding issues including sparse memory and hotplug which have yet to be addressed=2E We ca= n gloss over that, but there is a good chance that resolving those would have potential performance implications=2E With this most recent change there is now also the fact that it can only really support reporting at one page order so the solution is now much more prone to issues with memory fragmentation than it was before=2E I would consider the fact that m= y solution works with multiple page orders while the bitmap approach requires MAX_ORDER - 1 seems like another obvious win for my solution=2E Until we can get back to the point where we are comparing apples to apples I would prefer not to benchmark the bitmap solution as without the extra order limitation it was over 20% worse then my solution performance wise=2E Ideally I would like to get code review for patches 3 and 4, and spend my time addressing issues reported there=2E The main things I need input on is= if the solution of allowing the list iterators to be reset is good enough to address the compaction issues that were pointed out several releases ago or if I have to look for another solution=2E Also I have changed things= so that page_reporting=2Eh was split over two files with the new one now living in the mm/ folder=2E By doing that I was hoping to reduce the exposure of the internal state of the free-lists so that essentially all we end up providing is an interface for the notifier to be used by virtio- balloon=2E Thanks=2E - Alex [1]: https://lore=2Ekernel=2Eorg/lkml/20191001152441=2E27008=2E99285=2Estgi= t@localhost=2Elocaldomain/