Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5A633C433F5 for ; Wed, 15 Dec 2021 12:37:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242579AbhLOMhJ (ORCPT ); Wed, 15 Dec 2021 07:37:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52646 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242567AbhLOMhF (ORCPT ); Wed, 15 Dec 2021 07:37:05 -0500 Received: from mail-yb1-xb2e.google.com (mail-yb1-xb2e.google.com [IPv6:2607:f8b0:4864:20::b2e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E957BC06173F for ; Wed, 15 Dec 2021 04:37:04 -0800 (PST) Received: by mail-yb1-xb2e.google.com with SMTP id d10so54903681ybn.0 for ; Wed, 15 Dec 2021 04:37:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=K8r8XSvSuYu3ZxgnX8Iq0jqKYxog5KOUtPtLKnhEkEw=; b=4AghxD+KT7s9yyElNwN0c1w4aNYag2FvFgEPc3cpIfezoxE3NZoiARw3vAa2yfY3hS mw4n3mu7LS8hUEQJdwZdCZrpAhDjhD85Tj79vszagcjseK8hZnI2rN28Gqc1wGXyTzRM 71tD+sziOM3stmstau3gQY+2HNKAUpGP2vlVtzaGEP+V2HHCS4Aqc4j2dmP/AV6QFx/2 jI1B3buJphwPACrGU5LRR5B2i2jKjCRGf3koV/uPKRBOZQhGbcsiyFf4Y6v2l5yW+ejD DL9TjdFNqQg9FyhizICVZK1xqnOkJGODiQmuC/1oesPvmXMbI4vBBAyuO4GGaukq+0LM EuzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=K8r8XSvSuYu3ZxgnX8Iq0jqKYxog5KOUtPtLKnhEkEw=; b=vWIxtQFEjTTYb4Omx4rmIc08Fk6JIK1jFSKEQ7In4cWf/IYmT2zeheahLu24bnxWzX Qk2oVfuIK5H+CPy5+kP+BJV0pRWr9gGjtWWvv3VtHziJqZrHW02daqQR3y6ZNUyuveu/ uh5FurJXnVzncNU5yfiV97uetpoi+wriARjyi7BogobXM3Fi8cnrzGgQLZdxTbysVZ7p mVDahKMMi7XoFx3epNWoL9Ob65Zt7ihj+w1t5nON+Ox2bWD0tmz5gmlr5yXY82DMQ6kI ZQldCP8PMHG1xtKsKmuR35wzfGPQSdMWVmK/8QWKXxGYsLGscMOCaTrWPpjZqvtxXV+D K3LA== X-Gm-Message-State: AOAM531T47368Ej3Uh94SO5OigUtT3YG5TYajgpd1tIR6iR0tw6qCsLw ShoheLsaYNrhBukkZCdP6JjrGNFMUnoUgVjmOrZ/gQ== X-Google-Smtp-Source: ABdhPJy7XuDUBZjUXayR4SOS35Xzmwel1sEN2LoYxG/u2Rr6YggD031pTlQUTqN+7t/G1Dw+lmYcEL/VApAhalHOoWY= X-Received: by 2002:a25:b285:: with SMTP id k5mr6012330ybj.132.1639571824184; Wed, 15 Dec 2021 04:37:04 -0800 (PST) MIME-Version: 1.0 References: <20211213165342.74704-1-songmuchun@bytedance.com> <20211213165342.74704-10-songmuchun@bytedance.com> In-Reply-To: From: Muchun Song Date: Wed, 15 Dec 2021 20:36:28 +0800 Message-ID: Subject: Re: [PATCH v4 09/17] mm: workingset: use xas_set_lru() to pass shadow_nodes To: Johannes Weiner Cc: Matthew Wilcox , Andrew Morton , Michal Hocko , Vladimir Davydov , Shakeel Butt , Roman Gushchin , Yang Shi , Alex Shi , Wei Yang , Dave Chinner , trond.myklebust@hammerspace.com, anna.schumaker@netapp.com, jaegeuk@kernel.org, chao@kernel.org, Kari Argillander , linux-fsdevel , LKML , Linux Memory Management List , linux-nfs@vger.kernel.org, Qi Zheng , Xiongchun duan , fam.zheng@bytedance.com, Muchun Song Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 14, 2021 at 10:09 PM Johannes Weiner wrote: > > On Tue, Dec 14, 2021 at 12:53:34AM +0800, Muchun Song wrote: > > The workingset will add the xa_node to shadow_nodes, so we should use > > xas_set_lru() to pass the list_lru which we want to insert xa_node > > into to set up the xa_node reclaim context correctly. > > > > Signed-off-by: Muchun Song > > Ah, you can't instantiate the list on-demand in list_lru_add() because > that's happening in an atomic context. So you need the lru available > in the broader xa update context and group the lru setup in with the > other pre-atomic node allocation bits. Fair enough. I think it would > be a bit easier to read if this patch and the previous one were > squashed (workingset is the only user of xa_lru anyway) and you added > that explanation. But other than that, the changes make sense to me; > to a combined patch, please add: > Great. I'll do it. Thanks for your review. > Acked-by: Johannes Weiner