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.5 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 4783DC433E0 for ; Fri, 29 May 2020 02:59:33 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 0BEAC20DD4 for ; Fri, 29 May 2020 02:59:33 +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="W8n52b8L" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0BEAC20DD4 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 12B18800D0; Thu, 28 May 2020 22:58:34 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 0DC44800D3; Thu, 28 May 2020 22:58:34 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 017BA800D0; Thu, 28 May 2020 22:58:33 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0211.hostedemail.com [216.40.44.211]) by kanga.kvack.org (Postfix) with ESMTP id D7B91800D3 for ; Thu, 28 May 2020 22:58:33 -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 98BB0824556B for ; Fri, 29 May 2020 02:58:33 +0000 (UTC) X-FDA: 76868248506.28.crack30_107f055241e4b Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin28.hostedemail.com (Postfix) with ESMTP id 811696C0A for ; Fri, 29 May 2020 02:58:33 +0000 (UTC) X-HE-Tag: crack30_107f055241e4b X-Filterd-Recvd-Size: 2610 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf14.hostedemail.com (Postfix) with ESMTP for ; Fri, 29 May 2020 02:58:33 +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=W8n52b8LE5nxLydoYBIVtfH1ZU tBMFjhfc9Tt0nqwfopjtHDwcamUK21hySPIMzeWFETfcmmpT5mJ3jnlQPYN0JJTkp6dFLEN2ePdhM 50hneOnuAYzy6IG+rf+59oCdf4pazbPo9rqgDwE+USp1AECfHVS+KUtaSBhafeOGNNU/H3cn2vGiL A65cA8q85QIDnQ1ohHqRFnzO9wZL/lcWLmbqFGudp1/xkOXZoz5DfAjwtCXcL3kY5OHO6k8EHmRq6 kN8iuYGKZH5WdNa2ZgE8OkjTFx/ytQPUd8vhrCczL655He++h/GrysJX0lena6YOgEyPMV3TMREUa G0XDQk3w==; Received: from willy by bombadil.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1jeVE2-0008Pi-K7; Fri, 29 May 2020 02:58:26 +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 v5 01/39] mm: Move PageDoubleMap bit Date: Thu, 28 May 2020 19:57:46 -0700 Message-Id: <20200529025824.32296-2-willy@infradead.org> X-Mailer: git-send-email 2.21.1 In-Reply-To: <20200529025824.32296-1-willy@infradead.org> References: <20200529025824.32296-1-willy@infradead.org> MIME-Version: 1.0 X-Rspamd-Queue-Id: 811696C0A X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam02 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