Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3127485rwb; Mon, 15 Aug 2022 18:49:22 -0700 (PDT) X-Google-Smtp-Source: AA6agR4W1/5rkrilaTcmECLelczqaFng+P9kq0MqmOFo9QlbUhnUaCedWeL/ryss6E7PEYDwVSRQ X-Received: by 2002:a17:907:8317:b0:731:2189:7f4d with SMTP id mq23-20020a170907831700b0073121897f4dmr11720347ejc.468.1660614562446; Mon, 15 Aug 2022 18:49:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660614562; cv=none; d=google.com; s=arc-20160816; b=epj0yFL/fx/iS40N2/tSQcR11Xicf741778ysOVnE7EzRVfRL//hqeuSkkuWsDKOq3 h08KpTONZWeS6l7Rd/0r6O32dO8Dr85H/N+JcPqs9pZxpJhjj/pcLDa9V9w9VNoAWbGF EU3Db0FQ8TeaMveLbQzBe85L7OQUw3feVhy0mb98u5lzXEPEdcIZ8es/LOEAZNMLG2Vo XM/dGp3BLjJO851gvAFhqwZNs7IR+jJ0OW631rV8oZ7hQjsRyQieYvGBgrNLP4WizJwN 8qtYnMZR0dN5HqvNFZfgzo/9IP6HUF4o5GZW3+WYIg8bPhNt28QywNw2LUWbuGg1Ascn TbAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=xtY8G2D96F+0+SkQlxIHRu/YzFBnO7oJKVZE1E2i6CE=; b=r3oevVU1T2APnz1fP5D3lEWqE2AFxZER/Y6giDv+d+QnGXEnjUF8feMozt2oKrR3zg lDSrsTW4mTU78HRqoeb5emzItGKCI54o62UGDwuHPt7VsBXwyiCl0vowwIuvoHKxZF1U ESUX1YZm7i/kewMUdIrBuKnx2xmvjD7i7wTyxbTb6A9V3LqGv8DhdQC7IEdfyscbRpgO j4tqphwE53WDSoMF6JfAB1F7r2DJ4e33xEK6VR6uRmMl2M2eudcGlqAMj0pdVwGBWUCz 93iAfkC4n3qA0ccLUoFKI70ekq80w2SL9f/xQK4XpdZxVozbai2fbO9poqBOnwIFU3F4 oC5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=T+UlcDuG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z26-20020aa7cf9a000000b0043cdb04b9f1si7228869edx.411.2022.08.15.18.48.55; Mon, 15 Aug 2022 18:49:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=T+UlcDuG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240356AbiHPBR4 (ORCPT + 99 others); Mon, 15 Aug 2022 21:17:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48278 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243279AbiHPBRU (ORCPT ); Mon, 15 Aug 2022 21:17:20 -0400 Received: from mail-yw1-x112c.google.com (mail-yw1-x112c.google.com [IPv6:2607:f8b0:4864:20::112c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 35BA01A80B for ; Mon, 15 Aug 2022 14:08:31 -0700 (PDT) Received: by mail-yw1-x112c.google.com with SMTP id 00721157ae682-3246910dac3so103500067b3.12 for ; Mon, 15 Aug 2022 14:08:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc; bh=xtY8G2D96F+0+SkQlxIHRu/YzFBnO7oJKVZE1E2i6CE=; b=T+UlcDuGshW/Wrvb8I2bfsuqi3uLSo/KEj/2dcG1scaCe1BmCEp6nwWKtFOC+RKtke TFymD4X+iW7efPkL0lOEn9zP5UJ1cYBVAryMrp1hgBS6icx840NK8QKskBNX7wbAiEtF dW/QFugI1o7HbO4aznI9osl63Uk6yGlKz73Ib3mAuYRDGpbqXwYWATiQqIwVbsts1jW4 UpMHoVFEmcJwpezxLr2Jm6nrIVF8UkSZ6oQWniKSbNTQFbKZQdLwARSUb5xvZbGS/FTe iNNO0jtAPvVo08Vx2EIZTwNXgjoxoSPyBg2hnXy9SazgSvr8GYOsq+RTnjPCnFbbSeYr Ercg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc; bh=xtY8G2D96F+0+SkQlxIHRu/YzFBnO7oJKVZE1E2i6CE=; b=0ORAgRF1qJ8SNn0ngK+kd0WlR7gx7V2YKVy+Oln1rmb0A5TjONJv3TZHsJDLf1ofr+ PML6rqLWFv+iEl1VYsqULCSwghP50PzX8YrObXqHwS64aECFFnZnzEBb2jlDxz26be69 q8US6O7xiOZOOuYpQ8T/qhXBPM3ey0maX9jh5QSnG5GiKMQxaEOreaNEuyagh1Ighzfv Gb9DScz4ThHTDIkkpMykoa1ESWGA0yaBr4mKaA528k1arOLL6dLGlqRxyD4lWPPoc5b0 GULLVqTqGuMly0SWAOx1TEmq13haa9uoe5W9N1xomyUVNPNBoJtobdy9Vrhut2qmFjJL IORQ== X-Gm-Message-State: ACgBeo1oMVchVLF4Hy1QrQUbzLoQtkHHk2TMCsYzg8OMKLP6WmOPzimu X1zBquwdkUZ079vm0VedagHi06S15ZBRi6aIHsNXFQ== X-Received: by 2002:a81:1b08:0:b0:31e:5f26:8ae9 with SMTP id b8-20020a811b08000000b0031e5f268ae9mr15210170ywb.155.1660597710276; Mon, 15 Aug 2022 14:08:30 -0700 (PDT) MIME-Version: 1.0 References: <20220614120231.48165-1-kirill.shutemov@linux.intel.com> <20220614120231.48165-3-kirill.shutemov@linux.intel.com> <8cf143e7-2b62-1a1e-de84-e3dcc6c027a4@suse.cz> <20220810141959.ictqchz7josyd7pt@techsingularity.net> In-Reply-To: <20220810141959.ictqchz7josyd7pt@techsingularity.net> From: Dionna Amalie Glaze Date: Mon, 15 Aug 2022 14:08:18 -0700 Message-ID: Subject: Re: [PATCHv7 02/14] mm: Add support for unaccepted memory To: Mel Gorman Cc: Vlastimil Babka , "Kirill A. Shutemov" , Borislav Petkov , Andy Lutomirski , Sean Christopherson , Andrew Morton , Joerg Roedel , Ard Biesheuvel , Andi Kleen , Kuppuswamy Sathyanarayanan , David Rientjes , Tom Lendacky , Thomas Gleixner , Peter Zijlstra , Paolo Bonzini , Ingo Molnar , Dario Faggioli , Dave Hansen , Mike Rapoport , David Hildenbrand , Marcelo Cerri , tim.gardner@canonical.com, Khalid ElMously , philip.cox@canonical.com, "the arch/x86 maintainers" , Linux Memory Management List , linux-coco@lists.linux.dev, linux-efi , LKML , Mike Rapoport Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > > The unpredictable performance of the application early in boot may be > unacceptable and unavoidable. It might take a long time but it could > eventually generate bug reports about "unpredictable performance early > in boot" that will be hard to track down unless accept_memory is observed > using perf at the right time. Even when that does happen, there will need > to be an option to turn it off if the unpredictable performance cannot > be tolerated. Second, any benchmarking done early in boot is likely to > be disrupted making the series a potential bisection magnet that masks a > performance bug elsewhere in the merge window. I'm doing some boot performance tests now before I run some workload memory acceptance latency tests. Note that this testing is on AMD SEV-SNP, so this patch series on top of the AMD guest patches v12, plus a patch Brijesh Singh wrote to define __accept_memory for SEV-SNP https://github.com/AMDESE/linux/commit/ecae2582666d50ce1e633975d703d2f904183ece I was getting pretty consistent boot times, only going up slightly as the memory size increased, but at 256GB, the VM crashes because it touches some unaccepted memory without first accepting it. 255GB boots fine. The stack track is in mm/page_alloc.c. I've done a little investigation, but I can't account for why there's a hard cutoff of correctness at 256GB [ 0.065563] RIP: 0010:memmap_init_range+0x108/0x173 [ 0.066309] Code: 77 16 f6 42 10 02 74 10 48 03 42 08 48 c1 e8 0c 48 89 c3 e9 3a ff ff ff 48 89 df 48 c1 e7 06 48 03 3d d9 a2 66 ff 48 8d 47 08 47 34 01 00 00 00 48 c7 47 38 00 00 00 00 c7 47 30 ff ff ff ff [ 0.069108] RSP: 0000:ffffffffad603dc8 EFLAGS: 00010082 ORIG_RAX: 0000000000000404 [ 0.070193] RAX: ffffdba740000048 RBX: 0000000000000001 RCX: 0000000000000000 [ 0.071170] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffffdba740000040 [ 0.072224] RBP: 0000000000000000 R08: 0000000000001000 R09: 0000000000000000 [ 0.073283] R10: 0000000000000001 R11: ffffffffad645c60 R12: 0000000000000000 [ 0.074304] R13: 00000000000000a0 R14: 0000000000000000 R15: 0000000000000000 [ 0.075285] FS: 0000000000000000(0000) GS:ffffffffadd6c000(0000) knlGS:0000000000000000 [ 0.076365] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 0.077194] CR2: ffffdba740000074 CR3: 0008001ee3a0c000 CR4: 00000000000606b0 [ 0.078209] Call Trace: [ 0.078524] [ 0.078887] ? free_area_init+0x5c1/0x66c [ 0.079417] ? zone_sizes_init+0x52/0x6c [ 0.079934] ? setup_arch+0xa55/0xb6d [ 0.080417] ? start_kernel+0x64/0x65a [ 0.080897] ? secondary_startup_64_no_verify+0xd6/0xdb [ 0.081620] > > -- > Mel Gorman > SUSE Labs -- -Dionna Glaze, PhD (she/her)