Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp6312316pxb; Mon, 14 Feb 2022 22:34:59 -0800 (PST) X-Google-Smtp-Source: ABdhPJx4zc0Q4gwFYBg2cZol3KlYN86BxBjU636GQPL1BmcLZgnMa9eF8phindBhLc5wMTHtTaRO X-Received: by 2002:a17:907:7fa0:: with SMTP id qk32mr1751031ejc.724.1644906899461; Mon, 14 Feb 2022 22:34:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644906899; cv=none; d=google.com; s=arc-20160816; b=Cd65D/hwKGkVwAI0pn2RDd9jIt6GNSEmmFDc2hdinFCyot1/xKK4Wam+VC2sgvTv/W KCMgdCm1sgcW3pfvLJzy2lsPXEtdBCPMLo9B0zRLbRlprpbS8xjAznxFg4oyAkXRP2ky 6dMU/wS59U/h/pKI6tU8p4a7AslIEV4VdB1Ic+ER5hKyCg8IjYbAbyc7hdC4RIoEzo2c WPS4FHSHNYVGnI5GePXUPbtG34sw+ws2ROFI33RNO22TYWN1MF/QfVuvlyf5+JqeeRDJ e0IzaGlczRe5sXr2COnZUBZe8xGDv59NGf9FcPM1qjXJQJPewj0n4HKn7VPpXCh97p6e Wg0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :dkim-signature; bh=stFWmG4RHx6dwdwOXJa8oE098JQwQAuQshDHre0cRNc=; b=B6qfZdIUmbS6qfCgg3jNWJtoY9uMmIIdKyqEInAsutAL7CKfoQ3GKmVQiDMEFaz5v7 XHmT90+uOiTQ+jCpJVv54j0Xou5BNYhGS+lz4tzamBvmll9nJcTRVUTY/Qcddf2ze/3t VE2wTy+XrqIiOh4tAt+5DFHGS6s/OKyZIzLhXDNhBwe+WL+Bc9zJohm6Bph8eXQIKCWD DLN4x5wzTNyMnXNwf7SpkKiKeQR+63En586piYkMSK20aMsUuqh7gDDI8WycuFM9vehl sR/aJpEiD7MO1nfOJ6ZS6gDE+e/ob+8RwUivLSFjE9U3qKSNYLglnD7stvBX94ilpgSp PAhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=geMBC9iA; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=b7g3DwVe; 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=suse.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v9si2087525edc.222.2022.02.14.22.34.37; Mon, 14 Feb 2022 22:34:59 -0800 (PST) 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=@suse.de header.s=susede2_rsa header.b=geMBC9iA; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=b7g3DwVe; 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=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234324AbiBOGP6 (ORCPT + 99 others); Tue, 15 Feb 2022 01:15:58 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:59798 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232358AbiBOGP5 (ORCPT ); Tue, 15 Feb 2022 01:15:57 -0500 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 31A6DF7478 for ; Mon, 14 Feb 2022 22:15:48 -0800 (PST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id C68231F38C; Tue, 15 Feb 2022 06:15:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1644905746; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=stFWmG4RHx6dwdwOXJa8oE098JQwQAuQshDHre0cRNc=; b=geMBC9iAkPgkBwprFvlcXzXqOf+Icc2NyqYQrvyxtDHhsQHoSJniDV5oagjfEqDJvExOLI Tx+y6csiVbbQmp5bVQmpAZoZYsTEZBQZ5HupWrx57fnS8ra57PDF0OfUNMDij8YYnsB5vD 4wpMxFm1ZPjg1LaWJ1QTcBo74kBeR3w= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1644905746; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=stFWmG4RHx6dwdwOXJa8oE098JQwQAuQshDHre0cRNc=; b=b7g3DwVeNv0v/1M/Bb+kiBX1/nj/5ApQ5iRP/EYj0CdYYtIgRBQgyw7o+49q6tWbPXNNRU p5qFztb91iL7U6Cg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 45B1013BD2; Tue, 15 Feb 2022 06:15:46 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id wgA+DRJFC2J4KgAAMHmgww (envelope-from ); Tue, 15 Feb 2022 06:15:46 +0000 Date: Tue, 15 Feb 2022 07:15:44 +0100 From: Oscar Salvador To: Anshuman Khandual Cc: Alistair Popple , akpm@linux-foundation.org, jhubbard@nvidia.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, ziy@nvidia.com, mgorman@suse.de Subject: Re: [PATCH] mm/pages_alloc.c: Don't create ZONE_MOVABLE beyond the end of a node Message-ID: References: <20220215025831.2113067-1-apopple@nvidia.com> <7b752e06-f345-cbb2-d05c-57e5fc5d8e5a@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7b752e06-f345-cbb2-d05c-57e5fc5d8e5a@arm.com> X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_PASS,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 Tue, Feb 15, 2022 at 10:17:09AM +0530, Anshuman Khandual wrote: > Hi Alistair, > > On 2/15/22 8:28 AM, Alistair Popple wrote: > > ZONE_MOVABLE uses the remaining memory in each node. It's starting pfn > > is also aligned to MAX_ORDER_NR_PAGES. It is possible for the remaining > > memory in a node to be less than MAX_ORDER_NR_PAGES, meaning there is > > not enough room for ZONE_MOVABLE on that node. CC Mel as he wrote that back then. I was curious about the commit that introduced that, and I found [1] and [2]. I guess [2] was eventually dismissed in favor of [1] as a whole, but in there the commit message said: "This patch rounds the start of ZONE_MOVABLE in each node to a MAX_ORDER_NR_PAGES boundary. If the rounding pushes the start of ZONE_MOVABLE above the end of the node then the zone will contain no memory and will not be used at runtime" I might be missing something, but it just rounds up the value, but does not check if it falls beyond node's boundaries. [1] commit 2a1e274acf0b1c192face19a4be7c12d4503eaaf "Create the ZONE_MOVABLE zone" [2] https://marc.info/?l=linux-mm&m=117743777129526&w=2 -- Oscar Salvador SUSE Labs