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=-0.5 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, 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 04C0EC433E0 for ; Tue, 9 Jun 2020 14:46:40 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id B87292072F for ; Tue, 9 Jun 2020 14:46:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=cmpxchg-org.20150623.gappssmtp.com header.i=@cmpxchg-org.20150623.gappssmtp.com header.b="UicR4JIb" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B87292072F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=cmpxchg.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 2DC7E6B0002; Tue, 9 Jun 2020 10:46:39 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 28DF36B0003; Tue, 9 Jun 2020 10:46:39 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1A4E56B0005; Tue, 9 Jun 2020 10:46:39 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0083.hostedemail.com [216.40.44.83]) by kanga.kvack.org (Postfix) with ESMTP id 03ADB6B0002 for ; Tue, 9 Jun 2020 10:46:38 -0400 (EDT) Received: from smtpin29.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id B643D182EDF4C for ; Tue, 9 Jun 2020 14:46:38 +0000 (UTC) X-FDA: 76909949676.29.clam10_1516cf726dc3 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin29.hostedemail.com (Postfix) with ESMTP id 8D9291842161B for ; Tue, 9 Jun 2020 14:46:38 +0000 (UTC) X-HE-Tag: clam10_1516cf726dc3 X-Filterd-Recvd-Size: 4150 Received: from mail-qk1-f194.google.com (mail-qk1-f194.google.com [209.85.222.194]) by imf16.hostedemail.com (Postfix) with ESMTP for ; Tue, 9 Jun 2020 14:46:37 +0000 (UTC) Received: by mail-qk1-f194.google.com with SMTP id q8so20994787qkm.12 for ; Tue, 09 Jun 2020 07:46:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cmpxchg-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=K/z6d17bM6CZ1yRiOWNL2RNldGzd1FsrG0sI3iVgOdY=; b=UicR4JIbN42s8kz0OU+6/Ag9GZZSbq+0yM4FgBbXTtyCBq58aliQiGguIJJDXNrkKS 96LEnAh88GMRNcnytADnFry3HoOGQY0ByuYcVHq9xTgM2aQ+uQVa4V2mt2bJS5A9HyPT VdGzC4RdpUtv4WmbAtK1nVmNWKyb8GbBXIXpCUKvND0akz6zL2J03wQKTvvL5ppjGcwI lfUD+Xp624KOABogal8AdKwZhNOH3tTVeMtDtZ2mnhqVSsZSLrs+y6s4gDH4qm8oQiJ5 UXhgne+FHZwC71UMSeaUiUYUZ06acXylqoK7As8lUhTs3cI1b7UJzr2jS5uPuwNUgq8o kzCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=K/z6d17bM6CZ1yRiOWNL2RNldGzd1FsrG0sI3iVgOdY=; b=IienOlPcPtq1dFahPeiX/0fO2uesdEYB8D9CCxLMCjfIwEEiE14BzC3q8Ron90mXTk 8yZNs1rnYn0e0YjtEuY2QXuC0pHL6nYz7AhoFGIPxLSJekNM4dZ/Sasi+Lk6oz4Rm18n fWQ1Clg08okIqcFKenAAqTw+qmsjUfoy07RIksWy5fiFnRj7XYiOmaiL7J2MVITHNGtY LGBVBUwVjsaZvT1lMhjol6v67kkpdfTiSXVH7MdqtIAHGhh3OOSVkNnOK5hGBRwZvgKa 7H//FAwkGvp/4MX+zMGKjmrURRkb6zDuzE8lmxTEowb9w3oiPThb1xrV94gAotKvuJsi V5SQ== X-Gm-Message-State: AOAM5315/1FJOPM8t/OgpyUSycsIaEYlQNXJWJ/jh8+eiqgPd6m00btT bVJ9QgHdystjHbNV5YOCFkMDoA== X-Google-Smtp-Source: ABdhPJzUlzfAEXmBIoUGNXohwOf1MQpFCkJG/fDZNnAITRiz9+WNk5lph79IKWPxvKqUzgaRsRxMcw== X-Received: by 2002:a37:7c6:: with SMTP id 189mr27091666qkh.24.1591713997119; Tue, 09 Jun 2020 07:46:37 -0700 (PDT) Received: from localhost ([2620:10d:c091:480::1:b568]) by smtp.gmail.com with ESMTPSA id b4sm9087946qka.133.2020.06.09.07.46.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jun 2020 07:46:35 -0700 (PDT) Date: Tue, 9 Jun 2020 10:45:51 -0400 From: Johannes Weiner To: Alex Shi Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org, iamjoonsoo.kim@lge.com, linux-mm@kvack.org, mhocko@suse.com, minchan@kernel.org, mm-commits@vger.kernel.org, riel@surriel.com, torvalds@linux-foundation.org Subject: Re: [patch 113/131] mm: balance LRU lists based on relative thrashing Message-ID: <20200609144551.GA452252@cmpxchg.org> References: <20200603230303.kSkT62Lb5%akpm@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 8D9291842161B X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam04 Content-Transfer-Encoding: quoted-printable 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: On Tue, Jun 09, 2020 at 05:15:33PM +0800, Alex Shi wrote: >=20 >=20 > =E5=9C=A8 2020/6/4 =E4=B8=8A=E5=8D=887:03, Andrew Morton =E5=86=99=E9=81= =93: > > =20 > > + /* XXX: Move to lru_cache_add() when it supports new vs putback */ >=20 > Hi Hannes, >=20 > Sorry for a bit lost, would you like to explain a bit more of your idea= here? >=20 > > + spin_lock_irq(&page_pgdat(page)->lru_lock); > > + lru_note_cost(page); > > + spin_unlock_irq(&page_pgdat(page)->lru_lock); > > + >=20 >=20 > What could we see here w/o the lru_lock? It'll just be part of the existing LRU locking in pagevec_lru_move_fn(), when the new pages are added to the LRU in batch. See this older patch for example: https://lore.kernel.org/linux-mm/20160606194836.3624-6-hannes@cmpxchg.org= / I didn't include it in this series to reduce conflict with Joonsoo's WIP series that also operates in this area and does something similar: https://lkml.org/lkml/2020/4/3/63