Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp419339rwl; Wed, 29 Mar 2023 03:59:22 -0700 (PDT) X-Google-Smtp-Source: AKy350bE7q13Hj+8oNui4pbzZPWGb1FNxOOnEKhfDy7lN7XWlfKuQ3phrR6S37fJAXDc9vswqama X-Received: by 2002:a05:6a00:4e:b0:625:5d2c:e729 with SMTP id i14-20020a056a00004e00b006255d2ce729mr19437277pfk.33.1680087562462; Wed, 29 Mar 2023 03:59:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680087562; cv=none; d=google.com; s=arc-20160816; b=GD/3rPFmBJuzQA0U8X5iH3x+eAM0zssf0ZodZhSoYS/dFYsUkeweOKta4OdAGUwalj M88wPX/vrUHo06XMWvyC2AR/p90Us2R2F5jjl3Ng1P6t8QuqdFSV+ALgFLAyzlfgj3Kh Lh+JtEsEp2IppzCl2seCc3Vwe4KdgJ6v0OlkmXcyHGCoe8S4bnRRrXIBbur41pURh8dI nLRoWXMmEHsERFub8K/OCn/6qoFodVGmPosXrYNyDTcsOgpsTGY7Q05u+T0wmKNKaMIi GI7sd4tcnQxi9EiHY3bNxmQu+Z1el/3uCIFYi7yqrRA3UkbKzowF2izBm5FE1bChHwOp v49A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:to:from; bh=JDsgX5hU+79t1EGeMejbU9n1MCVJlPWcOjWCjqkX9Qs=; b=UWBm76Ee7dhOb4GvinPuXaMo8hrn3HMzuDfbkrb13NXvi39eM6Bt5D5udJvKgqFRgW 7Itd6lyAgJORCD6s97A0ssKJQDWv3l1IS9kAgZyQj7WEvVBT3Ni0JVVomudv99ZIPAok I0kDBt1hoIAL2IkyO5WKHqrIggL0OQ89PrVxoXNlU3ycldwLbYP68cuEjsWW763IuhIZ SD4Oo0pD9iWPGSpoSK7/t4Hv09atBMx4HEwLFmvIAcpTNSmaJTPfrMmRIXPEIvGtFb3S B5rMBOHYNQCkn3a99JQRBZ6WMOKb7QLvP1uDH5GT3OK/cSlotryuwCiVWvHVtWAZIBYx PJ2A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bm18-20020a656e92000000b00502e7406695si29739389pgb.316.2023.03.29.03.59.04; Wed, 29 Mar 2023 03:59:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230348AbjC2Ksa (ORCPT + 99 others); Wed, 29 Mar 2023 06:48:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51190 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229918AbjC2Ks3 (ORCPT ); Wed, 29 Mar 2023 06:48:29 -0400 Received: from SHSQR01.spreadtrum.com (unknown [222.66.158.135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D74851FC3 for ; Wed, 29 Mar 2023 03:48:26 -0700 (PDT) Received: from SHSend.spreadtrum.com (bjmbx01.spreadtrum.com [10.0.64.7]) by SHSQR01.spreadtrum.com with ESMTP id 32TAlrt7027417; Wed, 29 Mar 2023 18:47:53 +0800 (+08) (envelope-from zhaoyang.huang@unisoc.com) Received: from bj03382pcu.spreadtrum.com (10.0.74.65) by BJMBX01.spreadtrum.com (10.0.64.7) with Microsoft SMTP Server (TLS) id 15.0.1497.23; Wed, 29 Mar 2023 18:47:51 +0800 From: "zhaoyang.huang" To: Andrew Morton , Johannes Weiner , , , Zhaoyang Huang , Subject: [PATCH] mm: mark folio as workingset in lru_deactivate_fn Date: Wed, 29 Mar 2023 18:47:35 +0800 Message-ID: <1680086855-7989-1-git-send-email-zhaoyang.huang@unisoc.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.0.74.65] X-ClientProxiedBy: SHCAS03.spreadtrum.com (10.0.1.207) To BJMBX01.spreadtrum.com (10.0.64.7) X-MAIL: SHSQR01.spreadtrum.com 32TAlrt7027417 X-Spam-Status: No, score=0.0 required=5.0 tests=SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Zhaoyang Huang folio will skip of being set as workingset in lru_deactivate_fn. Signed-off-by: Zhaoyang Huang --- mm/swap.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mm/swap.c b/mm/swap.c index 70e2063..4d1c14f 100644 --- a/mm/swap.c +++ b/mm/swap.c @@ -603,6 +603,7 @@ static void lru_deactivate_file_fn(struct lruvec *lruvec, struct folio *folio) lruvec_del_folio(lruvec, folio); folio_clear_active(folio); folio_clear_referenced(folio); + folio_set_workingset(folio); if (folio_test_writeback(folio) || folio_test_dirty(folio)) { /* @@ -637,6 +638,7 @@ static void lru_deactivate_fn(struct lruvec *lruvec, struct folio *folio) lruvec_del_folio(lruvec, folio); folio_clear_active(folio); folio_clear_referenced(folio); + folio_set_workingset(folio); lruvec_add_folio(lruvec, folio); __count_vm_events(PGDEACTIVATE, nr_pages); -- 1.9.1