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 X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DB606C433E0 for ; Mon, 29 Jun 2020 15:19:43 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 9DAF124687 for ; Mon, 29 Jun 2020 15:19:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="SfiAFWRW" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9DAF124687 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 494E96B0026; Mon, 29 Jun 2020 11:19:43 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 4459B6B0027; Mon, 29 Jun 2020 11:19:43 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 334CC6B0028; Mon, 29 Jun 2020 11:19:43 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0192.hostedemail.com [216.40.44.192]) by kanga.kvack.org (Postfix) with ESMTP id 195B26B0026 for ; Mon, 29 Jun 2020 11:19:43 -0400 (EDT) Received: from smtpin06.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id CA8D71EF3 for ; Mon, 29 Jun 2020 15:19:42 +0000 (UTC) X-FDA: 76982609004.06.crook35_270dcdd26e70 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin06.hostedemail.com (Postfix) with ESMTP id 38F191003CE52 for ; Mon, 29 Jun 2020 15:19:40 +0000 (UTC) X-HE-Tag: crook35_270dcdd26e70 X-Filterd-Recvd-Size: 2528 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf17.hostedemail.com (Postfix) with ESMTP for ; Mon, 29 Jun 2020 15:19:38 +0000 (UTC) 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=bDNPQjUWgRkV8co8dAz0ebefMO2FAf+no7vUUNNaM8I=; b=SfiAFWRWquOAxkht/98sZYB8Zh yTDX8HYiYqYL6wgviXsY180wziuHsWEr+PkozNlwsswCuwkY2RbWXmnQnVwn3xsZ5x/dCrrtD5Rex AOZE9Omv/3w0guA9IrAFVIJ2b9V/3Jy1zmDGde81tentyLITNaP1Y+R8yaB6AB5t6yZLWzXzZqNT1 JZY9U4fVVsSrQoEBF9V9db31ZJ8DXaiVcT8OQ2GdkkdReI8mKSZ8gQ/4zS72MzMIFGbz4KgackjPI rY7mVeTGW6aqZUxZbVGiHsHYcHpzx5qjpd4Vhw+FEHJw6K6EYpcp5qzQgS3WC/v7QuIBDU9WGaFFm k4OxGVWQ==; Received: from willy by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1jpvZJ-00046C-07; Mon, 29 Jun 2020 15:19:37 +0000 From: "Matthew Wilcox (Oracle)" To: linux-mm@kvack.org, Andrew Morton Cc: "Matthew Wilcox (Oracle)" Subject: [PATCH 1/2] mm: Move PageDoubleMap bit Date: Mon, 29 Jun 2020 16:19:32 +0100 Message-Id: <20200629151933.15671-2-willy@infradead.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200629151933.15671-1-willy@infradead.org> References: <20200629151933.15671-1-willy@infradead.org> MIME-Version: 1.0 X-Rspamd-Queue-Id: 38F191003CE52 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam05 Content-Transfer-Encoding: quoted-printable 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: PG_private_2 is defined as being PF_ANY (applicable to tail pages as well as regular & head pages). That means that the first tail page of a double-map page will appear to have Private2 set. Use the Workingset bit instead which is defined as PF_HEAD so any attempt to access the Workingset bit on a tail page will redirect to the head page's Workingset bit. Signed-off-by: Matthew Wilcox (Oracle) --- include/linux/page-flags.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h index 6be1aa559b1e..b4e6051aa311 100644 --- a/include/linux/page-flags.h +++ b/include/linux/page-flags.h @@ -164,7 +164,7 @@ enum pageflags { PG_slob_free =3D PG_private, =20 /* Compound pages. Stored in first tail page's flags */ - PG_double_map =3D PG_private_2, + PG_double_map =3D PG_workingset, =20 /* non-lru isolated movable page */ PG_isolated =3D PG_reclaim, --=20 2.27.0