Message ID | 20230613201827.9441-3-vishal.moola@gmail.com (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 897D2EB64DB for <linux-mm@archiver.kernel.org>; Tue, 13 Jun 2023 20:18:38 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 60B896B007B; Tue, 13 Jun 2023 16:18:37 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5BA556B007E; Tue, 13 Jun 2023 16:18:37 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 434418E0002; Tue, 13 Jun 2023 16:18:37 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 313456B007B for <linux-mm@kvack.org>; Tue, 13 Jun 2023 16:18:37 -0400 (EDT) Received: from smtpin15.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 11D5B1C8229 for <linux-mm@kvack.org>; Tue, 13 Jun 2023 20:18:37 +0000 (UTC) X-FDA: 80898837474.15.B1E21AC Received: from mail-ot1-f44.google.com (mail-ot1-f44.google.com [209.85.210.44]) by imf09.hostedemail.com (Postfix) with ESMTP id 2529E140006 for <linux-mm@kvack.org>; Tue, 13 Jun 2023 20:18:34 +0000 (UTC) Authentication-Results: imf09.hostedemail.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=K51pHP9w; spf=pass (imf09.hostedemail.com: domain of vishal.moola@gmail.com designates 209.85.210.44 as permitted sender) smtp.mailfrom=vishal.moola@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1686687515; 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=U6KHUky1DpkusNGgmBNXNnpcQ1dWjAR0pkWJnKeXby4=; b=xnAZS2WKbCP8ACWa9mxj2PKnaVAB9WsHSFPJib7Y+xIi/QGGDlw0t5IKI9ndgvplYNw14c nI/n+JoUIwuOyGuiTXok7GzYgYYLkLTwhTDkpyBIEFGju023eZoa6NSNxQmdDyhMTPYlxV gYyFOP8IHHbwa9Uf5J5WA+Mb+7rBrKU= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1686687515; a=rsa-sha256; cv=none; b=x3Z+DDkYzmdP5hjiETDN8l2qfdCLlbOnQCqwIlj3PNLCWK5MFLr2lvDejPl+xyF/K7gEHz zroejhK8kNnb1Ry2prNbjWp3anJ6wRXJ1LEIp4ccJaPN1dki2yloMUqGGj3D6ni2QOHj3P LSwWRzpBf3Rf3glYjWeb5Mcf0JAyqp0= ARC-Authentication-Results: i=1; imf09.hostedemail.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=K51pHP9w; spf=pass (imf09.hostedemail.com: domain of vishal.moola@gmail.com designates 209.85.210.44 as permitted sender) smtp.mailfrom=vishal.moola@gmail.com; dmarc=pass (policy=none) header.from=gmail.com Received: by mail-ot1-f44.google.com with SMTP id 46e09a7af769-6b2d702bd5aso2449018a34.0 for <linux-mm@kvack.org>; Tue, 13 Jun 2023 13:18:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686687514; x=1689279514; 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=U6KHUky1DpkusNGgmBNXNnpcQ1dWjAR0pkWJnKeXby4=; b=K51pHP9wViB3ZadMEXzWsfIDKin1lsEdjUYjh4DAwZ9sRHvdPjCCPf9ICl06aw5cUM QCRpWcyMMeWIyke9qqZO0B0qjy/mN6tyRAheWiPYKE6boBZfSeHb/3glWNTAVPHzvltu anwJ3GiEbzQXjjlDk2g9eGm7zSJB9xg+Ehl/JjSyVxyt9Y93aNsoDxx7HWS9aKOTwE0s 7XtO9aZwf6Lem17hnmOg8y48qHKRxU5qXgoihMMzOSYzowYHUNkGTr0uuTOGdw4cTmks K7jkvCu8YCPUkTvNSDe4dX/b+Fbp7pNGPckvp3MXIBC/7nzzhr6wE2Hs9UBoSHWI0pon 8/6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686687514; x=1689279514; 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=U6KHUky1DpkusNGgmBNXNnpcQ1dWjAR0pkWJnKeXby4=; b=Qe/3TQZVTAL7HbE3GLjprVCjyza1oWfqVv+hGfoKriZDJ3cyqgpGsEAzu4WzmCGsxA LtEzUX8+PFOlQxojwm2lbX25UbcPGGF+uFY8EsBxlwRtZvB8Z7t1+6v7un3cWuOcOg1o NKVtcZbqZHuozmAbQn8kx+k+SCPVuV4MXS7nogCo73MF2eHhOpkSMCAbtyiwwP7ps8Jm Qlb6NuZKxs/68yyEviT0srsTzSGGz58GIdji6j6y/bWvM0JuHVcB1IyJNqWBYpwkafkW sazCa0jgYu6TF3hOo2cDnBPAKJU4VOFrriIR7GB1tNG6vkp15v3XIrQWgF0MpV2w+4+2 Lliw== X-Gm-Message-State: AC+VfDycS3uX1yiQxLxleo6SMtGwhX2NV71VsCxAcXa2+x35CtiURlqE 0Pa0fRq/adP6Vsewn+I35Gg= X-Google-Smtp-Source: ACHHUZ4eH3naw2Bb7NNIPO+T6DjhoydZDXuiQtS5uS/ty3oL192spHUAvHw0WLQKL53n1rGK/9di5Q== X-Received: by 2002:a05:6358:e813:b0:12b:dce7:f428 with SMTP id gi19-20020a056358e81300b0012bdce7f428mr5201292rwb.1.1686687513897; Tue, 13 Jun 2023 13:18:33 -0700 (PDT) Received: from unknowna0e70b2ca394.attlocal.net ([2600:1700:2f7d:1800::e]) by smtp.googlemail.com with ESMTPSA id b72-20020a0dd94b000000b0056cea0480c6sm2509985ywe.2.2023.06.13.13.18.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Jun 2023 13:18:33 -0700 (PDT) From: "Vishal Moola (Oracle)" <vishal.moola@gmail.com> To: akpm@linux-foundation.org Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, "Vishal Moola (Oracle)" <vishal.moola@gmail.com> Subject: [PATCH 2/5] mmzone: Introduce folio_migratetype() Date: Tue, 13 Jun 2023 13:18:24 -0700 Message-Id: <20230613201827.9441-3-vishal.moola@gmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230613201827.9441-1-vishal.moola@gmail.com> References: <20230613201827.9441-1-vishal.moola@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 2529E140006 X-Rspam-User: X-Stat-Signature: mhr8hfzfwn8ohkb96wdfxxybcmbthjdg X-Rspamd-Server: rspam03 X-HE-Tag: 1686687514-326341 X-HE-Meta: U2FsdGVkX1/p2FVmpJ7+SgyWwXI0IElqaQgyAOIZgdVM03k8tKSvWS78JZUKICtVOs7Wyff2ARqNYEuPjGAbn3WL3f+kfNDSTddG2lvZvuu7bMIdMcE/gKDm6Da08UMgjt87SZf1/arTbzl0uZT4aBGOUkstXGa+rUS5o/oXuMf52aMwqwJ873B22Cd+Rykt8Nqc2ecND4WLQKPAfnsJ95wFHr289BaASM43HZ7X4lg6IaUTg5GqKsZ1CR4sSUcv6j9GsQn8c0lznLf8psMF4S/zZvHOADdktjLb6z5HzK3q2FGPveMV6p92CXGiCo47RjyA/kxbgpuTZXcnHTrlJGP8BrHyhHkeWCxoN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xWO1Rd0SarBT455WvL3xFlrqfJ0pO6Y9gqjD9gfYkOV0Qshb78PJO3Hlas0te2OhK8rV8qbkbpx9uEo4fHoNwHLOGt//jvNhz1lPaefLRTHzRO+jBRprRV37QUUtC2c/rV7ajS X-Bogosity: Ham, tests=bogofilter, spamicity=0.000507, 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 |
Replace is_longterm_pinnable_page()
|
expand
|
On Tue, Jun 13, 2023 at 01:18:24PM -0700, Vishal Moola (Oracle) wrote: > Introduce folio_migratetype() as a folio equivalent for > get_pageblock_migratetype(). This function intends to return the > migratetype the folio is located in, hence the name choice. > > Signed-off-by: Vishal Moola (Oracle) <vishal.moola@gmail.com> Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index 744bf32e48a8..b58c76e68ac7 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h @@ -105,6 +105,9 @@ extern int page_group_by_mobility_disabled; #define get_pageblock_migratetype(page) \ get_pfnblock_flags_mask(page, page_to_pfn(page), MIGRATETYPE_MASK) +#define folio_migratetype(folio) \ + get_pfnblock_flags_mask(&folio->page, folio_pfn(folio), \ + MIGRATETYPE_MASK) struct free_area { struct list_head free_list[MIGRATE_TYPES]; unsigned long nr_free;
Introduce folio_migratetype() as a folio equivalent for get_pageblock_migratetype(). This function intends to return the migratetype the folio is located in, hence the name choice. Signed-off-by: Vishal Moola (Oracle) <vishal.moola@gmail.com> --- include/linux/mmzone.h | 3 +++ 1 file changed, 3 insertions(+)