From patchwork Wed Jan 11 14:29:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Wilcox X-Patchwork-Id: 13096767 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 DD770C46467 for ; Wed, 11 Jan 2023 14:29:28 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5CB6C8E000D; Wed, 11 Jan 2023 09:29:12 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 221F2940008; Wed, 11 Jan 2023 09:29:11 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CFBA8900005; Wed, 11 Jan 2023 09:29:11 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id D1F098E000A for ; Wed, 11 Jan 2023 09:29:10 -0500 (EST) Received: from smtpin20.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id AD404403E2 for ; Wed, 11 Jan 2023 14:29:10 +0000 (UTC) X-FDA: 80342750460.20.1019882 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf14.hostedemail.com (Postfix) with ESMTP id 2A8D8100015 for ; Wed, 11 Jan 2023 14:29:08 +0000 (UTC) Authentication-Results: imf14.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=hH0LJ5Py; spf=none (imf14.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1673447349; 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=wNDMpdoIQrLth2wk5ULYVRwIM9k41K1noQJYjxxhx9o=; b=8K3eWM8RJj1zhSCxbnvNqrUGmyeAfMlZFaGq6baaaH04y4oxNSvPwK9n6BklCha64kYxwK ge72kfl4jFfALszkqw+8PDIwxTPqpUvbJtHPe/cH6/CngImel/TeA4+KA3SveSqCWVmUZ7 CM9iz1hqYDFNR12LuVjFDpBwhutQWok= ARC-Authentication-Results: i=1; imf14.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=hH0LJ5Py; spf=none (imf14.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1673447349; a=rsa-sha256; cv=none; b=gMP1BgM3zIFlxs2O0AZUuPrI4j/iC+g8NPXmzVUeX2mUWIp9ROWq3gq/I8rhMHb7HCRQxE NYrn08hVq0SRYtFHfsHC9SAxVc+yF873uO3TgGiKzEKYevEoBxS9YoxShTWlDqXfcRi5fP y71nf4tiPvFIenczQx3Se6o79YPEybs= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=wNDMpdoIQrLth2wk5ULYVRwIM9k41K1noQJYjxxhx9o=; b=hH0LJ5PyTptTHy3HwGc0f9LWFw efvrPlcm7ntOpuyw1x54UUwT2A2nwvTY2lVA2wE9Wz1Sz0TlQOo7L9YOK84Isv9RhPsCKV9mQFKSC hyBJg9IcDcLoT6+VCmdtwn3ORamrYAJqCHua/Ry6aMRRG3ciaRnbmGd303ycMOqSaygbN7qPiEOob 4tyHApgGWc4fQfQfQZt8k6UoC1gTDB2MenRpp2O0VFbYsWukCKPygDmc7O4PadI+whS1veRy3y622 snhGmfu5ecirFhMevFobmpPMcjkfV+h8A85IIrxHYRhzI+DPjy/szMT2tGCz6Rry5DXQLzptVJHZd fDQTInTw==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1pFc6R-004CaL-Lx; Wed, 11 Jan 2023 14:29:19 +0000 From: "Matthew Wilcox (Oracle)" To: Andrew Morton Cc: "Matthew Wilcox (Oracle)" , linux-mm@kvack.org, Hugh Dickins Subject: [PATCH 22/28] mm: Remove 'First tail page' members from struct page Date: Wed, 11 Jan 2023 14:29:08 +0000 Message-Id: <20230111142915.1001531-23-willy@infradead.org> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20230111142915.1001531-1-willy@infradead.org> References: <20230111142915.1001531-1-willy@infradead.org> MIME-Version: 1.0 X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 2A8D8100015 X-Rspam-User: X-Stat-Signature: fxs6hitucaq497ctqdyuhgusgozdui3i X-HE-Tag: 1673447348-633792 X-HE-Meta: U2FsdGVkX188oXg34Ca7/AKNad4QFAsq2iiZOjz8Yx4TEbx2hbmWEkKBsgG0ogRENJWTcl7p7sEsrnsMc8RWhX5WbyZk0R4hE3XAsX1Kxl4G+N9LZOLQlSOlOnNQiFncQtgBCbKJXsRU/mOPXCoLeVdq4OEqHtRu5M/EHdDCgadP8Ff4jaoW3q6bJIeU8a9WdsFF4Y5kyUMxk44ambZGkMDUyx1+ytPkdhdehcJKU63q6ve705qYchpfYIXG3Nj/CuMyZqyULLO97W94gBAVyTCGn2+Nod/ZR9z88/RHZPlguOM+L8EY+nUAFgIG5uvUFNrybIDL8NSxnZJ+2SiNP8xLqP7oNJvxvaHl1Zz585scKpjkbm+9wplHZGgYTULLPSIJNbXL++s3b29b6R8eZ1VesKsLhI22aC+4TdtEVqiOUc1SRlycbtkpH2MFaVn38dcOfE0UOy3dw7xzBd9sTH+MuzkcS9uvTB4+vdYU2SY1f2S8kTt1Qmsnci4DFGblSj/svRFSBwLVwMTEJWgPIS2ekjO6aCEmnpmWVxWI1FwNngVb+LVwxfDrFO8qav4sdF9pm4MZOTrafCZ/GO6LmG+QkFD/oQNilAkFySOJJ4aOPA2IUT+IUFO5qeuqqvQGMOAZ0XQ5NP5H1vplVbHEFFqojUa3JAJSwBZnZshwBS1ZSN7qCzyBzj0zakHt9vBZExNbOQv0T+aD9O5Os0JdTVhJaUzaOnji9vQF4N1rpowb8J/T+vF21InjiV7Uf4JluGm3tyNWx0FPTdAe1b5/a8Q0eYINTWbueBKlzveViBw0bj32Tpx4SvGIAxfFssm/sjCErxn12OJcCuBi4tY0LtGjEqRgu1mPSDWEX7tz+RNSAKUM0LMhUB6/D9gTCZde7spF3wgMr0E= 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: All former users now use the folio equivalents, so remove them from the definition of struct page. Signed-off-by: Matthew Wilcox (Oracle) --- include/linux/mm_types.h | 18 ------------------ kernel/crash_core.c | 4 ++-- 2 files changed, 2 insertions(+), 20 deletions(-) diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index 1cf0fcd99d49..61a2e6b32781 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h @@ -140,16 +140,6 @@ struct page { }; struct { /* Tail pages of compound page */ unsigned long compound_head; /* Bit zero is set */ - - /* First tail page only */ - unsigned char compound_dtor; - unsigned char compound_order; - atomic_t compound_mapcount; - atomic_t subpages_mapcount; - atomic_t compound_pincount; -#ifdef CONFIG_64BIT - unsigned int compound_nr; /* 1 << compound_order */ -#endif }; struct { /* Second tail page of transparent huge page */ unsigned long _compound_pad_1; /* compound_head */ @@ -401,14 +391,6 @@ FOLIO_MATCH(memcg_data, memcg_data); offsetof(struct page, pg) + sizeof(struct page)) FOLIO_MATCH(flags, _flags_1); FOLIO_MATCH(compound_head, _head_1); -FOLIO_MATCH(compound_dtor, _folio_dtor); -FOLIO_MATCH(compound_order, _folio_order); -FOLIO_MATCH(compound_mapcount, _entire_mapcount); -FOLIO_MATCH(subpages_mapcount, _nr_pages_mapped); -FOLIO_MATCH(compound_pincount, _pincount); -#ifdef CONFIG_64BIT -FOLIO_MATCH(compound_nr, _folio_nr_pages); -#endif #undef FOLIO_MATCH #define FOLIO_MATCH(pg, fl) \ static_assert(offsetof(struct folio, fl) == \ diff --git a/kernel/crash_core.c b/kernel/crash_core.c index 87ef6096823f..755f5f08ab38 100644 --- a/kernel/crash_core.c +++ b/kernel/crash_core.c @@ -455,8 +455,8 @@ static int __init crash_save_vmcoreinfo_init(void) VMCOREINFO_OFFSET(page, lru); VMCOREINFO_OFFSET(page, _mapcount); VMCOREINFO_OFFSET(page, private); - VMCOREINFO_OFFSET(page, compound_dtor); - VMCOREINFO_OFFSET(page, compound_order); + VMCOREINFO_OFFSET(folio, _folio_dtor); + VMCOREINFO_OFFSET(folio, _folio_order); VMCOREINFO_OFFSET(page, compound_head); VMCOREINFO_OFFSET(pglist_data, node_zones); VMCOREINFO_OFFSET(pglist_data, nr_zones);