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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B0244C4332F for ; Wed, 14 Dec 2022 09:49:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237946AbiLNJtm (ORCPT ); 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> 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