From patchwork Wed Oct 13 16:00:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kent Overstreet X-Patchwork-Id: 12556235 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BCD1FC433EF for ; Wed, 13 Oct 2021 16:00:42 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 711D461163 for ; Wed, 13 Oct 2021 16:00:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 711D461163 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 0F7DD6B006C; Wed, 13 Oct 2021 12:00:42 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 0A7D3900003; Wed, 13 Oct 2021 12:00:42 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id EB122900002; Wed, 13 Oct 2021 12:00:41 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0043.hostedemail.com [216.40.44.43]) by kanga.kvack.org (Postfix) with ESMTP id DB9DF6B006C for ; Wed, 13 Oct 2021 12:00:41 -0400 (EDT) Received: from smtpin07.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 8CD7A1844CAC9 for ; Wed, 13 Oct 2021 16:00:41 +0000 (UTC) X-FDA: 78691877082.07.335BF86 Received: from mail-qk1-f172.google.com (mail-qk1-f172.google.com [209.85.222.172]) by imf01.hostedemail.com (Postfix) with ESMTP id EBC8A507E4ED for ; Wed, 13 Oct 2021 16:00:39 +0000 (UTC) Received: by mail-qk1-f172.google.com with SMTP id l7so2724407qkk.0 for ; Wed, 13 Oct 2021 09:00:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=PWSeITlyIwPGelI0V+moIuPw2pVju3g7zFiPEO8iBxw=; b=pOBLi2/cwkQLHnJAKwrneqMPGLTseUAj6979DPjQ7ORH5nR4WWmKbVLlxwrN9cvX81 tnU8dOqXHJ6KwLOCalIKradis3Ifeif1SwFvUl0Bhn4mDsj//2jLi8Y3uEYsN/BAy7nb Q9GKKjZnYldS461mSy+qmF/fncFgKrognmcuNbLpzPGeD3P6hgkS1C7mDwLfxghH38nd BGT85EfdeG3e2bUUFAD8RcPNdJzfK8dBw48qMz8wrS7YdZUIj1smNrTLXVGS55CQGanj ixWlehYeEZOsAA4r7gWL8JEXpZE7jz7DZu4OfzGLqgdAjcSEWbGAhLgymQmekSuBZonB LN+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=PWSeITlyIwPGelI0V+moIuPw2pVju3g7zFiPEO8iBxw=; b=IAwVPcyaOVYOCw/QuHZebJ3KzlDd2Paqn90zM/+SwMa+uYgif3nTQt/b3JD+TD4Oii NrnV5Xp9f7VOhogcl9ZP3H11v5JGq05C8wLFefoNhrQ18IIJO6KVAOIvbJj/D2+ezU0w woMVwGWhBhXwSt3c9U4iE7Ck4PBjoA4yKFKcy209yM0t3yzX7T/PhgvbecydniwRgY1C ncf58eJdYQjVhy1aL8eWYY6c0eoGSa9/itttQf4LPfY98jr2T2fccFGz5v2Edb6ZJqFI ewJCO7RPjJHnWCa0kTBs6pLarkvnSksj6DkGO6E6kvExafQD1JSHL/mTsFZ/BdfyGGt9 0g9w== X-Gm-Message-State: AOAM530uciYBhqIGQnXDUNFvMbRVY55A8xZY+lLmh0l5VC6OOsUMkzE4 HnWGi8MyO7MxmF29gplEFQ== X-Google-Smtp-Source: ABdhPJzVxXvW8X5yxMKkxpU63Pm0AHS+P+SeJFolARaAZT7lqUMUx3bBzB5Zj1T0f8kO2njZIjDzfQ== X-Received: by 2002:a05:620a:6b7:: with SMTP id i23mr43656qkh.241.1634140840310; Wed, 13 Oct 2021 09:00:40 -0700 (PDT) Received: from moria.home.lan (c-73-219-103-14.hsd1.vt.comcast.net. [73.219.103.14]) by smtp.gmail.com with ESMTPSA id w17sm20161qts.53.2021.10.13.09.00.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Oct 2021 09:00:39 -0700 (PDT) From: Kent Overstreet To: linux-kernel@vger.kernel.org, linux-mm@kvack.org, akpm@linux-foundation.org, linux-raid@vger.kernel.org, linux-block@vger.kernel.org, axboe@kernel.dk Cc: Kent Overstreet , alexander.h.duyck@linux.intel.com Subject: [PATCH 0/5] Minor mm/struct page work Date: Wed, 13 Oct 2021 12:00:29 -0400 Message-Id: <20211013160034.3472923-1-kent.overstreet@gmail.com> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: EBC8A507E4ED X-Stat-Signature: yjn1rsu1ubcezae7i3mrid1xwbpisqt8 Authentication-Results: imf01.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b="pOBLi2/c"; spf=pass (imf01.hostedemail.com: domain of kent.overstreet@gmail.com designates 209.85.222.172 as permitted sender) smtp.mailfrom=kent.overstreet@gmail.com; dmarc=pass (policy=none) header.from=gmail.com X-HE-Tag: 1634140839-29339 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000090, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Some small buddy allocator/struct page patches The first two patches are small buddy allocator cleanups - they were supposed to be prep work patches to replacing buddy allocator freelists with radix trees, but I'm not sure if that's actually going to be feasible due to highmem - but the patches are still improvements so I wanted to send them out. The third, to mm/page_reporting, also came about because that code walks buddy allocator freelists but is a much more significant cleanup. I have no idea how to test page reporting though so it's only Correct By Obviousness, so hopefully Alexander can help us out with that. The last two patches are important for the struct page cleanups currently underway. We have a lot of code using page->index and page->mapping in ad-hoc ways, and this is a real problem given our goal of cutting struct page up into different types that each have a well defined purpose - and it turns out that a lot of that code is using those fields for very minor conveniences. We still need a lot more cleanups like this, I've only done two of the easier ones. Kent Overstreet (5): mm: Make free_area->nr_free per migratetype mm: Introduce struct page_free_list mm/page_reporting: Improve control flow md: Kill usage of page->index brd: Kill usage of page->index drivers/block/brd.c | 4 -- drivers/md/md-bitmap.c | 44 ++++++------ include/linux/mmzone.h | 22 ++++-- kernel/crash_core.c | 4 +- mm/compaction.c | 20 +++--- mm/page_alloc.c | 50 +++++++------ mm/page_reporting.c | 158 +++++++++++++++-------------------------- mm/vmstat.c | 28 +------- 8 files changed, 138 insertions(+), 192 deletions(-)