Received: by 2002:ab2:6991:0:b0:1f2:fff1:ace7 with SMTP id v17csp114548lqo; Wed, 27 Mar 2024 08:18:17 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUG4mVqVN/9KC0Tt15UfDyt7RVW4hgjleGHCrfHwZQem/Ij1yjfom2Mg7HsOmqOKsewJlJsewkh4LVEmfkCnV22aIwxuWR8vR+bQAywyA== X-Google-Smtp-Source: AGHT+IEfkn3FSHEgXgIodAsonBLUKBJTDkEK8fvljlc2Vm5d0kTI0pSxAMaklLQzjoTHOUY09XWl X-Received: by 2002:a17:906:1c56:b0:a46:cc60:975b with SMTP id l22-20020a1709061c5600b00a46cc60975bmr1250054ejg.17.1711552697716; Wed, 27 Mar 2024 08:18:17 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711552697; cv=pass; d=google.com; s=arc-20160816; b=OLWrAXo23+qpn92+7hvlgnepJJBimnH/cZlM8DLaAU/5LSbhkIb0uiDfrzRoCWJWmi twzrw+fZSx7Yiwctg9LJf39Fape2A6TOS2RbKG9IC2uSPIfhWzsXMJTZdYuDfvJBowoY cdQb6t58MsJj2+OodPHlJCYd9GEKcQQxBC8U9+z0tYFAyJlN0A0KhflcIIVAMdIjtd/G lhRHmj6hWRivamMeBxugLXtQb8hn57yATdjifCZ1W+tZjHSZIyLaEi4MXQ9wXr0mI4Cw OzuFiCtIpP8+UilFvJi69M1syXyroYhF3t45e9yH38jrYVQZW4c73kGmKzzrKqMFs2K6 qxzg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=AX2k+WxbCH6W0Cg5+nLJLICZuKMNPkboTga9aWIYEyc=; fh=Cgq4NAYZQ4MVNCJlSH09Jo5tsrg/o6oJkumoo7PyuiU=; b=CoQ6mYyaVnzQZ5mirODt6cmHQeSfA2y4RvI/hqosODfxZjQIYyXvx1T3Om4veuAZ5d QeH2/Yya8yLquAv+/uw7h1BqXrD4U//vJYsBcJtv9xB1hXJx7nqZ9dkboIqonlTKHAoV Fkh5lCem3nP4rvXGLT3JkCUUquERVsnRsnTWUQJqq4a1XpK/sYTVNj9u1m9YCLPqAo6j EYcuc6XJ8dxK0B7Bhf/MJzySYjj8pwXC40VUj62SBQGMJkQy3Tdy9D4UwlS5yI4SIc1C V12FWf/qlWaDpTI/wh4QErc0257dAeq3bBRljevpeNw5ExwkusOc9truUEFm+kbQz++P lN7w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@cmpxchg-org.20230601.gappssmtp.com header.s=20230601 header.b=02ZwANKB; arc=pass (i=1 spf=pass spfdomain=cmpxchg.org dkim=pass dkdomain=cmpxchg-org.20230601.gappssmtp.com dmarc=pass fromdomain=cmpxchg.org); spf=pass (google.com: domain of linux-kernel+bounces-121438-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-121438-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=cmpxchg.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id t11-20020a17090616cb00b00a4831e938bbsi3235430ejd.609.2024.03.27.08.18.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 08:18:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-121438-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@cmpxchg-org.20230601.gappssmtp.com header.s=20230601 header.b=02ZwANKB; arc=pass (i=1 spf=pass spfdomain=cmpxchg.org dkim=pass dkdomain=cmpxchg-org.20230601.gappssmtp.com dmarc=pass fromdomain=cmpxchg.org); spf=pass (google.com: domain of linux-kernel+bounces-121438-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-121438-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=cmpxchg.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 82C651F36571 for ; Wed, 27 Mar 2024 15:07:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DFF7C1353E1; Wed, 27 Mar 2024 14:29:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=cmpxchg-org.20230601.gappssmtp.com header.i=@cmpxchg-org.20230601.gappssmtp.com header.b="02ZwANKB" Received: from mail-oi1-f176.google.com (mail-oi1-f176.google.com [209.85.167.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D6373136E35 for ; Wed, 27 Mar 2024 14:29:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.176 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711549761; cv=none; b=TB8KRm4dYpAr+AsfwsZfvLJbZjYdqRuNSUC98PKj30pUe80jnDOIrUZjBVw3HqZQtQXU7ennw2OOqbIKRSJ2kF4gd3CArpu0mvg99w23sy1PVBsIa0rQFamDIoLzNivBncgFr2/41vOUPrWHg7EXIoVyJmAm/f8BRoXUkf9YhMw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711549761; c=relaxed/simple; bh=PBQlmfRXw+C2/GPTCK5OFB0LP80OtagUw+30P4geKhA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=LcP5fIfA/j4lbVMH0LPjmEYzd34Ap9hs9eV/OrjXxqexHlAhxOQW5eDy53K1cIUUNoFiWruNKUEoCLZdVhlihdgX2jV27UXByJBL/Vtbm8wmpJO32UArF8/cN2tuPV33tdVSVsuhuR+uXmRIAf6rOOSEvKYtCnNWXHt5hGbjShk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=cmpxchg.org; spf=pass smtp.mailfrom=cmpxchg.org; dkim=pass (2048-bit key) header.d=cmpxchg-org.20230601.gappssmtp.com header.i=@cmpxchg-org.20230601.gappssmtp.com header.b=02ZwANKB; arc=none smtp.client-ip=209.85.167.176 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=cmpxchg.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=cmpxchg.org Received: by mail-oi1-f176.google.com with SMTP id 5614622812f47-3c393b5f0e3so3285809b6e.1 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=vger.kernel.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=02ZwANKBl2I2ZR+GfggQ55X4yNNOrcbKMeM4LFTzfWpmITii4ug3zvWbcpqnyETIU4 QOjc9rkQQ2t4r+nP94PGYZg0Wj9hHpuq4YTLZcl9KZBJntnPT7tyZLkh5l/CBk8rRjUy FpxRdgfhK/Ml4yszGbPalf1yOaBYl8AxO+0jfxUgyPP+TLTEzI0qTsZdCRkXjdCjlpEI fQHiXs7ZOMZ/nIx27AmXFqKv0KBuhhMaja/3uyw5BqJVIFro9od3IjmopSQTtQntiubs tdA+6pL9epQlmpHpQ2ddRSdnUlkJ1+bWaG3J1mgo08zCwW76g4g7prbtD7llCsx5lEk4 PgPQ== 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=M4sA2gvNv92Jpw+/j5GxcQHt4RzubnH7bpXyJ0Stcz1QWMHi8jhAJBU8P5eLZ/keCw lU45Q28k/KrtM99htUOPrFHIyC2N6b5u0wS28wPbMiYvLi3JsiCouYlgKUnPceb0F5KH OZp68hw2Ba0BjKGhxeRTQ0snMlu6E+IJ0pnOVle3qUfnD22Ci4aJEZ5X2cCP1C0qvpNW JjSfR7QDQYRsTdlBQrbfD9KIA7w33vjD6OK7EMsXAFXtQZtCdGLJ/vHKzZwF3gSsO0Kd l0CN+WpcKsj2b41h/a1oXrq4qIcpvdBjN1shmy/478OeP4iaQWCUACBrjSa6pq+Oyuw9 i5AA== X-Forwarded-Encrypted: i=1; AJvYcCX+yo3wdK8Qo9JNl7HZ4taQP+uFegycbw9C2RIfNu15dxzEpCXPZB1fI09D5c53JKE8/vUEtH1yV4aAYKeK2Od+6N/P83TaEsJqpFwQ X-Gm-Message-State: AOJu0YwC/M8uLiXrj+4rYPH5O9PBdJVHNGwWUtMr0ICuCxxjjc/tuLcJ 06k+GXhaCiafyNbvSo4fdxL76wOCXUF1q7skvE+8pWmR6lySYpGUUUDhVs4HS0I= 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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <81b1d642-2ec0-49f5-89fc-19a3828419ff@suse.cz> 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