Message ID | 20240306155113.118119-1-zi.yan@sent.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 99EAFC5475B for <linux-mm@archiver.kernel.org>; Wed, 6 Mar 2024 15:51:18 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 30D8A6B006E; Wed, 6 Mar 2024 10:51:18 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 2BD626B0074; Wed, 6 Mar 2024 10:51:18 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1ACA46B007E; Wed, 6 Mar 2024 10:51:18 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 0A0E16B006E for <linux-mm@kvack.org>; Wed, 6 Mar 2024 10:51:18 -0500 (EST) Received: from smtpin23.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id CBFEF1C0C6A for <linux-mm@kvack.org>; Wed, 6 Mar 2024 15:51:17 +0000 (UTC) X-FDA: 81867053394.23.B0363A4 Received: from fhigh6-smtp.messagingengine.com (fhigh6-smtp.messagingengine.com [103.168.172.157]) by imf15.hostedemail.com (Postfix) with ESMTP id C3306A000B for <linux-mm@kvack.org>; Wed, 6 Mar 2024 15:51:15 +0000 (UTC) Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=sent.com header.s=fm1 header.b="D 3/9g3o"; dkim=pass header.d=messagingengine.com header.s=fm1 header.b=gErwOZy4; dmarc=pass (policy=none) header.from=sent.com; spf=pass (imf15.hostedemail.com: domain of zi.yan@sent.com designates 103.168.172.157 as permitted sender) smtp.mailfrom=zi.yan@sent.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1709740275; h=from:from:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:in-reply-to: references:dkim-signature; bh=3hLb531CJDlQKpGCSmq0lUwZE8UEmO8lXvTFABPknBA=; b=LR6fhBal5NjVUlYBiZBciveYC4frKdq23qMR8EQ+neRrw1XrmQS977lzNbnjKKfqmlfRlk 0YhrbCZaAWDznUR1C4U4wVn04xQvtFfQvpC6JQDUMlzonrVKblSdXO7/h9pMzLePr+2hLK +pjn1xwyg4Ub2Qam5PdDyz3j7l1uKBg= ARC-Authentication-Results: i=1; imf15.hostedemail.com; dkim=pass header.d=sent.com header.s=fm1 header.b="D 3/9g3o"; dkim=pass header.d=messagingengine.com header.s=fm1 header.b=gErwOZy4; dmarc=pass (policy=none) header.from=sent.com; spf=pass (imf15.hostedemail.com: domain of zi.yan@sent.com designates 103.168.172.157 as permitted sender) smtp.mailfrom=zi.yan@sent.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1709740275; a=rsa-sha256; cv=none; b=n9rF+yfuCAQYyM4fhaxPmv0sXutGuc0P9FgvFktF29J5Bz72ea7qNvR2IMMLbllB/N3Pcr Qp3ZMoaPveIlydnegpOyJjy37UDTeNsTjIPGJNnFdnqiMk2QOXL3fNe2t82GJmVbNw09+o F06glRRbkh1mZU2vb5SefQ9gOpYo1a8= Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailfhigh.nyi.internal (Postfix) with ESMTP id 17A9C114013D; Wed, 6 Mar 2024 10:51:15 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Wed, 06 Mar 2024 10:51:15 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sent.com; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:message-id:mime-version:reply-to :reply-to:subject:subject:to:to; s=fm1; t=1709740275; x= 1709826675; bh=3hLb531CJDlQKpGCSmq0lUwZE8UEmO8lXvTFABPknBA=; b=D 3/9g3oTudqQUm9Z/eAdhH1JmskU9nj4fs3/Ka1KoYhTo56/wweaAl33Q6Ovkrx2o nOvj63G4RBqGnegHRdlCIxDrM1MBPApp+Hi/RV9TS9H1DnXkkqbkCuXwO4LIdvsx Irhsh0IHoZ4sU2jQ48qHF4ljre5FZ6Mdtweb+qclVojQe5kzDXiGNCJVRveyw6FJ qS7CecFYuAZCp1Mu5QDTbB8t4sdCp8J5ZvjwB1lHseecFqwl9zJDIfXzxXEnOfbr WSSf8SjRFRgu8SWOZ/CuDORXsO450opXPH5wGWPa7+E65C1VQULDciEspEw/cPrV N9XJ3cViJhoOT+urcfSfg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:message-id:mime-version:reply-to:reply-to :subject:subject:to:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; t=1709740275; x=1709826675; bh=3 hLb531CJDlQKpGCSmq0lUwZE8UEmO8lXvTFABPknBA=; b=gErwOZy4rk2w+xwnG RIW3kwOj3U1QfzirSiocqhBdCJ3OLSVmEfTC47iIYXstuhV24dQW67pO0ODvpiYl Lz8TKD4l29yXqgq7XsXOxJAoFYNNnq8WR6GeLvZ6mo87Omp1w2UuBxer8tJ5/sZn IbYygh6vHedx1GsJ1G4seD8E2FmLrgGlYpApU5Nrst1sUnkB3uFoXdQ/SszJK82l E7SwxeJZhT3tWfpWJNRZkLwqyoSz/3Tvuk6TVKxPDoaGvRBl84Hyw3TJqbVgvmi2 fGYk0BLapr7O5+hFkUneqAeySjFm2r3X9mq69qSNtZ8AEhTGBGIN5L3hQYnoxML6 MhLuQ== X-ME-Sender: <xms:8pDoZXtGj36mNf341fFlQ19zKPCPtQp3FsHm1ae6-h2bGUkIyiQPAg> <xme:8pDoZYegrYeVdF_ibK7BUfLkMTpZNgJdRYVq9PuAu646dgoaQ4FOiyHrRyDWO-A7n KxWGrSczDuRtRPl5Q> X-ME-Received: <xmr:8pDoZaz7-sjEBL1TKr5Po9jCv92mG0QFk1CUDapRJzZ2c3IgHmDDraignMpPdVdOMxBf_DJSY9bNzTEMKK_jGn21fwNL_gzaN_ZltVRCsJvw5j9y5ujN6QIE> X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledriedugdejjecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvfevufffkfforhggtgfgsehtkeertdertdejnecuhfhrohhmpegkihcujggr nhcuoeiiihdrhigrnhesshgvnhhtrdgtohhmqeenucggtffrrghtthgvrhhnpeetudevhe etheehieetiefhjeevjeeltdfgvdeiueeiudetffdtvedthfetvedtffenucffohhmrghi nhepkhgvrhhnvghlrdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomhepiihirdihrghnsehsvghnthdrtghomh X-ME-Proxy: <xmx:8pDoZWMcbYA6Wqb02zpVAZji7yaDABZ6dhAI4C2Df7LGFJpP0Qn_ow> <xmx:8pDoZX_MffflUsU1MWo-zPLHp2MVfHUUxwFT3oHCzKxKs_Ej65ry1A> <xmx:8pDoZWXIRI4xjVAkTSe-QRC8918KYk_kno7W09-Q4GIrm4pBbcXhUA> <xmx:85DoZY18fKxcD4twN_gfLT-KFm1co38mUus1_wD_nVTesMht6JNo8g> Feedback-ID: iccd040f4:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 6 Mar 2024 10:51:14 -0500 (EST) From: Zi Yan <zi.yan@sent.com> To: gregkh@linuxfoundation.org, stable@vger.kernel.org Cc: Zi Yan <ziy@nvidia.com>, linux-mm@kvack.org, Charan Teja Kalla <quic_charante@quicinc.com>, "Matthew Wilcox (Oracle)" <willy@infradead.org>, David Hildenbrand <david@redhat.com>, Andrew Morton <akpm@linux-foundation.org>, Huang Ying <ying.huang@intel.com>, Naoya Horiguchi <naoya.horiguchi@linux.dev> Subject: [PATCH STABLE v5.4.y] mm/migrate: set swap entry values of THP tail pages properly. Date: Wed, 6 Mar 2024 10:51:13 -0500 Message-ID: <20240306155113.118119-1-zi.yan@sent.com> X-Mailer: git-send-email 2.43.0 Reply-To: Zi Yan <ziy@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Rspam-User: X-Stat-Signature: n436zi8i7or5x46dirxr8k75x6tb8zmk X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: C3306A000B X-HE-Tag: 1709740275-517450 X-HE-Meta: U2FsdGVkX1/C6JQ30iDpSUio8RBdOqkeYUZOgBvG+Rr1YYLfOlTxAWKYyH25q1fhY4Tb2SgZu9bHog0w2g/qeFsYgwAo6SFKeslowP89lY8MWT4UlLHZjUZ82g30ppqgdjERtOKkUIyjH1foPdK3Twkp7od0rifg8cm+65y7eLTk0hKkExGK19BRHsEujKwL+SbWZqGeUo4yQx1aUZ78nPy7bZxV+LiL9jjogN/kkIopFICSWNThCE6GFqFzO4P/mUb2tkLVL2R0qoShP/mjn7BgbA4SEY2s85fb8uji5bxDdRKa9RZZRt5twv1bfitqojBiBtcKOLUvfJKdFJwVbOYLAdhgq/FPFLB5KR17y2PYAKEN3VLEdXyChGuEzU0Vue/9McRAJaJh3ORDiIfciYRORQ0w7ym+29FM1pNISNgAkoVD3Ws2YlF/5IkiQnMpibrYPt+OcTO0s1jV/9itzv4jdLfWInU3hqqO/3pCJthk9bGD+yK9X4bZcFJAwpaWKC0w7I1RY43D0UPAHmPqNMecPD4l2ozYIW9u6iGhO7rZ34Wr3Ns1ohkWCcJqQEezKIwhBlBzJG84bv4ewhZM+ovy70GH05WmWEPCXkGdulAcFtu1eo9sSNC2j4sgzfWnfEQkLCiXDuXkQ1pA6vYTz90f6a5cWnea2L+lFXCDjIT67LO5mAp4XDWw6poyfsGezpuYKthbXuaGUH/Ba6BthTdLpC9tnVL+iChRMAH14KQu0GXt/Y/OlVOzVSxUlNj07SvGUoAcx8ZxjnTcmU3qp2jDPEn7UuH7LVJhs0oXZmfIeSqHByT3F5iAwOalzcuBzAq5uj57+HXo+5LZu8r+l5UlSGMGGvoteZktj3xSG3Hio3PJS5roVEhgxtTR0PEUZabuXi3ZkGzP5sWNu1eoepQhpDR1Z/besvBFC1vx8NXM3DGrhrYukJGkXS/vqN1godVc9iMWaK+h9DBpkwG BMNOWbNd SSnaNQL3ZYgyfbZSTjdHauHRkl19fQO9d4bxiu1HoNaUjEIhmFVyDHE3/vWL3+GnYwarCvy+DpXVa/gHwDvA3iEztIZUQ1TyKzmbIq8VM9J7FHEI= 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: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
[STABLE,v5.4.y] mm/migrate: set swap entry values of THP tail pages properly.
|
expand
|
diff --git a/mm/migrate.c b/mm/migrate.c index 034b0662fd3b..9cfd53eaeb4e 100644 --- a/mm/migrate.c +++ b/mm/migrate.c @@ -441,8 +441,12 @@ int migrate_page_move_mapping(struct address_space *mapping, if (PageSwapBacked(page)) { __SetPageSwapBacked(newpage); if (PageSwapCache(page)) { + int i; + SetPageSwapCache(newpage); - set_page_private(newpage, page_private(page)); + for (i = 0; i < (1 << compound_order(page)); i++) + set_page_private(newpage + i, + page_private(page + i)); } } else { VM_BUG_ON_PAGE(PageSwapCache(page), page);