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.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 1B568C433E0 for ; Wed, 10 Jun 2020 05:24:11 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C53C4207F9 for ; Wed, 10 Jun 2020 05:24:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="sH1hR/ft" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C53C4207F9 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 6EC076B0002; Wed, 10 Jun 2020 01:24:10 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 674E66B0005; Wed, 10 Jun 2020 01:24:10 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 53C536B0006; Wed, 10 Jun 2020 01:24:10 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0225.hostedemail.com [216.40.44.225]) by kanga.kvack.org (Postfix) with ESMTP id 381C26B0002 for ; Wed, 10 Jun 2020 01:24:10 -0400 (EDT) Received: from smtpin02.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id DD6C2180AEF50 for ; Wed, 10 Jun 2020 05:24:09 +0000 (UTC) X-FDA: 76912161018.02.shape56_3f02a9d26dc8 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin02.hostedemail.com (Postfix) with ESMTP id BBF671E11 for ; Wed, 10 Jun 2020 05:24:09 +0000 (UTC) X-HE-Tag: shape56_3f02a9d26dc8 X-Filterd-Recvd-Size: 4798 Received: from mail-qt1-f195.google.com (mail-qt1-f195.google.com [209.85.160.195]) by imf17.hostedemail.com (Postfix) with ESMTP for ; Wed, 10 Jun 2020 05:24:09 +0000 (UTC) Received: by mail-qt1-f195.google.com with SMTP id g62so840668qtd.5 for ; Tue, 09 Jun 2020 22:24:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=stGYbyy0hIe7gMKA+zTlsc1pHHaFqBnSNnTM1vxhGKQ=; b=sH1hR/ftg7dbREqfBeQfywQVOoxKF3sIqXK2QX136WVvT/h4dfC3Hl8BWk2LIiO4v2 ebsj9ltehqZnk72848Dp/lMT7CPR/VYQTiX3pR0QmXptTFIyotit+3OGCR7ehLV2Mnd9 PQSeYv584hymmo/eNDDFilggT/r1hTXQxuxImm3sipYpIT69G/EXGDX76bTMhw0GehN8 hnJyWBrVIfEqxfWrhJHfFzP+H4XVCbgkIBpXlWxU/kNMm85NEmK3+Ma2hNzeDVHk5CIc fvOdhfF/oQ5RomnARokjpgc4BYk267IDKqfhWAJD4R/QK7YWL7EhTavcnimr9zIfh8T8 vYUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=stGYbyy0hIe7gMKA+zTlsc1pHHaFqBnSNnTM1vxhGKQ=; b=nrTrx9CSA1lont6gF4F+lsNMMqzSNmmfX++mAMnxjB6g8VteaN1wOwLDbKZq6vysDE xwMc/uEd67vadI7PHCaeZP3j9DzsA51INw9bjcAin/p6TRj7wSTU9dS852d2QQGPII3a 8mYfhjNPOYq3CNXr+NZ3Qx45m7GXWVipdAR8SYb6nU7ZdxmeG2ssPnNaRr5YmbjXUbB1 o8XtFXDEaCeYWhWpRnP1aB5wj1MF/3zxxGOH+v1vuTW95/O5kEVsuLsI9YAw3jNRTNEb zfww5/P9ckD3vGZd0B5o9Lyt0dgqzffTTSMoBNNpRTDjILPB6Fgeqp9HKI5w5loc7G35 NYYw== X-Gm-Message-State: AOAM5336eFhaEBJemEIRCYrUM6xP9OfsOJtOpNCqSTKqgIhNY7F4fudA l0imCTjGNZU+CmSFP2XZCAMcD0Lcv2HaN0ZCjBI= X-Google-Smtp-Source: ABdhPJwS1Vbp0l7/qFukLruWw2/DM2AotG/IwW7Hj0E6hxH7fGTPOWujbInp5kKoPKMdHOe4g8sGnOqC62TGe3dflnw= X-Received: by 2002:aed:2359:: with SMTP id i25mr1440164qtc.194.1591766648490; Tue, 09 Jun 2020 22:24:08 -0700 (PDT) MIME-Version: 1.0 References: <20200603230303.kSkT62Lb5%akpm@linux-foundation.org> <20200609144551.GA452252@cmpxchg.org> In-Reply-To: <20200609144551.GA452252@cmpxchg.org> From: Joonsoo Kim Date: Wed, 10 Jun 2020 14:23:57 +0900 Message-ID: Subject: Re: [patch 113/131] mm: balance LRU lists based on relative thrashing To: Johannes Weiner Cc: Alex Shi , LKML , Andrew Morton , Joonsoo Kim , Linux Memory Management List , Michal Hocko , =?UTF-8?B?6rmA66+87LCs?= , mm-commits@vger.kernel.org, Rik van Riel , Linus Torvalds Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: BBF671E11 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam04 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: 2020=EB=85=84 6=EC=9B=94 9=EC=9D=BC (=ED=99=94) =EC=98=A4=ED=9B=84 11:46, J= ohannes Weiner =EB=8B=98=EC=9D=B4 =EC=9E=91=EC=84=B1: > > On Tue, Jun 09, 2020 at 05:15:33PM +0800, Alex Shi wrote: > > > > > > =E5=9C=A8 2020/6/4 =E4=B8=8A=E5=8D=887:03, Andrew Morton =E5=86=99=E9= =81=93: > > > > > > + /* XXX: Move to lru_cache_add() when it supports new vs putback *= / > > > > Hi Hannes, > > > > Sorry for a bit lost, would you like to explain a bit more of your idea= here? > > > > > + spin_lock_irq(&page_pgdat(page)->lru_lock); > > > + lru_note_cost(page); > > > + spin_unlock_irq(&page_pgdat(page)->lru_lock); > > > + > > > > > > 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: Thanks! > https://lkml.org/lkml/2020/4/3/63 I haven't completed the rebase of my series but I guess that referenced pat= ch "https://lkml.org/lkml/2020/4/3/63" would be removed in the next version. Before the I/O cost model, a new anonymous page contributes to the LRU recl= aim balance. But, now, a new anonymous page doesn't contributes to the I/O cost so this adjusting patch would not be needed anymore. If anyone wants to change this part, "/* XXX: Move to lru_cache_add() when it supports new vs putback */", feel = free to do it. Thanks.