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=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no 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 D0AE4C433DB for ; Fri, 15 Jan 2021 08:48:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7D0112313E for ; Fri, 15 Jan 2021 08:48:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731179AbhAOIs0 (ORCPT ); Fri, 15 Jan 2021 03:48:26 -0500 Received: from mga06.intel.com ([134.134.136.31]:22645 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730254AbhAOIsY (ORCPT ); Fri, 15 Jan 2021 03:48:24 -0500 IronPort-SDR: otUwOAszHYWRxGY+bfkDb+r+kJnozbTdyqLaFkYXt5+pGT8E4ysiYJTl1VhELzH7Z4UcwzBohT i6oPGt2qlYcQ== X-IronPort-AV: E=McAfee;i="6000,8403,9864"; a="240064778" X-IronPort-AV: E=Sophos;i="5.79,349,1602572400"; d="scan'208";a="240064778" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Jan 2021 00:47:41 -0800 IronPort-SDR: on8+Bxc11wN/xt986f7vAgSqLFvRKTLK70zFKK8TkcK1dLMvz+SQfPzAnK97FPsY7Z2ZFHm+Gz 7AewwwY1uGYw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.79,349,1602572400"; d="scan'208";a="354226722" Received: from yhuang-dev.sh.intel.com (HELO yhuang-dev) ([10.239.159.145]) by fmsmga008.fm.intel.com with ESMTP; 15 Jan 2021 00:47:38 -0800 From: "Huang\, Ying" To: Linus Torvalds Cc: huang ying , Matthew Wilcox , Andrew Morton , Linux-MM , Linux Kernel Mailing List , Peter Xu , Hugh Dickins , Johannes Weiner , Mel Gorman , Rik van Riel , Andrea Arcangeli , Michal Hocko , Dave Hansen , Tim Chen Subject: Re: [PATCH] mm: Free unused swap cache page in write protection fault handler References: <20210113024241.179113-1-ying.huang@intel.com> <20210113031142.GM35215@casper.infradead.org> Date: Fri, 15 Jan 2021 16:47:37 +0800 In-Reply-To: (Linus Torvalds's message of "Wed, 13 Jan 2021 13:09:31 -0800") Message-ID: <87sg72vb6e.fsf@yhuang-dev.intel.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=ascii Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Linus Torvalds writes: > On Tue, Jan 12, 2021 at 9:24 PM huang ying wrote: >> > >> > Couldn't we just move it to the tail of the LRU list so it's reclaimed >> > first? Or is locking going to be a problem here? >> >> Yes. That's a way to reduce the disturbance to the page reclaiming. >> For LRU lock contention, is it sufficient to use another pagevec? > > I wonder if this is really worth it. I'd like to see numbers. > > Because in probably 99%+ of all cases, that LRU dance is only going to > hurt and add extra locking overhead and dirty caches. > > So I'd like to see some numbers that it actually helps measurably in > whatever paging-heavy case... OK. I will start from a simpler version and only use a pagevec if there's measurable difference. Best Regards, Huang, Ying