Received: by 2002:a05:6358:e9c4:b0:b2:91dc:71ab with SMTP id hc4csp1819332rwb; Fri, 5 Aug 2022 08:17:52 -0700 (PDT) X-Google-Smtp-Source: AA6agR7UOj7tYryK+kL9pzl/id8sBQTpPGHI+2BFfB6g7nXntWb1Gni2CN49zzQcBIAn/vPN1XaX X-Received: by 2002:a05:6402:100c:b0:43d:9009:c705 with SMTP id c12-20020a056402100c00b0043d9009c705mr6972158edu.49.1659712672718; Fri, 05 Aug 2022 08:17:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659712672; cv=none; d=google.com; s=arc-20160816; b=odmLW4/K//MgSzhFmb1N1jiXZZpXYJq3w773LQJyO4Q/Vwl5mKECA9X8v61nyg9yU9 Abk/XpW6WjgvY5BKmHG82W/s70L4FTyAoOQdgjoxdjkcujQkOrX+/JyjTRqN4GLJiqU0 81/GVrzXmm0Q+vPpUQdyMCggvo7sjdRZDlyNka3gnW8KNFi0O1uUJYQm1aHWpAD7ysLa v9vzI36QhW1uUZzMHOjprXbmefZFJ9E3+YYUpzotzblKLYIRmq5a2WIMW9Gk6DWxRJ/Y eQuYjqFNAHloCCnk4dZkWVGMtS4UuKAaqEttJvLWv9q5yHBRdbMZBDzU+lEmQ4BX0ek2 N+AA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=XDn/iFzaGXJwju9rUUCeSDcCrp38QuPPRjHFsszBsiM=; b=kMjgyyNiohGQ1NXJ45mjY4VbabtlTnY0EN7ri1geA9Szo4GeUz6khikMgay0w9uOUH FcYn1mAMbYtbKXkQVECoDgs/Q9rQ9yMwNzG60EAI17hXgj5nLGPOrjj6YjiXK7RVuItD pKJ8NVQvSWAjr1xRlj5OYBPB8kVJ+JrzH5hNBxp+3HDPCkDznByRN3s4ZROZirWzBIJI u2mP5MEsyN1dn8SQv9YcgBRVYDzCtOWyRgRxZY8keNQKmOIHQD8KOWd2c/6R3D5Gw0Wa 6Z3B4KHmoYi2ifXPuZdX1BG3mhA1qpRyKAa6zwpe71nRCag5ZamomNXcXl9eK5Z3/PSB LwOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=CbGtY5Y3; 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=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d16-20020a1709061f5000b0073072967073si3316766ejk.606.2022.08.05.08.17.17; Fri, 05 Aug 2022 08:17:52 -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=@intel.com header.s=Intel header.b=CbGtY5Y3; 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=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240764AbiHEOxv (ORCPT + 99 others); Fri, 5 Aug 2022 10:53:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40426 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240425AbiHEOxu (ORCPT ); Fri, 5 Aug 2022 10:53:50 -0400 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 797713F30E; Fri, 5 Aug 2022 07:53:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1659711229; x=1691247229; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=cW59A0boZIrZcRLHW5J56RfVnKU27mehgVJoXc75M14=; b=CbGtY5Y33/bC213ZXNfdPMhCxYAj3Q3uYNOMSIxgfD+gx+MSeQPPc4+7 UIb3T0Z/0NL4Lx8Z9uWscZgJS2u6+4bkcpcRpRnpjAN6TVYaKI1P2ItnT rOAMfh3qRj5AiNuLpyp04FxUOZpnPlBp2zNdlIE+lD8pLrpUxgUq7OhU0 N+mep48IIVCuTIlPQkaZd5aKAMKR6d4kOcKFOUB44aTOjnboJtzipmUv5 rjy/3fnmXd6jKQGHeOTvL4siOUk9c5gOnXcRExDLAwYAO6g7Vnm+FccLM 5r/eM/F2auzh9YUqA1PQh9CmJJX5gT5cfcm3ioHl3jeQids953QagC5eV w==; X-IronPort-AV: E=McAfee;i="6400,9594,10430"; a="291437687" X-IronPort-AV: E=Sophos;i="5.93,216,1654585200"; d="scan'208";a="291437687" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Aug 2022 07:53:49 -0700 X-IronPort-AV: E=Sophos;i="5.93,216,1654585200"; d="scan'208";a="579521566" Received: from rderber-mobl1.amr.corp.intel.com (HELO [10.212.217.71]) ([10.212.217.71]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Aug 2022 07:53:48 -0700 Message-ID: <6501ea6b-5659-53ee-7ae0-7ad248844086@intel.com> Date: Fri, 5 Aug 2022 07:53:49 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCHv7 02/14] mm: Add support for unaccepted memory Content-Language: en-US To: David Hildenbrand , Vlastimil Babka , "Kirill A. Shutemov" , Borislav Petkov , Andy Lutomirski , Sean Christopherson , Andrew Morton , Joerg Roedel , Ard Biesheuvel Cc: Andi Kleen , Kuppuswamy Sathyanarayanan , David Rientjes , Tom Lendacky , Thomas Gleixner , Peter Zijlstra , Paolo Bonzini , Ingo Molnar , Dario Faggioli , Mike Rapoport , marcelo.cerri@canonical.com, tim.gardner@canonical.com, khalid.elmously@canonical.com, philip.cox@canonical.com, x86@kernel.org, linux-mm@kvack.org, linux-coco@lists.linux.dev, linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org, Mike Rapoport , Mel Gorman References: <20220614120231.48165-1-kirill.shutemov@linux.intel.com> <20220614120231.48165-3-kirill.shutemov@linux.intel.com> <8cf143e7-2b62-1a1e-de84-e3dcc6c027a4@suse.cz> From: Dave Hansen In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE 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 On 8/5/22 07:22, David Hildenbrand wrote: >> A list that sits besides the existing free_area, contains only >=pageblock >> order sizes of unaccepted pages (no migratetype distinguished) and we tap >> into it approximately before __rmqueue_fallback()? There would be some >> trickery around releasing zone-lock for doing accept_memory(), but should be >> manageable. >> > Just curious, do we have a microbenchmark that is able to reveal the > impact of such code changes before we start worrying? Nope. I went looking to see if I could find any impact. I think Kirill did too. Too bad that effort didn't make it into the changelog yet. The merging check at least is just checking a field in a cache-hot 'struct page'. The common case is probably three instructions: load to a register check the bit jump if not set It adds a wee bit of icache pressure, but it's also the kind of thing that should be a piece of cake for the branch predictors. That dynamic check could easily be wrapped by a static branch. But, that first requires more code to go dig in the nooks and crannies of the page allocator to make sure *ALL* pages are accepted.