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.6 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 0B957C433DF for ; Fri, 15 May 2020 13:17:10 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id B7E1720709 for ; Fri, 15 May 2020 13:17:09 +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="UqUPO/AS" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B7E1720709 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 32C1E80050; Fri, 15 May 2020 09:17:03 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E415F90000D; Fri, 15 May 2020 09:17:02 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C6BD090000E; Fri, 15 May 2020 09:17:02 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0071.hostedemail.com [216.40.44.71]) by kanga.kvack.org (Postfix) with ESMTP id 7D7EE90000D for ; Fri, 15 May 2020 09:17:02 -0400 (EDT) Received: from smtpin28.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 3A547824805A for ; Fri, 15 May 2020 13:17:02 +0000 (UTC) X-FDA: 76819003884.28.lip06_5a79d67c4fe57 X-HE-Tag: lip06_5a79d67c4fe57 X-Filterd-Recvd-Size: 2610 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf24.hostedemail.com (Postfix) with ESMTP for ; Fri, 15 May 2020 13:17:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.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=VHXm1L+rObZHMg/ZFaxYy0B7In8iJsSQq6tf5Ix1Zow=; b=UqUPO/AS2C7nEDmWKnfBwxvMuZ FRpK0JzrFPRL2ip0W/rlV4zc+quu0zhsUrETROgrrcdhcstdxlSvrVuc6TKNc00LFhLjFLzumzuAy 6Dnmk/NQ75lXIs//uCViZIXhm1wkb5XRsibNmobrMfdjrDIla4Ew5BeWk12LiITWkMRyVPzvJ6Hd9 zRdEjLk3Hdtf6ckuqUFfxObSB/iuajVnA2RbJ1HvZbibSIPWTsgVh98aOvTJBcSY3atAw0GEGFGDF bUy3XL78CHh9tr4nt9PaD/zdQFzh3lQicCf+Zrg3Lyv1MU0B+8M3ReoV5w31s2CMKQuFV1NBuNXIm Umkj+nnA==; Received: from willy by bombadil.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1jZaCy-0005Rz-8b; Fri, 15 May 2020 13:17:00 +0000 From: Matthew Wilcox To: linux-fsdevel@vger.kernel.org Cc: "Matthew Wilcox (Oracle)" , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH v4 01/36] mm: Move PageDoubleMap bit Date: Fri, 15 May 2020 06:16:21 -0700 Message-Id: <20200515131656.12890-2-willy@infradead.org> X-Mailer: git-send-email 2.21.1 In-Reply-To: <20200515131656.12890-1-willy@infradead.org> References: <20200515131656.12890-1-willy@infradead.org> MIME-Version: 1.0 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: From: "Matthew Wilcox (Oracle)" 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 222f6f7b2bb3..de6e0696f55c 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.26.2