Message ID | 20230821183733.106619-7-hannes@cmpxchg.org (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> 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 5D539EE49A6 for <linux-mm@archiver.kernel.org>; Mon, 21 Aug 2023 18:37:57 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D451D900009; Mon, 21 Aug 2023 14:37:52 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id CF556900005; Mon, 21 Aug 2023 14:37:52 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B713A900009; Mon, 21 Aug 2023 14:37:52 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 9923A900005 for <linux-mm@kvack.org>; Mon, 21 Aug 2023 14:37:52 -0400 (EDT) Received: from smtpin16.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 5E5F61402F9 for <linux-mm@kvack.org>; Mon, 21 Aug 2023 18:37:52 +0000 (UTC) X-FDA: 81148970784.16.FCAB9A9 Received: from mail-qk1-f182.google.com (mail-qk1-f182.google.com [209.85.222.182]) by imf16.hostedemail.com (Postfix) with ESMTP id 8F4E518000F for <linux-mm@kvack.org>; Mon, 21 Aug 2023 18:37:50 +0000 (UTC) Authentication-Results: imf16.hostedemail.com; dkim=pass header.d=cmpxchg-org.20221208.gappssmtp.com header.s=20221208 header.b=t+wh1mGs; dmarc=pass (policy=none) header.from=cmpxchg.org; spf=pass (imf16.hostedemail.com: domain of hannes@cmpxchg.org designates 209.85.222.182 as permitted sender) smtp.mailfrom=hannes@cmpxchg.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1692643070; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=OQIFQGhOFbBlf64eoEhx/6zam9QXvcRrDKvqgUYhMRM=; b=W5joY4AzdcKFIyikYgXRQE4E5EdQOK1Zus5EGijMGFM6kIguqJx2uyf9yEdMibWCl6Z75G FYofV3kKx6p9Pp+wqhUSciu2V0wFKTmybBmWAHzCPD/r/c0faJJP2PfTwgmV2drq82x7IU Lf4qCFp2PDR6MeZiTR/VMM0KiQMuAOU= ARC-Authentication-Results: i=1; imf16.hostedemail.com; dkim=pass header.d=cmpxchg-org.20221208.gappssmtp.com header.s=20221208 header.b=t+wh1mGs; dmarc=pass (policy=none) header.from=cmpxchg.org; spf=pass (imf16.hostedemail.com: domain of hannes@cmpxchg.org designates 209.85.222.182 as permitted sender) smtp.mailfrom=hannes@cmpxchg.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1692643070; a=rsa-sha256; cv=none; b=MnL7AQMIsiXy/47wJK3+yD1dj4jPREVR6yZ2OKXp660w7sB0riTMGrm9d5bdXR+kShiwmG RfdFQdT7jp2kjsUpnOCQGLyfQa0hcST8qXKD5qnnHODCaNPUPTGVKMi9LQKf+u+p3HYIa1 DZhHcr6hybxX+OkBhWsAxsQgk3ztBO0= Received: by mail-qk1-f182.google.com with SMTP id af79cd13be357-76d9023c942so206917785a.0 for <linux-mm@kvack.org>; Mon, 21 Aug 2023 11:37:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cmpxchg-org.20221208.gappssmtp.com; s=20221208; t=1692643070; x=1693247870; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=OQIFQGhOFbBlf64eoEhx/6zam9QXvcRrDKvqgUYhMRM=; b=t+wh1mGsSpug9tSfvVbtQ0+ZT7w0zsIr5mQvD0qoxacPfoOB+g2smHBIaDUAnqGCFs nIfnUdLtFYhQBZzhdHCTMaFYxsrPCFH1JfaNCChGC9YbwVfc039vhqD/6cfA3MYQnjXH VnrReFpdUByuwNsccH6RNDOmypzGn9sVNUCpx57arQCc0x4tVqKXgIGYkDFV9KBaqjrQ pxv3g/whFqiiwVnugwxvXEqJIJv2e0lbpLu7n6wEiONmvwSrNdWgKg0k0M5tjjCMTiqP 8klZP0Q9u44cm9eKrDYTJStOMjv0qClBRgbJJF2O0USOGCxQqFT+VQ3RhL0tCbvB0de1 67lw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692643070; x=1693247870; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=OQIFQGhOFbBlf64eoEhx/6zam9QXvcRrDKvqgUYhMRM=; b=JCGeWBMrTIOZFISFhseNYlt4Nbgr15kNYfpAWXlaXFmnDo0nETiQrzdcOBj5NhPn3t 2WLrOQdiPgp5utr9OnU3o2rjKvKKVeWOf1eSGQHmtGsu6ndJfEgkDB7LZicbEW5d86SQ o5epn7PamNBkNcdwFX8WnplzRmz3mEvDFjgEN7CegQklTws73ObHk19/j1BWbg7e9bZD w/rIBsoG9g0EuZDgKKfg3fB6CwTVqYsuq6vkseLEaB/2KWPPZPkqfhActMaR3vENSDXj ZiCqwCs2J1MKa6fRhtRk5zle9FJ8fXyudDAVRxVMBAb8tJZMkWGstaoFvHQ2RXsXeLc7 MXAQ== X-Gm-Message-State: AOJu0Yyx8xTD5maEoP0z/cwjTjTPQ5tc+uH640/8eUyM0DXkpfoZgd6j H5DD/EOMgn5BiTxoEWCPmL5MtQ== X-Google-Smtp-Source: AGHT+IE91JFTBmOR/4UxoEL0MhPPZyAeK/R20HWilTQEJg9pfeBIBxkRJCzCQ4B/j3c4553iIqhoEg== X-Received: by 2002:a05:620a:4407:b0:76c:c90d:2ef0 with SMTP id v7-20020a05620a440700b0076cc90d2ef0mr10398847qkp.32.1692643069805; Mon, 21 Aug 2023 11:37:49 -0700 (PDT) Received: from localhost (2603-7000-0c01-2716-699c-6fe1-d2a8-6a30.res6.spectrum.com. [2603:7000:c01:2716:699c:6fe1:d2a8:6a30]) by smtp.gmail.com with ESMTPSA id o10-20020a05620a130a00b00767c961eb47sm2648001qkj.43.2023.08.21.11.37.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Aug 2023 11:37:49 -0700 (PDT) From: Johannes Weiner <hannes@cmpxchg.org> To: Andrew Morton <akpm@linux-foundation.org> Cc: Vlastimil Babka <vbabka@suse.cz>, Mel Gorman <mgorman@techsingularity.net>, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH 6/8] mm: page_alloc: fix move_freepages_block() range error Date: Mon, 21 Aug 2023 14:33:38 -0400 Message-ID: <20230821183733.106619-7-hannes@cmpxchg.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230821183733.106619-1-hannes@cmpxchg.org> References: <20230821183733.106619-1-hannes@cmpxchg.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspam-User: X-Stat-Signature: aeqzg55jebpfhggmagtnn7perxdcahny X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 8F4E518000F X-HE-Tag: 1692643070-810506 X-HE-Meta: U2FsdGVkX18875KxNnaXEZRYM1kBhWLUziDCkxk+c5+w+O1tmrZiYYx0FqbW/z17jqFkwj3AKcnnJwxY2mfH5HF95iL4hTXTj9uRDWybilHpiJCMTPopAIzsM4T07B0Cz9rlrAfz5BOzTJ4CkSHUNeGAS9C/H5V4iH8LAGq+YdHU0tkfz8KIeJpMufrtCnIUfagbOuIkW1iVB/mkGG1MEgPiIjdaC+0p1lF1Gh/X5gl0sY2lDJi1qMZQKJIHX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6gJMou6G0c94rE7+2CRvwFD8SmXUHcbBmSBu4zQe4EWHOnKtdBW3B3VBjQfJY/gCxnoQbeed8pt8IrRz9yXfomXI0YXGgyV9uX4NeGHVYCDyiL5Dst8Hn5A1j/1ie2vERkpH9oCUDg= 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: <linux-mm.kvack.org> |
Series |
mm: page_alloc: freelist migratetype hygiene
|
expand
|
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 6a4004f07123..6fcda8e96f16 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -1697,7 +1697,7 @@ int move_freepages_block(struct zone *zone, struct page *page, /* Do not cross zone boundaries */ if (!zone_spans_pfn(zone, start_pfn)) - start_pfn = pfn; + start_pfn = zone->zone_start_pfn; if (!zone_spans_pfn(zone, end_pfn)) return 0;
When a block is partially outside the zone of the cursor page, the function cuts the range to the pivot page instead of the zone start. This can leave large parts of the block behind, which encourages incompatible page mixing down the line (ask for one type, get another), and thus long-term fragmentation. Signed-off-by: Johannes Weiner <hannes@cmpxchg.org> --- mm/page_alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)