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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 670D2C433EF for ; Mon, 27 Sep 2021 17:36:14 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 27887604D1 for ; Mon, 27 Sep 2021 17:36:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 27887604D1 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:Subject: From:References:Cc:To:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=3ZISUHsa8uAdDWO6lachDNIFCG9HlbjAMcERssZm6S0=; b=PSGan4xrySIQw3GNzF/B/NcRgP RYUHlklZGP/dZBXdlBXMw7flOrwYcvjMU3NtSokBmA8+xTofiYfceyRkPBGlOlaNdfFHaAWobQj/U WKoLz9xl7AreTwG0LSDQXRZgOZZPGH3ijJA/mDDTyjEEgc9RhUybx908AEM64J4LsG1GfXNkh5uJN W1d6iEzpXbihlsJ4hewJThCxTdN2C+dpkXA8ySU+njGkp5BlL/HOdhwppFyo0xZe3Ei4nJ10mFypG lkL0Vzo8ljh5zUgoP/aHCzQJWOlwJTnEGJR/RSVvuKwGv5V9A6w11PKB55fPdMadYHYRpBroPaBB6 StyUwHVA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mUuW5-003d6I-Qr; Mon, 27 Sep 2021 17:34:14 +0000 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mUuVz-003d3c-Vc for linux-arm-kernel@lists.infradead.org; Mon, 27 Sep 2021 17:34:09 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1632764047; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=VGALT2fxCpmPpY+7KVSQkrZnOp9lkNjd+JdjPKf4UQA=; b=DdOvoJa/KAW9ebIVgjaksf/n6uGbBjg+Q6LkVPD9ZmyDmouZ9kcYvV32EIpB2QB75z5kHq Xv1/4et6LSFrWKAURZn8t6/0R7cHyj+pXdLxehNRFIo5W16hWEWsuvEhRvIRszA8NmnJJu ivXc58qzgW+WEpD1LFFcx3VHEl+Aqp0= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-331-eQXHtXxzO-WfXmt4ektsIA-1; Mon, 27 Sep 2021 13:34:05 -0400 X-MC-Unique: eQXHtXxzO-WfXmt4ektsIA-1 Received: by mail-wr1-f71.google.com with SMTP id p12-20020a5d4e0c000000b001605e330b62so4513038wrt.5 for ; Mon, 27 Sep 2021 10:34:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:to:cc:references:from:organization:subject :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=VGALT2fxCpmPpY+7KVSQkrZnOp9lkNjd+JdjPKf4UQA=; b=7JVMFcRKi0Pua8fhRP37rTC4HY0zEDgE+4RNSBX0kL8XRA56cGYYqvIBJEtBOHV+0i Lemz4b7IiazPbLMP7+mBFkhHTE9JSh8mzpKBvpE5bgz1/531IKviqO/ZI6VYlBhq9iPe BOw7pDrobCnxHcdjPnK8qxTAign8/53tGiVX0nyfQVBz4smdvFQq2FvF065YXze7nAl6 x4luFwYHq04Jf/f2tClkug8nVcugZ+3c8fL3fkM8OXbLh3iIiQi+iD7o0qfpiQuY3Ouh TXLK7RjwslFXDRz2jv2Q1ZQXP+YtpRLB87dMuH13YszXtLXx0j2V+ErzX68v3xrxNVuu PFlw== X-Gm-Message-State: AOAM532/QNiF/lgormjjRngU5KHsvJr2HQpwTYAaJ9D8rXmnswgh10jQ Dm3nFXeNVZ/FuyJZWyHSa95Rud4yYRiEJj0F6zJ64t8vuVIo1sc4d2ZfBwTwVj0vp4J8CZ0PDzh cHq9JGyxIhPtSkiiFqD+vRrm7TE+oTHZ11ig= X-Received: by 2002:a7b:ca45:: with SMTP id m5mr303853wml.104.1632764044564; Mon, 27 Sep 2021 10:34:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwxFQPFgP0cvYwAaKpVOANDrVGsVbbDWtlyDelOIxzvbsD6mtpCVJttOjDtlebYZSOAscAoqQ== X-Received: by 2002:a7b:ca45:: with SMTP id m5mr303828wml.104.1632764044352; Mon, 27 Sep 2021 10:34:04 -0700 (PDT) Received: from [192.168.3.132] (p5b0c654d.dip0.t-ipconnect.de. [91.12.101.77]) by smtp.gmail.com with ESMTPSA id r6sm547676wrp.41.2021.09.27.10.34.03 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 27 Sep 2021 10:34:03 -0700 (PDT) To: Georgi Djakov , Chris Goldsworthy , Catalin Marinas , Will Deacon , Andrew Morton Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Sudarshan Rajagopalan References: <595d09279824faf1f54961cef52b745609b05d97.1632437225.git.quic_cgoldswo@quicinc.com> <4f4f6e93-ddc2-c9bb-ef47-4a40f2c3d0d7@quicinc.com> From: David Hildenbrand Organization: Red Hat Subject: Re: [RFC] arm64: mm: update max_pfn after memory hotplug Message-ID: <1b9c4377-0a6b-b7d4-7a6b-a69f9469bb70@redhat.com> Date: Mon, 27 Sep 2021 19:34:02 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <4f4f6e93-ddc2-c9bb-ef47-4a40f2c3d0d7@quicinc.com> Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=david@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210927_103408_118410_7E9183AE X-CRM114-Status: GOOD ( 19.83 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 27.09.21 19:22, Georgi Djakov wrote: > On 9/24/2021 1:54 AM, Chris Goldsworthy wrote: >> From: Sudarshan Rajagopalan >> >> After new memory blocks have been hotplugged, max_pfn and max_low_pfn >> needs updating to reflect on new PFNs being hot added to system. >> >> Signed-off-by: Sudarshan Rajagopalan >> Signed-off-by: Chris Goldsworthy > > Thanks for the patch, Chris! > > With this patch, the data in /proc/kpageflags appears to be correct and > memory tools like procrank work again on arm64 platforms. > > Tested-by: Georgi Djakov > > Maybe we should add fixes tag, as it has been broken since the following > commit: > Fixes: abec749facff ("fs/proc/page.c: allow inspection of last section > and fix end detection") Are you sure that that commit broke it? I recall that we would naturally run into the limit, because count = min_t(size_t, count, (max_pfn * KPMSIZE) - src); wouldn't really do what you would expect either. But you could force-read beyond max_pfn, yes, because the count computation was just weird. I think the real issue is not properly adjusting max_pfn in the first place when we introduced memoruy hotplug on arm64. -- Thanks, David / dhildenb _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel