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=-7.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,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 08F4AC433DB for ; Fri, 5 Mar 2021 18:27:04 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 97F4565059 for ; Fri, 5 Mar 2021 18:27:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 97F4565059 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 208516B005D; Fri, 5 Mar 2021 13:27:03 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 1B9B06B006C; Fri, 5 Mar 2021 13:27:03 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 031C36B006E; Fri, 5 Mar 2021 13:27:02 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0031.hostedemail.com [216.40.44.31]) by kanga.kvack.org (Postfix) with ESMTP id D40EF6B005D for ; Fri, 5 Mar 2021 13:27:02 -0500 (EST) Received: from smtpin16.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 93E1F1730878 for ; Fri, 5 Mar 2021 18:27:01 +0000 (UTC) X-FDA: 77886652242.16.DAF6B3A Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf08.hostedemail.com (Postfix) with ESMTP id D580580192E4 for ; Fri, 5 Mar 2021 18:26:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1614968817; 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=TEPnFeg5EaQcMTzMLTO+/1iyn6ySAsFp6AQcgB5ZDLg=; b=ZP0RhBnDTEdi7A3Kr9mdjX6+B9/Et+WNx7Pld/C5pOvIrzmz05fCbZWwmaC3gVCXLgxhdJ a9RhrnuoSUKbuiUtxFdg8q04vFT4S7a25uLp/safU9zPRNLQUnj9UPCmi3qgY2gUxi74RX LlRGkowtqWvAf6UpvajEnw5AGCeern4= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-18-rOwcDg17PraTmR56KJSk6g-1; Fri, 05 Mar 2021 13:26:53 -0500 X-MC-Unique: rOwcDg17PraTmR56KJSk6g-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8962710082E8; Fri, 5 Mar 2021 18:26:51 +0000 (UTC) Received: from [10.36.112.194] (ovpn-112-194.ams2.redhat.com [10.36.112.194]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6346160843; Fri, 5 Mar 2021 18:26:48 +0000 (UTC) Subject: Re: [PATCH v4 3/3] x86/vmemmap: Handle unpopulated sub-pmd ranges To: Dave Hansen , Oscar Salvador , Andrew Morton Cc: Dave Hansen , Andy Lutomirski , Peter Zijlstra , Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, "H . Peter Anvin" , Michal Hocko , linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <20210301083230.30924-1-osalvador@suse.de> <20210301083230.30924-4-osalvador@suse.de> <3d49fdca-de12-aa7d-ffc4-b2a8c7d79bee@intel.com> From: David Hildenbrand Organization: Red Hat GmbH Message-ID: <57d317ff-8106-7447-f505-6cbd04254879@redhat.com> Date: Fri, 5 Mar 2021 19:26:47 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 MIME-Version: 1.0 In-Reply-To: <3d49fdca-de12-aa7d-ffc4-b2a8c7d79bee@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Stat-Signature: e7e4rytt66t74kjh5n1z89dijxz54jos X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: D580580192E4 Received-SPF: none (redhat.com>: No applicable sender policy available) receiver=imf08; identity=mailfrom; envelope-from=""; helo=us-smtp-delivery-124.mimecast.com; client-ip=170.10.133.124 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1614968816-572646 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 04.03.21 18:08, Dave Hansen wrote: > On 3/4/21 9:02 AM, Dave Hansen wrote: >>> +#define PAGE_UNUSED 0xFD >>> +/* >>> + * The unused vmemmap range, which was not yet memset(PAGE_UNUSED) ranges >>> + * from unused_pmd_start to next PMD_SIZE boundary. >>> + */ >>> +static unsigned long unused_pmd_start __meminitdata; >> This whole 'unused_pmd_start' thing was unmentioned in the changelog. > > One tiny suggestion: *Sometimes* for these optimizations, it's easiest > to write the code up without it in one patch, then add the optimization > in the next patch. > > It makes it 100% clear what is part of the "core" algorithm and what is > pure optimization. > > I don't know if it will work here, but it might be worth taking a look. > For this reason the s390x part by me (see patch description) was two separate patches. Maybe it also makes sense to split it up here. -- Thanks, David / dhildenb