Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp744771rwb; Wed, 14 Dec 2022 02:08:08 -0800 (PST) X-Google-Smtp-Source: AA0mqf4DTFpkV9pJ4oDkwLvdfuELP5SR7q4oIqp9lP5KXDd/jHBrMhY9FEnryqUZHhf2RpjB0uIU X-Received: by 2002:a17:903:24b:b0:189:d8fb:151f with SMTP id j11-20020a170903024b00b00189d8fb151fmr26076437plh.23.1671012488681; Wed, 14 Dec 2022 02:08:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671012488; cv=none; d=google.com; s=arc-20160816; b=qobEWz7GA43fmVXs3bwjXfB45Qr5tdRPcmOGndJhIQ7AwfoGXLcfid2st7NOruxyAW 3M/Evml0TdCB2FF5PjYaPoBYVyzTmMVLBSGXS4zEGZppJb1WQztBlD9x6qLKtfpVZ+ph FpckltCaFnYJK0yjFiXuy43XqjwyOCTuSyE6VBihmxF/BYReVN7cT/ZU3vc/vR1CDoyO BiKWDSqr4rrdb64dwnU4Nw6i12GnJZgts/XU05/OhwkVEe+nsGqu5y3uOL/lYujYLISo 7S01avG6c3xPObzHhPE7aNOMIGL6KZZR+oN74ub+AHvPT4QROSJBtMoxO8HG/8B0KYvE IwSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=pHdWVKfeYZq6y/WmzLIRqkeKhdSpQQ7ZcE8kCD7Cabo=; b=tbylQcQzhxS486ZkyeYZEGTcncHtrsgqefKTt/W6HkQsTfibLolVuHNAjG+yy+doP/ kh9R/n7NM4Sq/E4JAv1iNiR4yIXjHKilVc7Pt3Sor8I6Wq4PmVv0VaiFYbEJpsVMSoGs 3HyCUs4ym9Ml9Q8ZNSfvP/IKicaVL+XhZoU/gJFAjBlmFxJYvIgOpvfPfVO9Xdvy63KP wwJoRwH1MX/FOuiSLUkA4FhKig9jXQ+WlqdFF+h5u7yGsiIpyyTuHgMA/AH951sMQbkz R43+pYZor1QWYSuETXXnCNcinlRl7KqrrHtORW4EPTor8+b5Gx86WIdC5i3KHidMKuW2 uUYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=WINsMeIS; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n11-20020a170902e54b00b001895608367csi2358900plf.535.2022.12.14.02.07.59; Wed, 14 Dec 2022 02:08:08 -0800 (PST) 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=@suse.com header.s=susede1 header.b=WINsMeIS; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237945AbiLNJtm (ORCPT + 71 others); Wed, 14 Dec 2022 04:49:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53484 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237936AbiLNJtk (ORCPT ); Wed, 14 Dec 2022 04:49:40 -0500 Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9584FFCF3 for ; Wed, 14 Dec 2022 01:49:35 -0800 (PST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 401F3220CD; Wed, 14 Dec 2022 09:49:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1671011374; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=pHdWVKfeYZq6y/WmzLIRqkeKhdSpQQ7ZcE8kCD7Cabo=; b=WINsMeISNalOR9upZ+0zhqD+eZzA+K5UzPcgXbfrec5WJLpmu6F33xROuLt1RRVcU17Dm3 XTLFJYVUZUPLWiGEFqHd6gf9kKA1i7QH2ouzh1B322Vn3xwNwLEcq8IjWKSbP1inLxoEX0 wOklHx1ozM3ahD0HytipguTpTcVjw0M= Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 2082E138F6; Wed, 14 Dec 2022 09:49:34 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id vlxCBS6cmWPOCwAAMHmgww (envelope-from ); Wed, 14 Dec 2022 09:49:34 +0000 Date: Wed, 14 Dec 2022 10:49:33 +0100 From: Michal Hocko To: "Huang, Ying" Cc: Dave Hansen , Yang Shi , Wei Xu , Johannes Weiner , Andrew Morton , linux-mm@kvack.org, LKML , Feng Tang Subject: Re: memcg reclaim demotion wrt. isolation Message-ID: References: <87o7s6g09b.fsf@yhuang6-desk2.ccr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87o7s6g09b.fsf@yhuang6-desk2.ccr.corp.intel.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS 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 14-12-22 10:57:52, Huang, Ying wrote: > Michal Hocko writes: [...] > > This makes sense but I suspect that this wasn't intended also for > > memcg triggered reclaim. This would mean that a memory pressure in one > > hierarchy could trigger paging out pages of a different hierarchy if the > > demotion target is close to full. > > It seems that it's unnecessary to wake up kswapd of demotion target node > in most cases. Because we will try to reclaim on the demotion target > nodes in the loop of do_try_to_free_pages(). It may be better to loop > the zonelist in the reverse order. Because the demotion targets are > usually located at the latter of the zonelist. Reclaiming from demotion targets first would deal with that as well. Thanks! Let's establish whether this is something we really need/want fix first. -- Michal Hocko SUSE Labs