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=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 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 D9958C4338F for ; Tue, 10 Aug 2021 21:20:14 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 7132760F55 for ; Tue, 10 Aug 2021 21:20:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 7132760F55 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=kvack.org Received: by kanga.kvack.org (Postfix) id E51FD8D0005; Tue, 10 Aug 2021 17:20:13 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E01C16B0072; Tue, 10 Aug 2021 17:20:13 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D184E8D0005; Tue, 10 Aug 2021 17:20:13 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0230.hostedemail.com [216.40.44.230]) by kanga.kvack.org (Postfix) with ESMTP id B903D6B0071 for ; Tue, 10 Aug 2021 17:20:13 -0400 (EDT) Received: from smtpin05.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 6250F2311B for ; Tue, 10 Aug 2021 21:20:13 +0000 (UTC) X-FDA: 78460439106.05.CDA48C5 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by imf27.hostedemail.com (Postfix) with ESMTP id DEEFD7008033 for ; Tue, 10 Aug 2021 21:20:11 +0000 (UTC) X-IronPort-AV: E=McAfee;i="6200,9189,10072"; a="214983546" X-IronPort-AV: E=Sophos;i="5.84,310,1620716400"; d="scan'208";a="214983546" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Aug 2021 14:20:10 -0700 X-IronPort-AV: E=Sophos;i="5.84,310,1620716400"; d="scan'208";a="515987352" Received: from akleen-mobl1.amr.corp.intel.com (HELO [10.209.69.62]) ([10.209.69.62]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Aug 2021 14:20:09 -0700 Subject: Re: [PATCH 1/5] mm: Add support for unaccepted memory To: Dave Hansen , "Kirill A. Shutemov" , Borislav Petkov , Andy Lutomirski , Sean Christopherson , Andrew Morton , Joerg Roedel Cc: Kuppuswamy Sathyanarayanan , David Rientjes , Vlastimil Babka , Tom Lendacky , Thomas Gleixner , Peter Zijlstra , Paolo Bonzini , Ingo Molnar , Varad Gautam , Dario Faggioli , x86@kernel.org, linux-mm@kvack.org, linux-coco@lists.linux.dev, linux-kernel@vger.kernel.org, "Kirill A. Shutemov" References: <20210810062626.1012-1-kirill.shutemov@linux.intel.com> <20210810062626.1012-2-kirill.shutemov@linux.intel.com> <9748c07c-4e59-89d0-f425-c57f778d1b42@linux.intel.com> <17b6a3a3-bd7d-f57e-8762-96258b16247a@intel.com> <796a4b20-7fa3-3086-efa0-2f728f35ae06@linux.intel.com> From: Andi Kleen Message-ID: <3caf5e73-c104-0057-680c-7851476e67ac@linux.intel.com> Date: Tue, 10 Aug 2021 14:20:08 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Authentication-Results: imf27.hostedemail.com; dkim=none; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=intel.com (policy=none); spf=none (imf27.hostedemail.com: domain of ak@linux.intel.com has no SPF policy when checking 134.134.136.24) smtp.mailfrom=ak@linux.intel.com X-Stat-Signature: 35pfzwsx4t63uyftay8s76ojtznb1myn X-Rspamd-Queue-Id: DEEFD7008033 X-Rspamd-Server: rspam01 X-HE-Tag: 1628630411-526270 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: > These boot blips are not the biggest issue in the world. But, it is > fully under the guest's control and I think the guest has some > responsibility to provide *some* mitigation for it. It sounds more like an exercise in preliminary optimization at this point. If it's a real problem we can still worry about it later. > 1. Do background acceptance, as opposed to relying 100% on demand-driven > acceptance. Guarantees a limited window in which blips can occur. Like Kirill wrote this was abandoned because it always allocates all memory on the host even if the guest doesn't need it. > 2. Do acceptance based on user input, like from sysfs. You can easily do that by running "memhog" at boot. No need for anything in the kernel. BTW I believe this is also configurable at the guest BIOS level. > 3. Add a command-line argument to accept everything up front, or at > least before userspace runs. Same. > 4. Add some statistic for how much unaccepted memory remains. Yes that makes sense. We should have statistic counters for all of this. Also I agree with your suggestion that we should get the slow path out of the zone locks/interrupt disable region. That should be easy enough and is an obvious improvement. -Andi