Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp776547iob; Thu, 12 May 2022 04:34:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx8815l3qR3FGl6xprF9WmiQsZAKde0Fs97n7yw0KdmZnlC9ln0g/5xHCZr2p37PaFM3z3n X-Received: by 2002:a63:1222:0:b0:3c2:57a8:36c5 with SMTP id h34-20020a631222000000b003c257a836c5mr24422095pgl.328.1652355257585; Thu, 12 May 2022 04:34:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652355257; cv=none; d=google.com; s=arc-20160816; b=U1l9Fhy9unBaYPBqt1wwA4hPdLQ+cCaeEJYwcA9Zu8fov6WbD1FDO71tjyy70gOUeJ +NrPKUDEaPovmhiSoATfrVr3Mt2kH6G6iOuu+9cA3DDCD0Kg0jaM2KJgl6To8eBejewa hCGSUB1/OutlVUr/ORTCX3vZmGRZ7YjUcsuDPGXQ4vuX+TRrqzzaOy77zesYyp2oM4TF etPjK7NFQ5hLPD6p8BtPXMsg6rwgM+o7c/ZKDWSqcGHGnl1475kJ6tW5HXX74KsKdKYu 8+l2CwhF0HPM+OXqjuvnKj4nuMMRZ1AL5+6F3rZ9xxQWzWWsMdSOYXpmaWn9Yjg5ndbF rb0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=t9OdET4GHQa6ShdPkdWNXpGoIQL4zzY2kOuNOpzCIb0=; b=ozLkG1ObCTBDg1hjNYFcENkFaHmbfyKegwriC3uzrg2DDlF67bmvyw8gXSXgg8yvy7 +qPmHZoO9i+ekOc1GAiBt/vWAOwDajyixCMDowle3lPEAqBxcFG6cyf4U6Qc9KW1qrKK aX2nAQ18f5XyFz+RqgiiikkMHkfo5Pho8kH5cG6KXSNr2i8l3TLRWh5DTN41llRa1zQE Qqj06xYFxQPtVLTKRli0XLjeahythH48QERgIjkEcBV2N+/aMRgD/uaj/boUpxiYQ6/D zcEasl3JUhQ52x2BDapj2F8owIGEwAIkpoW5llUNWMBJj5w51q8BKcGygVwVbRwP3Gy0 toQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=pEXmVdnJ; 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 f13-20020a65400d000000b003aa661aee4fsi3188145pgp.554.2022.05.12.04.34.02; Thu, 12 May 2022 04:34:17 -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=@linux-foundation.org header.s=korg header.b=pEXmVdnJ; 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 S236768AbiELCF2 (ORCPT + 99 others); Wed, 11 May 2022 22:05:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38038 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234973AbiELCF0 (ORCPT ); Wed, 11 May 2022 22:05:26 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 79239606E3 for ; Wed, 11 May 2022 19:05:25 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id EEB4060C47 for ; Thu, 12 May 2022 02:05:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 09974C340EE; Thu, 12 May 2022 02:05:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1652321124; bh=yxFRds1Pcg/OQ1UUPuRr6YvsChTNPVzsOfJva8s6jvo=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=pEXmVdnJizJwS6RzO8590cF/lPKNz00suPvYyvizRI5sKB8CJIErNrzEDaUbvg9dE VIRveG9ox9HlD4bjI3S8sW48i4ZJWS+BdgvJhWfYw0fuh5CIDWqmMXUzDdxssjpP28 2qjaUq02IscCgOxHdyQDb+rTbg+JSc9jPgTrJF3g= Date: Wed, 11 May 2022 19:05:23 -0700 From: Andrew Morton To: Minchan Kim Cc: LKML , linux-mm , Suren Baghdasaryan , Michal Hocko , John Dias , Tim Murray , Matthew Wilcox , Vladimir Davydov , Martin Liu , Johannes Weiner Subject: Re: [PATCH v4] mm: don't be stuck to rmap lock on reclaim path Message-Id: <20220511190523.7d159b2e9caccbf13469e74e@linux-foundation.org> In-Reply-To: References: <20220510215423.164547-1-minchan@kernel.org> <20220511153349.045ab3865f25920dce11ca16@linux-foundation.org> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 Wed, 11 May 2022 15:57:09 -0700 Minchan Kim wrote: > > > > Could we burn much CPU time pointlessly churning though the LRU? Could > > it mess up aging decisions enough to be performance-affecting in any > > workload? > > Yes, correct. However, we are already churning LRUs by several > ways. For example, isolate and putback from LRU list for page > migration from several sources(typical example is compaction) > and trylock_page and sc->gfp_mask not allowing page to be > reclaimed in shrink_page_list. Well. "we're already doing a risky thing so it's OK to do more of that thing"? > > > > Something else? > > One thing I am worry about was the granularity of the churning. > Example above was page granuarity churning so might be execuse > but this one is address space's churning, especically for file LRU > (i_mmap_rwsem) which might cause too many rotating and live-lock > in the end(keey rotating in small LRU with heavy memory pressure). > > If it could be a problem, maybe we use sc->priority to stop > the skipping on a certain level of memory pressure. > > Any thought? Do we really need it? Are we able to think of a test which might demonstrate any worst case? Whip that up and see what the numbers say? It's a bit of a drag, but if we don't do it, our users surely will ;)