Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2328868rwb; Fri, 9 Dec 2022 00:14:52 -0800 (PST) X-Google-Smtp-Source: AA0mqf4OPi/zGLsJiiBlZ8jE3Qdhf5zIDvVhzUnS0kf1HXfk/WK0uIESlz9uKWh87dIfKnm9fK+W X-Received: by 2002:a17:906:2a95:b0:7ad:b14e:d108 with SMTP id l21-20020a1709062a9500b007adb14ed108mr4349680eje.66.1670573691981; Fri, 09 Dec 2022 00:14:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670573691; cv=none; d=google.com; s=arc-20160816; b=QRI6x66uEpAPxAMihIGNAMeRQPpLJCG1tlTKNNvYUIeTfLz6tWAYifhiO+l94mn6vd qhwIsqwpXno273f23fjiq9zLQ5UutoVsB3ls9qaVpJQ8ROiwkx57JiIUAGaxPG9QujTc FRbSzRUY0Rhn4j1ssfj4SsU0RHJELNpW6qwX94QNOD8PW64TYCtkkFkRSDmtpmiih9mk my1BguJXzO3vk1/LBeFaIR8sJjFO/csNXoqpwY6sXW3q82PM7+gG8EEOzWzE2U/dBFCW fjCUIupZwmHifsRNXBn2lq1CXDB/nOypKlR7/wfkxFpXMR35hQBv+2UuiduS+8M4/EXL XcYg== 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=Zk/7g2NOg2HJyBROjss9mdodMQJ6cfF7LYrKlfrzRSY=; b=r/am7C0TLY63hiYIWMw1vXZsS4SBukL44blsIWJs+PkRzmVDVO+JlSB6hbLRxn+w8f CGVvR04ydHHkRgrB9qG/afffJlvGmf85N9+75J79yt/HCgNngs8iZy9Gm3EmhidsyCyB ziTfTHISlx0awJ4ep2mcc9CYTgKYiwaegFvtdNIuonLfA96r0jzmShr6qw/kpMu63DLK yKweBYK3vk8dYxa34/TJACA6tkWAPl9dzOu5tP1vHVLzUfKOnacJ4ttIxmGWmR4hQUWD uTz6Jz9GIHd5gPZXMegbOwEJQm6KlHxFV0P6O/S6UFpQ+9Nstp3pRG7sPaBs+q+063zs ddaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=kt27pZWY; 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 hd17-20020a170907969100b007ae754729d1si691962ejc.883.2022.12.09.00.14.33; Fri, 09 Dec 2022 00:14:51 -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=kt27pZWY; 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 S229940AbiLIIIy (ORCPT + 75 others); Fri, 9 Dec 2022 03:08:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59334 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229628AbiLIIIw (ORCPT ); Fri, 9 Dec 2022 03:08:52 -0500 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4FB741DF35 for ; Fri, 9 Dec 2022 00:08:51 -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-out2.suse.de (Postfix) with ESMTPS id B651C1FE95; Fri, 9 Dec 2022 08:08:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1670573329; 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=Zk/7g2NOg2HJyBROjss9mdodMQJ6cfF7LYrKlfrzRSY=; b=kt27pZWYH/kFXb3m0QK81ZdpgOZUQ5G7mlGGV9PW9fbhRUmCvwYh/S6je3mCV+Y9srLzzz 4l+WbhypNKZE1LpuzrMKjAzjXfcV73yP05VdCmGj/Ki0lKvyLNQBGa8ozBJMMLiE/QE8wl FsnxbS7qejzA1JaFeMeuaBaeSayzlG8= 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 949AD138E0; Fri, 9 Dec 2022 08:08:49 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id vfT8IRHtkmP4OAAAMHmgww (envelope-from ); Fri, 09 Dec 2022 08:08:49 +0000 Date: Fri, 9 Dec 2022 09:08:48 +0100 From: Michal Hocko To: Wei Xu Cc: Mina Almasry , Andrew Morton , Johannes Weiner , Roman Gushchin , Shakeel Butt , Muchun Song , Huang Ying , Yang Shi , Yosry Ahmed , fvdl@google.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3] [mm-unstable] mm: Fix memcg reclaim on memory tiered systems Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 Thu 08-12-22 16:59:36, Wei Xu wrote: [...] > > What I really mean is to add demotion nodes to the nodemask along with > > the set of nodes you want to reclaim from. To me that sounds like a > > more natural interface allowing for all sorts of usecases: > > - free up demotion targets (only specify demotion nodes in the mask) > > - control where to demote (e.g. select specific demotion target(s)) > > - do not demote at all (skip demotion nodes from the node mask) > > For clarification, do you mean to add another argument (e.g. > demotion_nodes) in addition to the "nodes" argument? No, nodes=mask argument should control the domain where the memory reclaim should happen. That includes both aging and the reclaim. If the mask doesn't contain any lower tier node then no demotion will happen. If only a subset of lower tiers are specified then only those could be used for the demotion process. Or put it otherwise, the nodemask is not only used to filter out zonelists during reclaim it also restricts migration targets. Is this more clear now? -- Michal Hocko SUSE Labs