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 D3D01C433EF for ; Tue, 15 Feb 2022 06:15:49 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 329556B0078; Tue, 15 Feb 2022 01:15:49 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 2D9696B007B; Tue, 15 Feb 2022 01:15:49 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1A10C6B007D; Tue, 15 Feb 2022 01:15:49 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.25]) by kanga.kvack.org (Postfix) with ESMTP id 091376B0078 for ; Tue, 15 Feb 2022 01:15:49 -0500 (EST) Received: from smtpin03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay11.hostedemail.com (Postfix) with ESMTP id B6A4F80877 for ; Tue, 15 Feb 2022 06:15:48 +0000 (UTC) X-FDA: 79144003176.03.27F505B Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by imf10.hostedemail.com (Postfix) with ESMTP id 3A8D6C0002 for ; Tue, 15 Feb 2022 06:15:48 +0000 (UTC) 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-Rspamd-Queue-Id: 3A8D6C0002 X-Rspam-User: Authentication-Results: imf10.hostedemail.com; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=geMBC9iA; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=b7g3DwVe; spf=pass (imf10.hostedemail.com: domain of osalvador@suse.de designates 195.135.220.29 as permitted sender) smtp.mailfrom=osalvador@suse.de; dmarc=pass (policy=none) header.from=suse.de X-Stat-Signature: axipkdng3c8k5wyhjwtetm6rbihx4nrh X-Rspamd-Server: rspam03 X-HE-Tag: 1644905748-946636 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 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