Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1867925rwl; Thu, 30 Mar 2023 02:36:53 -0700 (PDT) X-Google-Smtp-Source: AKy350Yha7Qhzn2nryTFMJEl8PT1F9tYEhZbr0dA+YDijqfWUxqCD3uhCBC12DzhRBkAIf9Rouc0 X-Received: by 2002:a17:906:190:b0:8eb:fb1a:6970 with SMTP id 16-20020a170906019000b008ebfb1a6970mr567379ejb.1.1680169013246; Thu, 30 Mar 2023 02:36:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680169013; cv=none; d=google.com; s=arc-20160816; b=zFY9c/WknkcK18mVdcs8ORqzmn8WZ8Fk2iE3w6vxVqyQs0ZCcqgkPrqV2sJWNUB3Ai FcseKIwHLFUNuviibSJ/KruWxLB7WLKt0BMD2NrR38+B9+ub93MFoj6Es00bjFRVZkVi p1VEW4PCBjQTKySAa3PjfAVlPHR/OW6chRn/EV7P3sg7b05K+xFcSJv2OlcUVLvHIPdu XWNa4T/euQGPkqDHC2bxIWBBLH+NmEoOLqm3sqrcY9bL6e4XgY6o4oTrC8rHnJ0VrKd5 HMiZ9d0WnPIRz5t7rG9damEAM/TR0ojhOrZUY6+UIMihRYt6nGZxytFcHLsdmWWllm2D gUGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=dhY9/3aNsTwYD8JARE0vudUjZ+1QcHbCGg2fnRM4sRI=; b=AxZgtTjSxN1lhdt2T0gp2mRRAsfm7YDu4scVo/jHAjdLVLzbc2Ig86Agj7bJuQV7l3 vog0YRC0yXG71yxIXgH485/iepSXeEopw8pmCMrGchFFzsTdJYVMdWZCMbO7/9swbdzx yVPvpuWlqLG/UtuH1Xw54qsVMGr6iT4NB2HZ0F2i8uiyAkXg2OCyXvLRqzqqc6Yhlrb8 SUP+xjW+OEwC4mf7UQEcu1pVxbtMq8cG9aovkIeOQVkB3cs6QT5fQ/dEexSz6CDE/az2 4gv9fAoQoNvfvFToe5Yysi7WlOFIJgj/fJhuHrOFTaLxJr+uXFlFTK1JiED0qVt6luhi cO0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cmpxchg-org.20210112.gappssmtp.com header.s=20210112 header.b=vc4nJO23; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=cmpxchg.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r10-20020a170906704a00b009299f251a20si34850066ejj.152.2023.03.30.02.36.28; Thu, 30 Mar 2023 02:36:53 -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; dkim=pass header.i=@cmpxchg-org.20210112.gappssmtp.com header.s=20210112 header.b=vc4nJO23; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=cmpxchg.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229966AbjC3Jcf (ORCPT + 99 others); Thu, 30 Mar 2023 05:32:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59900 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229852AbjC3Jca (ORCPT ); Thu, 30 Mar 2023 05:32:30 -0400 Received: from mail-ed1-x535.google.com (mail-ed1-x535.google.com [IPv6:2a00:1450:4864:20::535]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C24AD7687 for ; Thu, 30 Mar 2023 02:32:07 -0700 (PDT) Received: by mail-ed1-x535.google.com with SMTP id er13so32972701edb.9 for ; Thu, 30 Mar 2023 02:32:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cmpxchg-org.20210112.gappssmtp.com; s=20210112; t=1680168726; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=dhY9/3aNsTwYD8JARE0vudUjZ+1QcHbCGg2fnRM4sRI=; b=vc4nJO23T2Q2lm2HKPBkW1KZABzY9+vE8sCq1qfaQlT9LzrfpSEHyhy/fblPbrusvi 5ljMIY9ieK6OqfgZk9k31oF8z11eSj3mLin6FflkRZPD91D7euhQdWvbhBF2kNU9paEm EEUw9SRQy1MrHtrfb12j5CE1ElgR/ONERAchYFL1H/hMTAyYkOodcbvjut+H0Gt1yVTG ++/e2sNL9VSlMmfrCRFE5e3GT+zR1Dv20Kq5ZwQZ/sTOOR9IsqnFOD8Z2F9n2VBuwrsZ 1m31fck8eJr9WqAg9xYNfCyv+/rXVkQZsaGeEeFh+VjMriQKGe31laXefWKbC5BA+oOn vvWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680168726; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=dhY9/3aNsTwYD8JARE0vudUjZ+1QcHbCGg2fnRM4sRI=; b=iTJVWZBfQIxBQlajB9IsckEUd3BbVkeurMGfatosqhuG60sBUqT/e2cb788R0j+yAy iAFX8U4PMK6+W3TfJxFKdCmu84Pw1B+/Tu7w9JRwugG8XdfFqzDNB0YMBPefuvy9bJuA 15uG9n/La/kLEz0zfsmLqLiAFxU00MDgiQ2UBJTEMaij+RoAwxL6PD+zrEjmZO7Izhpt FXaFeb6xrnDoqHhmN2MbQjpbpIKuK39rZxjob7TEYgzihSzKmKyOnL5xA2N3Sq8n0xNo VlGXb91EwfPCqaJI/QmB4BEL+RK5feFSieziHCkxD6WiGPt/0kRxMcmF5e9tYsG+qEOZ Hh2g== X-Gm-Message-State: AAQBX9csm7P2ra8ATmutiy56QqRi/X4PIJjvmgJirhW1ff7mFpe4rorA B5DTaL20c8btVbolumELaFBfRg== X-Received: by 2002:a17:907:25cb:b0:946:f79b:e785 with SMTP id ae11-20020a17090725cb00b00946f79be785mr6532593ejc.2.1680168726200; Thu, 30 Mar 2023 02:32:06 -0700 (PDT) Received: from localhost ([2a02:8070:6387:ab20:5139:4abd:1194:8f0e]) by smtp.gmail.com with ESMTPSA id lt11-20020a170906fa8b00b008e54ac90de1sm17437256ejb.74.2023.03.30.02.32.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Mar 2023 02:32:06 -0700 (PDT) Date: Thu, 30 Mar 2023 05:32:04 -0400 From: Johannes Weiner To: Zhaoyang Huang Cc: "zhaoyang.huang" , Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, ke.wang@unisoc.com Subject: Re: [PATCH] mm: mark folio as workingset in lru_deactivate_fn Message-ID: References: <1680086855-7989-1-git-send-email-zhaoyang.huang@unisoc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=0.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, RCVD_IN_DNSWL_NONE,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 On Thu, Mar 30, 2023 at 09:38:48AM +0800, Zhaoyang Huang wrote: > On Wed, Mar 29, 2023 at 10:55 PM Johannes Weiner wrote: > > > > On Wed, Mar 29, 2023 at 06:47:35PM +0800, zhaoyang.huang wrote: > > > From: Zhaoyang Huang > > > > > > folio will skip of being set as workingset in lru_deactivate_fn. > > > > Can you please elaborate why that's undesirable? What's the problem > > you're fixing? > If I am correct, folio will skip being set as workingset when moving > from active lru to inactive lru, which is performed on every folio in > shrink_active_list during normal reclaim. shrink_active_list directly calls folio_set_workingset(). The function you're editing is used for things like MADV_COLD and truncate(). It sounds like there is just a misunderstanding of the code, not an actual problem.