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 10169C54E67 for ; Wed, 27 Mar 2024 14:29:23 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6E0136B0085; Wed, 27 Mar 2024 10:29:22 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 68FFC6B0087; Wed, 27 Mar 2024 10:29:22 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 558316B0088; Wed, 27 Mar 2024 10:29:22 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 3AFD36B0085 for ; Wed, 27 Mar 2024 10:29:22 -0400 (EDT) Received: from smtpin11.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id EE482160DF2 for ; Wed, 27 Mar 2024 14:29:21 +0000 (UTC) X-FDA: 81943051722.11.988BDFC Received: from mail-oi1-f174.google.com (mail-oi1-f174.google.com [209.85.167.174]) by imf05.hostedemail.com (Postfix) with ESMTP id 15F34100026 for ; Wed, 27 Mar 2024 14:29:18 +0000 (UTC) Authentication-Results: imf05.hostedemail.com; dkim=pass header.d=cmpxchg-org.20230601.gappssmtp.com header.s=20230601 header.b=zkfh6bWp; dmarc=pass (policy=none) header.from=cmpxchg.org; spf=pass (imf05.hostedemail.com: domain of hannes@cmpxchg.org designates 209.85.167.174 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=1711549759; 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-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=AX2k+WxbCH6W0Cg5+nLJLICZuKMNPkboTga9aWIYEyc=; b=X1+8NeSrbgejVUW3jH6f8woP4D6+jgIZS8sMUpEOzq8gWz4Q1fHfRX/yPhE9KaS6JtXJSy w2MxSbVNub6mM0pKhqvzQa80k/ezm8J+zC0vT+9aUZjunrfwEadte1lXlB1dE1Yeuu7q/M giEM6mFU90rVlHY6+JEP6kcclbiPbi4= ARC-Authentication-Results: i=1; imf05.hostedemail.com; dkim=pass header.d=cmpxchg-org.20230601.gappssmtp.com header.s=20230601 header.b=zkfh6bWp; dmarc=pass (policy=none) header.from=cmpxchg.org; spf=pass (imf05.hostedemail.com: domain of hannes@cmpxchg.org designates 209.85.167.174 as permitted sender) smtp.mailfrom=hannes@cmpxchg.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1711549759; a=rsa-sha256; cv=none; b=poAWZ9ct7A41lYjuocZxRQfKn+Nbhp+oIV5hZk0gsf/5hpe5IuAPQMUUQjiKm0/B8Vqi+Z IqWxsAEVNJId0hJclXOS54MNDGF6ashbNe+Y+EdanpWd0TCEtJtHRPQksAaL1vfY2qJFO3 Jk70yuCtIH5D1/0+NUc4PnmXlajKoCA= Received: by mail-oi1-f174.google.com with SMTP id 5614622812f47-3c3ae53f662so3015165b6e.3 for ; Wed, 27 Mar 2024 07:29:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cmpxchg-org.20230601.gappssmtp.com; s=20230601; t=1711549758; x=1712154558; darn=kvack.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=AX2k+WxbCH6W0Cg5+nLJLICZuKMNPkboTga9aWIYEyc=; b=zkfh6bWpUyYS2rRFloVyxVBOs7AegwOXNT38aFuN+HSOl/pNBkhPGfAHQPU5+05G6G 7cnzwQrrgWKWCxwmM2GT6I1rgUMcXDso5zL2DTV5qpf3uyh7smB3jTkQcH/uaeCgjLKm x1E5Mo/yFe520YbFGglKq6NdjrYUXcWrk9Kwe4CKGAJZcGHa1n7NuLXK71YV+lP4PxXr oeDnRGoQsYULnjalk4wNx6c2kMGuImB7DoH3MI4O/q1BXcJleQxO2sxSBO/QmBIantQo migUgfDMsfRJ7k1KnY4AVBTLmkjYCNYgZJeUrFzDnGYzISzsgdtlA5xxVg4eVZ8jgCPI NESw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711549758; x=1712154558; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=AX2k+WxbCH6W0Cg5+nLJLICZuKMNPkboTga9aWIYEyc=; b=UFEypfwzuHiqG6zNrDTXeU3CFCIfI9PrVRleEHAqC+peItEW9z2zTjkCIvSPpUR9qQ WZeklDO7xK+49U8W71GeyIZhoDTB8rXah2cft+bmfK+Nkvd/kynEIilCuRjDcaX3BMHe JDas7+NFQDHxOullNAjLFgyl4bq0cxKQjehbZf8UBb564+BdOaETCyhL4XpmprmUc5D8 L9SAlvvGqJOcMcHvsPAd41zmDjIfxwSQn2hGkhi6vyfR9tNXlR3A7qOxBK0u2fBlWH8f sJihfgbOob6eHR+Sa5k2kvqjFAasaJBDfxEcUXw5iL/pkvJouLpcJ6maaCqjIpVoiOvl ZCQw== X-Forwarded-Encrypted: i=1; AJvYcCUBb8OpaavzwQTT3UTW5E+Pa9xmEi31jBqS4AAhzUeDgyp5APKJ6hJomDOPBOg28RqqvLHUe7ZphM1ALCPTGwjAaHE= X-Gm-Message-State: AOJu0YyPUrpONMS+gKmGjDb35XBvKgnN/2Qxj7wW2qPoJXnOCYp9+n9I kqY4z7XZr4IeMB9/Vk2aMkLmzNM1G/ICcuXADuEjNDrPJCvk9zlWn+2TeTmgdGc= X-Google-Smtp-Source: AGHT+IG6j5njfE+KNAPPcFNUQHYRSgSqtx3Os1NLv6Ea1jUvkvE6vMMZ9aTkCDkVaRIxyde0vafigQ== X-Received: by 2002:a05:6808:318:b0:3c3:d556:5d1c with SMTP id i24-20020a056808031800b003c3d5565d1cmr69399oie.54.1711549757861; Wed, 27 Mar 2024 07:29:17 -0700 (PDT) Received: from localhost (2603-7000-0c01-2716-da5e-d3ff-fee7-26e7.res6.spectrum.com. [2603:7000:c01:2716:da5e:d3ff:fee7:26e7]) by smtp.gmail.com with ESMTPSA id ha9-20020a05622a2b0900b0042ebbc1196fsm1058700qtb.87.2024.03.27.07.29.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 07:29:17 -0700 (PDT) Date: Wed, 27 Mar 2024 10:29:16 -0400 From: Johannes Weiner To: Vlastimil Babka Cc: Andrew Morton , Mel Gorman , Zi Yan , "Huang, Ying" , David Hildenbrand , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH V4 00/10] mm: page_alloc: freelist migratetype hygiene Message-ID: <20240327142916.GD229434@cmpxchg.org> References: <20240320180429.678181-1-hannes@cmpxchg.org> <81b1d642-2ec0-49f5-89fc-19a3828419ff@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <81b1d642-2ec0-49f5-89fc-19a3828419ff@suse.cz> X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: 15F34100026 X-Stat-Signature: ukcz6fwydwht51wkftfn7au5enn3fhma X-Rspam-User: X-HE-Tag: 1711549758-20190 X-HE-Meta: U2FsdGVkX196e0UUP3YnfS7cpRIo+EEegphDHk5+BpYDKeFJPJpRMV3hw+/ztPydLB1nxGyoglI7VAZd2+XL71pdmPaRfIQXplYoQg6g3O/qpXRkRtSU+oAWSOPWrw7dXj5P+OdGKTAkZ3uVCn9HORtA1JyDP61aB95qZ2AbrhppvuW8fe9m790nJv7vAL7a32/pDf2bNipE19DE8Jq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U8+swNyuZh1QWssR9Ro3r8vRuJucykNgD/Xpu9rGsScwkMSOokxuvf9ocI9qUS8xMpCRd/4cGhb0jJYlm4cmaQDQapUKVftARiK1/qZb6d6YGWmRkwZN2J5bU59QBaMO/Xqk0dGjA5hAKQpfg7FVAmhCb2AT8FSfQckFOJR+0NDTcT+f5ns7Y8rYTigxDlbeSlKA== 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: List-Subscribe: List-Unsubscribe: On Wed, Mar 27, 2024 at 10:30:30AM +0100, Vlastimil Babka wrote: > On 3/20/24 7:02 PM, Johannes Weiner wrote: > > V4: > > - fixed !pcp_order_allowed() case in free_unref_folios() > > - reworded the patch 0 changelog a bit for the git log > > - rebased to mm-everything-2024-03-19-23-01 > > - runtime-tested again with various CONFIG_DEBUG_FOOs enabled > > > > --- > > > > The page allocator's mobility grouping is intended to keep unmovable > > pages separate from reclaimable/compactable ones to allow on-demand > > defragmentation for higher-order allocations and huge pages. > > > > Currently, there are several places where accidental type mixing > > occurs: an allocation asks for a page of a certain migratetype and > > receives another. This ruins pageblocks for compaction, which in turn > > makes allocating huge pages more expensive and less reliable. > > > > The series addresses those causes. The last patch adds type checks on > > all freelist movements to prevent new violations being introduced. > > > > The benefits can be seen in a mixed workload that stresses the machine > > with a memcache-type workload and a kernel build job while > > periodically attempting to allocate batches of THP. The following data > > is aggregated over 50 consecutive defconfig builds: > > Great stuff. What would you say to the following on top? > > ----8<---- > From 84f8a6d3a9e34c7ed8b438c3152d56e359a4ffb4 Mon Sep 17 00:00:00 2001 > From: Vlastimil Babka > Date: Wed, 27 Mar 2024 10:19:47 +0100 > Subject: [PATCH] mm: page_alloc: change move_freepages() to > __move_freepages_block() > > The function is now supposed to be called only on a single pageblock and > checks start_pfn and end_pfn accordingly. Rename it to make this more > obvious and drop the end_pfn parameter which can be determined trivially > and none of the callers use it for anything else. > > Also make the (now internal) end_pfn exclusive, which is more common. > > Signed-off-by: Vlastimil Babka Nice, that's better. Acked-by: Johannes Weiner