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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id EEEC7C433EF for ; Wed, 12 Jan 2022 19:14:52 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 50AF06B01FE; Wed, 12 Jan 2022 14:14:52 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 4B9F26B01FF; Wed, 12 Jan 2022 14:14:52 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3359D6B0200; Wed, 12 Jan 2022 14:14:52 -0500 (EST) 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 079F46B01FE for ; Wed, 12 Jan 2022 14:14:51 -0500 (EST) Received: from smtpin31.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 95D0D8272EF4 for ; Wed, 12 Jan 2022 19:14:51 +0000 (UTC) X-FDA: 79022587182.31.DBA0494 Received: from mail-lf1-f46.google.com (mail-lf1-f46.google.com [209.85.167.46]) by imf31.hostedemail.com (Postfix) with ESMTP id 3249A20011 for ; Wed, 12 Jan 2022 19:14:51 +0000 (UTC) Received: by mail-lf1-f46.google.com with SMTP id x7so11566069lfu.8 for ; Wed, 12 Jan 2022 11:14:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shutemov-name.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=igVDWcMipF0SatFt9p6gNS2Y828EjA5ZzPFbjDN4w8s=; b=ZWWedQq2A4EN9KB+CRMjVwqfQ/K1up/vwGXDtcnByaN/WoonWF25/SCIWCrjK8xz0Y 7H+uXrxtCbFyEOSIwciKYoUEevYu3KPy/M+dg8KmzPfA2wRC+EEo3MN80sRDsYvl8ya1 ayoOP76A/t9AtPZaVOvMfMDuup94Fut3p2jGJ5oP3MJwEa5PCOq/an+JBZF+Mkn1D3Ro 08JO/UCPXrBhBQzGpzSRc+c9BSEJpkiKcltxVeaWdFl5HHcYQqrKQTs1TYes7jjmAfc4 eQkwiuP6dhERXlBcyWQYTEjwwxfmz1tPsTpTsCu2+mI4Hymn+wBWE/muNjkbJpjIyhIx tu8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=igVDWcMipF0SatFt9p6gNS2Y828EjA5ZzPFbjDN4w8s=; b=lwb3Ke28xjipi4YSRSDQl4nQNZ8OOm8mbf7s/JKWNTjce6oLRpgmkQVlv3kKVgxl6C aHoP+7hufp+46dfworRMLLChMxiyzRTjDiRcVFYzx63iBdDqFStGMKMbKmDZLvLXyuhs t0JKT9OlcW7hG9gAotBJNrJGjeKJ3G6DAB3wbfzb+qq78Me8Bs+0flsgi5tItp9JNtDn NoN+WBzasobMRiq1xXwusNIsRN8r8otbfN81/WRlZ+BC73qoNWLX/4qNm5SX+vNvLgRT m44n3RjaNVApFGtQperae7xJPxKlWj4ZrQyCv1gJV/VyUEStTXvfDA9McbfgwyiX3ACX Fwig== X-Gm-Message-State: AOAM532gt3GuuDAWWzqng1fqhuIGO7IVvRa+6fEXYoTpxLZuDxeththl 90uGN4ujJSlBv+HzjzXdOn2Zlg== X-Google-Smtp-Source: ABdhPJzlfxAT+7HQhcd4fAWklADHKI95H3h5K1MM3L4iC2TQORXo0ZIlDg8+0aydimE2hYeywaPhYA== X-Received: by 2002:a2e:b791:: with SMTP id n17mr622707ljo.307.1642014889495; Wed, 12 Jan 2022 11:14:49 -0800 (PST) Received: from box.localdomain ([86.57.175.117]) by smtp.gmail.com with ESMTPSA id p17sm67328lfu.233.2022.01.12.11.14.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jan 2022 11:14:47 -0800 (PST) Received: by box.localdomain (Postfix, from userid 1000) id E8448103A6D; Wed, 12 Jan 2022 22:15:10 +0300 (+03) Date: Wed, 12 Jan 2022 22:15:10 +0300 From: "Kirill A. Shutemov" To: David Hildenbrand Cc: Dave Hansen , "Kirill A. Shutemov" , Borislav Petkov , Andy Lutomirski , Sean Christopherson , Andrew Morton , Joerg Roedel , Ard Biesheuvel , Andi Kleen , 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-efi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCHv2 1/7] mm: Add support for unaccepted memory Message-ID: <20220112191510.6uqdflbreuet7bnx@box.shutemov.name> References: <20220111113314.27173-1-kirill.shutemov@linux.intel.com> <20220111113314.27173-2-kirill.shutemov@linux.intel.com> <3a68fabd-eaff-2164-5609-3a71fd4a7257@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 3249A20011 X-Stat-Signature: 918f6g8umikphwsog9x9awnhw7fxintx Authentication-Results: imf31.hostedemail.com; dkim=pass header.d=shutemov-name.20210112.gappssmtp.com header.s=20210112 header.b=ZWWedQq2; spf=none (imf31.hostedemail.com: domain of kirill@shutemov.name has no SPF policy when checking 209.85.167.46) smtp.mailfrom=kirill@shutemov.name; dmarc=none X-Rspamd-Server: rspam07 X-HE-Tag: 1642014891-958424 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, Jan 12, 2022 at 12:31:10PM +0100, David Hildenbrand wrote: > > > > > Looking at stuff like this, I can't help but think that a: > > > > #define PageOffline PageUnaccepted > > > > and some other renaming would be a fine idea. I get that the Offline > > bit can be reused, but I'm not sure that the "Offline" *naming* should > > be reused. What you're doing here is logically distinct from existing > > offlining. > > Yes, or using a new pagetype bit to make the distinction clearer. > Especially the function names like maybe_set_page_offline() et. Al are > confusing IMHO. They are all about accepting unaccepted memory ... and > should express that. "Unaccepted" is UEFI treminology and I'm not sure we want to expose core-mm to it. Power/S390/ARM may have a different name for the same concept. Offline/online is neutral terminology, familiar to MM developers. What if I change accept->online in function names and document the meaning properly? > I assume PageOffline() will be set only on the first sub-page of a > high-order PageBuddy() page, correct? > > Then we'll have to monitor all PageOffline() users such that they can > actually deal with PageBuddy() pages spanning *multiple* base pages for > a PageBuddy() page. For now it's clear that if a page is PageOffline(), > it cannot be PageBuddy() and cannot span more than one base page. > E.g., fs/proc/kcore.c:read_kcore() assumes that PageOffline() is set on > individual base pages. Right, pages that offline from hotplug POV are never on page allocator's free lists, so it cannot ever step on them. -- Kirill A. Shutemov